OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 Channel() { | 128 Channel() { |
129 memset(&send_codec, 0, sizeof(send_codec)); | 129 memset(&send_codec, 0, sizeof(send_codec)); |
130 } | 130 } |
131 bool playout = false; | 131 bool playout = false; |
132 float volume_scale = 1.0f; | 132 float volume_scale = 1.0f; |
133 bool vad = false; | 133 bool vad = false; |
134 bool codec_fec = false; | 134 bool codec_fec = false; |
135 int max_encoding_bandwidth = 0; | 135 int max_encoding_bandwidth = 0; |
136 bool opus_dtx = false; | 136 bool opus_dtx = false; |
137 bool red = false; | 137 bool red = false; |
138 bool nack = false; | |
139 int cn8_type = 13; | 138 int cn8_type = 13; |
140 int cn16_type = 105; | 139 int cn16_type = 105; |
141 int red_type = 117; | 140 int red_type = 117; |
142 int nack_max_packets = 0; | |
143 uint32_t send_ssrc = 0; | 141 uint32_t send_ssrc = 0; |
144 int associate_send_channel = -1; | 142 int associate_send_channel = -1; |
145 std::vector<webrtc::CodecInst> recv_codecs; | 143 std::vector<webrtc::CodecInst> recv_codecs; |
146 webrtc::CodecInst send_codec; | 144 webrtc::CodecInst send_codec; |
147 int neteq_capacity = -1; | 145 int neteq_capacity = -1; |
148 bool neteq_fast_accelerate = false; | 146 bool neteq_fast_accelerate = false; |
149 }; | 147 }; |
150 | 148 |
151 FakeWebRtcVoiceEngine() { | 149 FakeWebRtcVoiceEngine() { |
152 memset(&agc_config_, 0, sizeof(agc_config_)); | 150 memset(&agc_config_, 0, sizeof(agc_config_)); |
(...skipping 21 matching lines...) Expand all Loading... |
174 } | 172 } |
175 bool GetRED(int channel) { | 173 bool GetRED(int channel) { |
176 return channels_[channel]->red; | 174 return channels_[channel]->red; |
177 } | 175 } |
178 bool GetCodecFEC(int channel) { | 176 bool GetCodecFEC(int channel) { |
179 return channels_[channel]->codec_fec; | 177 return channels_[channel]->codec_fec; |
180 } | 178 } |
181 int GetMaxEncodingBandwidth(int channel) { | 179 int GetMaxEncodingBandwidth(int channel) { |
182 return channels_[channel]->max_encoding_bandwidth; | 180 return channels_[channel]->max_encoding_bandwidth; |
183 } | 181 } |
184 bool GetNACK(int channel) { | |
185 return channels_[channel]->nack; | |
186 } | |
187 int GetNACKMaxPackets(int channel) { | |
188 return channels_[channel]->nack_max_packets; | |
189 } | |
190 int GetSendCNPayloadType(int channel, bool wideband) { | 182 int GetSendCNPayloadType(int channel, bool wideband) { |
191 return (wideband) ? | 183 return (wideband) ? |
192 channels_[channel]->cn16_type : | 184 channels_[channel]->cn16_type : |
193 channels_[channel]->cn8_type; | 185 channels_[channel]->cn8_type; |
194 } | 186 } |
195 int GetSendREDPayloadType(int channel) { | 187 int GetSendREDPayloadType(int channel) { |
196 return channels_[channel]->red_type; | 188 return channels_[channel]->red_type; |
197 } | 189 } |
198 void set_playout_fail_channel(int channel) { | 190 void set_playout_fail_channel(int channel) { |
199 playout_fail_channel_ = channel; | 191 playout_fail_channel_ = channel; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 channels_[channel]->red = enable; | 480 channels_[channel]->red = enable; |
489 channels_[channel]->red_type = redPayloadtype; | 481 channels_[channel]->red_type = redPayloadtype; |
490 return 0; | 482 return 0; |
491 } | 483 } |
492 WEBRTC_FUNC(GetREDStatus, (int channel, bool& enable, int& redPayloadtype)) { | 484 WEBRTC_FUNC(GetREDStatus, (int channel, bool& enable, int& redPayloadtype)) { |
493 WEBRTC_CHECK_CHANNEL(channel); | 485 WEBRTC_CHECK_CHANNEL(channel); |
494 enable = channels_[channel]->red; | 486 enable = channels_[channel]->red; |
495 redPayloadtype = channels_[channel]->red_type; | 487 redPayloadtype = channels_[channel]->red_type; |
496 return 0; | 488 return 0; |
497 } | 489 } |
498 WEBRTC_FUNC(SetNACKStatus, (int channel, bool enable, int maxNoPackets)) { | 490 WEBRTC_STUB(SetNACKStatus, (int channel, bool enable, int maxNoPackets)); |
499 WEBRTC_CHECK_CHANNEL(channel); | |
500 channels_[channel]->nack = enable; | |
501 channels_[channel]->nack_max_packets = maxNoPackets; | |
502 return 0; | |
503 } | |
504 | 491 |
505 // webrtc::VoEVolumeControl | 492 // webrtc::VoEVolumeControl |
506 WEBRTC_STUB(SetSpeakerVolume, (unsigned int)); | 493 WEBRTC_STUB(SetSpeakerVolume, (unsigned int)); |
507 WEBRTC_STUB(GetSpeakerVolume, (unsigned int&)); | 494 WEBRTC_STUB(GetSpeakerVolume, (unsigned int&)); |
508 WEBRTC_STUB(SetMicVolume, (unsigned int)); | 495 WEBRTC_STUB(SetMicVolume, (unsigned int)); |
509 WEBRTC_STUB(GetMicVolume, (unsigned int&)); | 496 WEBRTC_STUB(GetMicVolume, (unsigned int&)); |
510 WEBRTC_STUB(SetInputMute, (int, bool)); | 497 WEBRTC_STUB(SetInputMute, (int, bool)); |
511 WEBRTC_STUB(GetInputMute, (int, bool&)); | 498 WEBRTC_STUB(GetInputMute, (int, bool&)); |
512 WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&)); | 499 WEBRTC_STUB(GetSpeechInputLevel, (unsigned int&)); |
513 WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&)); | 500 WEBRTC_STUB(GetSpeechOutputLevel, (int, unsigned int&)); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 webrtc::NsModes ns_mode_ = webrtc::kNsDefault; | 652 webrtc::NsModes ns_mode_ = webrtc::kNsDefault; |
666 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; | 653 webrtc::AgcModes agc_mode_ = webrtc::kAgcDefault; |
667 webrtc::AgcConfig agc_config_; | 654 webrtc::AgcConfig agc_config_; |
668 int playout_fail_channel_ = -1; | 655 int playout_fail_channel_ = -1; |
669 FakeAudioProcessing audio_processing_; | 656 FakeAudioProcessing audio_processing_; |
670 }; | 657 }; |
671 | 658 |
672 } // namespace cricket | 659 } // namespace cricket |
673 | 660 |
674 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 661 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |