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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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>& | 768 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& |
769 audio_encoder_factory, | 769 audio_encoder_factory, |
770 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& | 770 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& |
771 audio_decoder_factory, | 771 audio_decoder_factory, |
772 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer) { | 772 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, |
| 773 rtc::TaskQueue* low_priority_worker_queue) { |
773 // Add a fake audio codec. Note that the name must not be "" as there are | 774 // Add a fake audio codec. Note that the name must not be "" as there are |
774 // sanity checks against that. | 775 // sanity checks against that. |
775 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); | 776 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); |
776 } | 777 } |
777 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 778 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
778 return rtc::scoped_refptr<webrtc::AudioState>(); | 779 return rtc::scoped_refptr<webrtc::AudioState>(); |
779 } | 780 } |
780 | 781 |
781 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 782 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
782 const MediaConfig& config, | 783 const MediaConfig& config, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 friend class FakeMediaEngine; | 873 friend class FakeMediaEngine; |
873 }; | 874 }; |
874 | 875 |
875 class FakeMediaEngine : | 876 class FakeMediaEngine : |
876 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { | 877 public CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine> { |
877 public: | 878 public: |
878 FakeMediaEngine() | 879 FakeMediaEngine() |
879 : CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine>(nullptr, | 880 : CompositeMediaEngine<FakeVoiceEngine, FakeVideoEngine>(nullptr, |
880 nullptr, | 881 nullptr, |
881 nullptr, | 882 nullptr, |
| 883 nullptr, |
882 nullptr) {} | 884 nullptr) {} |
883 virtual ~FakeMediaEngine() {} | 885 virtual ~FakeMediaEngine() {} |
884 | 886 |
885 void SetAudioCodecs(const std::vector<AudioCodec>& codecs) { | 887 void SetAudioCodecs(const std::vector<AudioCodec>& codecs) { |
886 voice_.SetCodecs(codecs); | 888 voice_.SetCodecs(codecs); |
887 } | 889 } |
888 void SetVideoCodecs(const std::vector<VideoCodec>& codecs) { | 890 void SetVideoCodecs(const std::vector<VideoCodec>& codecs) { |
889 video_.SetCodecs(codecs); | 891 video_.SetCodecs(codecs); |
890 } | 892 } |
891 | 893 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } | 967 virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } |
966 | 968 |
967 private: | 969 private: |
968 std::vector<FakeDataMediaChannel*> channels_; | 970 std::vector<FakeDataMediaChannel*> channels_; |
969 std::vector<DataCodec> data_codecs_; | 971 std::vector<DataCodec> data_codecs_; |
970 }; | 972 }; |
971 | 973 |
972 } // namespace cricket | 974 } // namespace cricket |
973 | 975 |
974 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 976 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |