| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 // sanity checks against that. | 675 // sanity checks against that. |
| 676 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); | 676 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); |
| 677 } | 677 } |
| 678 bool Init(rtc::Thread* worker_thread) { return true; } | 678 bool Init(rtc::Thread* worker_thread) { return true; } |
| 679 void Terminate() {} | 679 void Terminate() {} |
| 680 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 680 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
| 681 return rtc::scoped_refptr<webrtc::AudioState>(); | 681 return rtc::scoped_refptr<webrtc::AudioState>(); |
| 682 } | 682 } |
| 683 | 683 |
| 684 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 684 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
| 685 const webrtc::MediaConfig& config, |
| 685 const AudioOptions& options) { | 686 const AudioOptions& options) { |
| 686 if (fail_create_channel_) { | 687 if (fail_create_channel_) { |
| 687 return nullptr; | 688 return nullptr; |
| 688 } | 689 } |
| 689 | 690 |
| 690 FakeVoiceMediaChannel* ch = new FakeVoiceMediaChannel(this, options); | 691 FakeVoiceMediaChannel* ch = new FakeVoiceMediaChannel(this, options); |
| 691 channels_.push_back(ch); | 692 channels_.push_back(ch); |
| 692 return ch; | 693 return ch; |
| 693 } | 694 } |
| 694 FakeVoiceMediaChannel* GetChannel(size_t index) { | 695 FakeVoiceMediaChannel* GetChannel(size_t index) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); | 739 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); |
| 739 } | 740 } |
| 740 void Init() {} | 741 void Init() {} |
| 741 bool SetOptions(const VideoOptions& options) { | 742 bool SetOptions(const VideoOptions& options) { |
| 742 options_ = options; | 743 options_ = options; |
| 743 options_changed_ = true; | 744 options_changed_ = true; |
| 744 return true; | 745 return true; |
| 745 } | 746 } |
| 746 | 747 |
| 747 VideoMediaChannel* CreateChannel(webrtc::Call* call, | 748 VideoMediaChannel* CreateChannel(webrtc::Call* call, |
| 749 const webrtc::MediaConfig& config, |
| 748 const VideoOptions& options) { | 750 const VideoOptions& options) { |
| 749 if (fail_create_channel_) { | 751 if (fail_create_channel_) { |
| 750 return NULL; | 752 return NULL; |
| 751 } | 753 } |
| 752 | 754 |
| 753 FakeVideoMediaChannel* ch = new FakeVideoMediaChannel(this, options); | 755 FakeVideoMediaChannel* ch = new FakeVideoMediaChannel(this, options); |
| 754 channels_.push_back(ch); | 756 channels_.push_back(ch); |
| 755 return ch; | 757 return ch; |
| 756 } | 758 } |
| 757 FakeVideoMediaChannel* GetChannel(size_t index) { | 759 FakeVideoMediaChannel* GetChannel(size_t index) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 885 |
| 884 private: | 886 private: |
| 885 std::vector<FakeDataMediaChannel*> channels_; | 887 std::vector<FakeDataMediaChannel*> channels_; |
| 886 std::vector<DataCodec> data_codecs_; | 888 std::vector<DataCodec> data_codecs_; |
| 887 DataChannelType last_channel_type_; | 889 DataChannelType last_channel_type_; |
| 888 }; | 890 }; |
| 889 | 891 |
| 890 } // namespace cricket | 892 } // namespace cricket |
| 891 | 893 |
| 892 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 894 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
| OLD | NEW |