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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 // relevant setting has been updated. | 758 // relevant setting has been updated. |
759 // TODO(thaloun): Replace with explicit checks of before & after values. | 759 // TODO(thaloun): Replace with explicit checks of before & after values. |
760 bool options_changed_; | 760 bool options_changed_; |
761 bool fail_create_channel_; | 761 bool fail_create_channel_; |
762 RtpCapabilities capabilities_; | 762 RtpCapabilities capabilities_; |
763 }; | 763 }; |
764 | 764 |
765 class FakeVoiceEngine : public FakeBaseEngine { | 765 class FakeVoiceEngine : public FakeBaseEngine { |
766 public: | 766 public: |
767 FakeVoiceEngine(webrtc::AudioDeviceModule* adm, | 767 FakeVoiceEngine(webrtc::AudioDeviceModule* adm, |
| 768 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
| 769 audio_encoder_factory, |
768 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 770 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
769 audio_decoder_factory, | 771 audio_decoder_factory, |
770 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) { | 772 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) { |
771 // Add a fake audio codec. Note that the name must not be "" as there are | 773 // Add a fake audio codec. Note that the name must not be "" as there are |
772 // sanity checks against that. | 774 // sanity checks against that. |
773 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); | 775 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); |
774 } | 776 } |
775 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 777 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
776 return rtc::scoped_refptr<webrtc::AudioState>(); | 778 return rtc::scoped_refptr<webrtc::AudioState>(); |
777 } | 779 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 | 871 |
870 friend class FakeMediaEngine; | 872 friend class FakeMediaEngine; |
871 }; | 873 }; |
872 | 874 |
873 class FakeMediaEngine : | 875 class FakeMediaEngine : |
874 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { | 876 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { |
875 public: | 877 public: |
876 FakeMediaEngine() | 878 FakeMediaEngine() |
877 : CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine>(nullptr, | 879 : CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine>(nullptr, |
878 nullptr, | 880 nullptr, |
| 881 nullptr, |
879 nullptr) {} | 882 nullptr) {} |
880 virtual ~FakeMediaEngine() {} | 883 virtual ~FakeMediaEngine() {} |
881 | 884 |
882 void SetAudioCodecs(const std::vector<AudioCodec>& codecs) { | 885 void SetAudioCodecs(const std::vector<AudioCodec>& codecs) { |
883 voice_.SetCodecs(codecs); | 886 voice_.SetCodecs(codecs); |
884 } | 887 } |
885 void SetVideoCodecs(const std::vector<VideoCodec>& codecs) { | 888 void SetVideoCodecs(const std::vector<VideoCodec>& codecs) { |
886 video_.SetCodecs(codecs); | 889 video_.SetCodecs(codecs); |
887 } | 890 } |
888 | 891 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } | 965 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } |
963 | 966 |
964 private: | 967 private: |
965 std::vector<FakeDataMediaChannel*> channels_; | 968 std::vector<FakeDataMediaChannel*> channels_; |
966 std::vector<DataCodec> data_codecs_; | 969 std::vector<DataCodec> data_codecs_; |
967 }; | 970 }; |
968 | 971 |
969 } // namespace cricket | 972 } // namespace cricket |
970 | 973 |
971 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 974 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |