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

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

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed test nit; use reference. Created 4 years, 10 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 | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/media/base/mediachannel.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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 // sanity checks against that. 658 // sanity checks against that.
659 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); 659 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0));
660 } 660 }
661 bool Init(rtc::Thread* worker_thread) { return true; } 661 bool Init(rtc::Thread* worker_thread) { return true; }
662 void Terminate() {} 662 void Terminate() {}
663 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { 663 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const {
664 return rtc::scoped_refptr<webrtc::AudioState>(); 664 return rtc::scoped_refptr<webrtc::AudioState>();
665 } 665 }
666 666
667 VoiceMediaChannel* CreateChannel(webrtc::Call* call, 667 VoiceMediaChannel* CreateChannel(webrtc::Call* call,
668 const MediaConfig& config,
668 const AudioOptions& options) { 669 const AudioOptions& options) {
669 if (fail_create_channel_) { 670 if (fail_create_channel_) {
670 return nullptr; 671 return nullptr;
671 } 672 }
672 673
673 FakeVoiceMediaChannel* ch = new FakeVoiceMediaChannel(this, options); 674 FakeVoiceMediaChannel* ch = new FakeVoiceMediaChannel(this, options);
674 channels_.push_back(ch); 675 channels_.push_back(ch);
675 return ch; 676 return ch;
676 } 677 }
677 FakeVoiceMediaChannel* GetChannel(size_t index) { 678 FakeVoiceMediaChannel* GetChannel(size_t index) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); 722 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0));
722 } 723 }
723 void Init() {} 724 void Init() {}
724 bool SetOptions(const VideoOptions& options) { 725 bool SetOptions(const VideoOptions& options) {
725 options_ = options; 726 options_ = options;
726 options_changed_ = true; 727 options_changed_ = true;
727 return true; 728 return true;
728 } 729 }
729 730
730 VideoMediaChannel* CreateChannel(webrtc::Call* call, 731 VideoMediaChannel* CreateChannel(webrtc::Call* call,
732 const MediaConfig& config,
731 const VideoOptions& options) { 733 const VideoOptions& options) {
732 if (fail_create_channel_) { 734 if (fail_create_channel_) {
733 return NULL; 735 return NULL;
734 } 736 }
735 737
736 FakeVideoMediaChannel* ch = new FakeVideoMediaChannel(this, options); 738 FakeVideoMediaChannel* ch = new FakeVideoMediaChannel(this, options);
737 channels_.push_back(ch); 739 channels_.push_back(ch);
738 return ch; 740 return ch;
739 } 741 }
740 FakeVideoMediaChannel* GetChannel(size_t index) { 742 FakeVideoMediaChannel* GetChannel(size_t index) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 868
867 private: 869 private:
868 std::vector<FakeDataMediaChannel*> channels_; 870 std::vector<FakeDataMediaChannel*> channels_;
869 std::vector<DataCodec> data_codecs_; 871 std::vector<DataCodec> data_codecs_;
870 DataChannelType last_channel_type_; 872 DataChannelType last_channel_type_;
871 }; 873 };
872 874
873 } // namespace cricket 875 } // namespace cricket
874 876
875 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 877 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698