OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 bool fail_create_channel_; | 695 bool fail_create_channel_; |
696 RtpCapabilities capabilities_; | 696 RtpCapabilities capabilities_; |
697 }; | 697 }; |
698 | 698 |
699 class FakeVoiceEngine : public FakeBaseEngine { | 699 class FakeVoiceEngine : public FakeBaseEngine { |
700 public: | 700 public: |
701 explicit FakeVoiceEngine(webrtc::AudioDeviceModule* adm) | 701 explicit FakeVoiceEngine(webrtc::AudioDeviceModule* adm) |
702 : output_volume_(-1) { | 702 : output_volume_(-1) { |
703 // Add a fake audio codec. Note that the name must not be "" as there are | 703 // Add a fake audio codec. Note that the name must not be "" as there are |
704 // sanity checks against that. | 704 // sanity checks against that. |
705 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); | 705 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); |
706 } | 706 } |
707 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 707 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
708 return rtc::scoped_refptr<webrtc::AudioState>(); | 708 return rtc::scoped_refptr<webrtc::AudioState>(); |
709 } | 709 } |
710 | 710 |
711 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 711 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
712 const MediaConfig& config, | 712 const MediaConfig& config, |
713 const AudioOptions& options) { | 713 const AudioOptions& options) { |
714 if (fail_create_channel_) { | 714 if (fail_create_channel_) { |
715 return nullptr; | 715 return nullptr; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 int output_volume_; | 756 int output_volume_; |
757 | 757 |
758 friend class FakeMediaEngine; | 758 friend class FakeMediaEngine; |
759 }; | 759 }; |
760 | 760 |
761 class FakeVideoEngine : public FakeBaseEngine { | 761 class FakeVideoEngine : public FakeBaseEngine { |
762 public: | 762 public: |
763 FakeVideoEngine() : capture_(false) { | 763 FakeVideoEngine() : capture_(false) { |
764 // Add a fake video codec. Note that the name must not be "" as there are | 764 // Add a fake video codec. Note that the name must not be "" as there are |
765 // sanity checks against that. | 765 // sanity checks against that. |
766 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); | 766 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0)); |
767 } | 767 } |
768 void Init() {} | 768 void Init() {} |
769 bool SetOptions(const VideoOptions& options) { | 769 bool SetOptions(const VideoOptions& options) { |
770 options_ = options; | 770 options_ = options; |
771 options_changed_ = true; | 771 options_changed_ = true; |
772 return true; | 772 return true; |
773 } | 773 } |
774 | 774 |
775 VideoMediaChannel* CreateChannel(webrtc::Call* call, | 775 VideoMediaChannel* CreateChannel(webrtc::Call* call, |
776 const MediaConfig& config, | 776 const MediaConfig& config, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 | 907 |
908 private: | 908 private: |
909 std::vector<FakeDataMediaChannel*> channels_; | 909 std::vector<FakeDataMediaChannel*> channels_; |
910 std::vector<DataCodec> data_codecs_; | 910 std::vector<DataCodec> data_codecs_; |
911 DataChannelType last_channel_type_; | 911 DataChannelType last_channel_type_; |
912 }; | 912 }; |
913 | 913 |
914 } // namespace cricket | 914 } // namespace cricket |
915 | 915 |
916 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 916 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |