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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 bool fail_create_channel_; | 693 bool fail_create_channel_; |
694 RtpCapabilities capabilities_; | 694 RtpCapabilities capabilities_; |
695 }; | 695 }; |
696 | 696 |
697 class FakeVoiceEngine : public FakeBaseEngine { | 697 class FakeVoiceEngine : public FakeBaseEngine { |
698 public: | 698 public: |
699 FakeVoiceEngine() | 699 FakeVoiceEngine() |
700 : output_volume_(-1) { | 700 : output_volume_(-1) { |
701 // Add a fake audio codec. Note that the name must not be "" as there are | 701 // Add a fake audio codec. Note that the name must not be "" as there are |
702 // sanity checks against that. | 702 // sanity checks against that. |
703 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); | 703 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1)); |
704 } | 704 } |
705 bool Init(rtc::Thread* worker_thread) { return true; } | 705 bool Init(rtc::Thread* worker_thread) { return true; } |
706 void Terminate() {} | 706 void Terminate() {} |
707 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { | 707 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const { |
708 return rtc::scoped_refptr<webrtc::AudioState>(); | 708 return rtc::scoped_refptr<webrtc::AudioState>(); |
709 } | 709 } |
710 | 710 |
711 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 711 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
712 const MediaConfig& config, | 712 const MediaConfig& config, |
713 const AudioOptions& options) { | 713 const AudioOptions& options) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 int output_volume_; | 756 int output_volume_; |
757 | 757 |
758 friend class FakeMediaEngine; | 758 friend class FakeMediaEngine; |
759 }; | 759 }; |
760 | 760 |
761 class FakeVideoEngine : public FakeBaseEngine { | 761 class FakeVideoEngine : public FakeBaseEngine { |
762 public: | 762 public: |
763 FakeVideoEngine() : capture_(false) { | 763 FakeVideoEngine() : capture_(false) { |
764 // Add a fake video codec. Note that the name must not be "" as there are | 764 // Add a fake video codec. Note that the name must not be "" as there are |
765 // sanity checks against that. | 765 // sanity checks against that. |
766 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); | 766 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0)); |
767 } | 767 } |
768 void Init() {} | 768 void Init() {} |
769 bool SetOptions(const VideoOptions& options) { | 769 bool SetOptions(const VideoOptions& options) { |
770 options_ = options; | 770 options_ = options; |
771 options_changed_ = true; | 771 options_changed_ = true; |
772 return true; | 772 return true; |
773 } | 773 } |
774 | 774 |
775 VideoMediaChannel* CreateChannel(webrtc::Call* call, | 775 VideoMediaChannel* CreateChannel(webrtc::Call* call, |
776 const MediaConfig& config, | 776 const MediaConfig& config, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 | 906 |
907 private: | 907 private: |
908 std::vector<FakeDataMediaChannel*> channels_; | 908 std::vector<FakeDataMediaChannel*> channels_; |
909 std::vector<DataCodec> data_codecs_; | 909 std::vector<DataCodec> data_codecs_; |
910 DataChannelType last_channel_type_; | 910 DataChannelType last_channel_type_; |
911 }; | 911 }; |
912 | 912 |
913 } // namespace cricket | 913 } // namespace cricket |
914 | 914 |
915 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 915 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |