Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: webrtc/media/base/fakemediaengine.h

Issue 2888303003: Work-in-progress upload to add worker task queue to PC factory.
Patch Set: Rebase. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/media/base/mediaengine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/base/mediaengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698