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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 public: | 771 public: |
772 FakeVoiceEngine() | 772 FakeVoiceEngine() |
773 : output_volume_(-1), | 773 : output_volume_(-1), |
774 delay_offset_(0) { | 774 delay_offset_(0) { |
775 // Add a fake audio codec. Note that the name must not be "" as there are | 775 // Add a fake audio codec. Note that the name must not be "" as there are |
776 // sanity checks against that. | 776 // sanity checks against that. |
777 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); | 777 codecs_.push_back(AudioCodec(101, "fake_audio_codec", 0, 0, 1, 0)); |
778 } | 778 } |
779 bool Init(rtc::Thread* worker_thread) { return true; } | 779 bool Init(rtc::Thread* worker_thread) { return true; } |
780 void Terminate() {} | 780 void Terminate() {} |
781 int GetCapabilities() { return AUDIO_SEND | AUDIO_RECV; } | |
782 webrtc::VoiceEngine* GetVoE() { return nullptr; } | 781 webrtc::VoiceEngine* GetVoE() { return nullptr; } |
783 AudioOptions GetOptions() const { | 782 AudioOptions GetOptions() const { |
784 return options_; | 783 return options_; |
785 } | 784 } |
786 bool SetOptions(const AudioOptions& options) { | 785 bool SetOptions(const AudioOptions& options) { |
787 options_ = options; | 786 options_ = options; |
788 options_changed_ = true; | 787 options_changed_ = true; |
789 return true; | 788 return true; |
790 } | 789 } |
791 | 790 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 // Add a fake video codec. Note that the name must not be "" as there are | 853 // Add a fake video codec. Note that the name must not be "" as there are |
855 // sanity checks against that. | 854 // sanity checks against that. |
856 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); | 855 codecs_.push_back(VideoCodec(0, "fake_video_codec", 0, 0, 0, 0)); |
857 } | 856 } |
858 void Init() {} | 857 void Init() {} |
859 bool SetOptions(const VideoOptions& options) { | 858 bool SetOptions(const VideoOptions& options) { |
860 options_ = options; | 859 options_ = options; |
861 options_changed_ = true; | 860 options_changed_ = true; |
862 return true; | 861 return true; |
863 } | 862 } |
864 int GetCapabilities() { return VIDEO_SEND | VIDEO_RECV; } | |
865 bool SetDefaultEncoderConfig(const VideoEncoderConfig& config) { | 863 bool SetDefaultEncoderConfig(const VideoEncoderConfig& config) { |
866 default_encoder_config_ = config; | 864 default_encoder_config_ = config; |
867 return true; | 865 return true; |
868 } | 866 } |
869 const VideoEncoderConfig& default_encoder_config() const { | 867 const VideoEncoderConfig& default_encoder_config() const { |
870 return default_encoder_config_; | 868 return default_encoder_config_; |
871 } | 869 } |
872 | 870 |
873 VideoMediaChannel* CreateChannel(webrtc::Call* call, | 871 VideoMediaChannel* CreateChannel(webrtc::Call* call, |
874 const VideoOptions& options) { | 872 const VideoOptions& options) { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 | 1031 |
1034 private: | 1032 private: |
1035 std::vector<FakeDataMediaChannel*> channels_; | 1033 std::vector<FakeDataMediaChannel*> channels_; |
1036 std::vector<DataCodec> data_codecs_; | 1034 std::vector<DataCodec> data_codecs_; |
1037 DataChannelType last_channel_type_; | 1035 DataChannelType last_channel_type_; |
1038 }; | 1036 }; |
1039 | 1037 |
1040 } // namespace cricket | 1038 } // namespace cricket |
1041 | 1039 |
1042 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 1040 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |