OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 int dtmf_event_code; | 193 int dtmf_event_code; |
194 bool dtmf_out_of_band; | 194 bool dtmf_out_of_band; |
195 int dtmf_length_ms; | 195 int dtmf_length_ms; |
196 }; | 196 }; |
197 struct Channel { | 197 struct Channel { |
198 explicit Channel() | 198 explicit Channel() |
199 : external_transport(false), | 199 : external_transport(false), |
200 send(false), | 200 send(false), |
201 playout(false), | 201 playout(false), |
202 volume_scale(1.0), | 202 volume_scale(1.0), |
203 volume_pan_left(1.0), | |
204 volume_pan_right(1.0), | |
205 vad(false), | 203 vad(false), |
206 codec_fec(false), | 204 codec_fec(false), |
207 max_encoding_bandwidth(0), | 205 max_encoding_bandwidth(0), |
208 opus_dtx(false), | 206 opus_dtx(false), |
209 red(false), | 207 red(false), |
210 nack(false), | 208 nack(false), |
211 rx_agc_enabled(false), | 209 rx_agc_enabled(false), |
212 rx_agc_mode(webrtc::kAgcDefault), | 210 rx_agc_mode(webrtc::kAgcDefault), |
213 cn8_type(13), | 211 cn8_type(13), |
214 cn16_type(105), | 212 cn16_type(105), |
215 dtmf_type(106), | 213 dtmf_type(106), |
216 red_type(117), | 214 red_type(117), |
217 nack_max_packets(0), | 215 nack_max_packets(0), |
218 send_ssrc(0), | 216 send_ssrc(0), |
219 send_audio_level_ext_(-1), | 217 send_audio_level_ext_(-1), |
220 receive_audio_level_ext_(-1), | 218 receive_audio_level_ext_(-1), |
221 send_absolute_sender_time_ext_(-1), | 219 send_absolute_sender_time_ext_(-1), |
222 receive_absolute_sender_time_ext_(-1), | 220 receive_absolute_sender_time_ext_(-1), |
223 associate_send_channel(-1), | 221 associate_send_channel(-1), |
224 neteq_capacity(-1), | 222 neteq_capacity(-1), |
225 neteq_fast_accelerate(false) { | 223 neteq_fast_accelerate(false) { |
226 memset(&send_codec, 0, sizeof(send_codec)); | 224 memset(&send_codec, 0, sizeof(send_codec)); |
227 memset(&rx_agc_config, 0, sizeof(rx_agc_config)); | 225 memset(&rx_agc_config, 0, sizeof(rx_agc_config)); |
228 } | 226 } |
229 bool external_transport; | 227 bool external_transport; |
230 bool send; | 228 bool send; |
231 bool playout; | 229 bool playout; |
232 float volume_scale; | 230 float volume_scale; |
233 float volume_pan_left; | |
234 float volume_pan_right; | |
235 bool vad; | 231 bool vad; |
236 bool codec_fec; | 232 bool codec_fec; |
237 int max_encoding_bandwidth; | 233 int max_encoding_bandwidth; |
238 bool opus_dtx; | 234 bool opus_dtx; |
239 bool red; | 235 bool red; |
240 bool nack; | 236 bool nack; |
241 bool rx_agc_enabled; | 237 bool rx_agc_enabled; |
242 webrtc::AgcModes rx_agc_mode; | 238 webrtc::AgcModes rx_agc_mode; |
243 webrtc::AgcConfig rx_agc_config; | 239 webrtc::AgcConfig rx_agc_config; |
244 int cn8_type; | 240 int cn8_type; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 WEBRTC_FUNC(SetChannelOutputVolumeScaling, (int channel, float scale)) { | 919 WEBRTC_FUNC(SetChannelOutputVolumeScaling, (int channel, float scale)) { |
924 WEBRTC_CHECK_CHANNEL(channel); | 920 WEBRTC_CHECK_CHANNEL(channel); |
925 channels_[channel]->volume_scale= scale; | 921 channels_[channel]->volume_scale= scale; |
926 return 0; | 922 return 0; |
927 } | 923 } |
928 WEBRTC_FUNC(GetChannelOutputVolumeScaling, (int channel, float& scale)) { | 924 WEBRTC_FUNC(GetChannelOutputVolumeScaling, (int channel, float& scale)) { |
929 WEBRTC_CHECK_CHANNEL(channel); | 925 WEBRTC_CHECK_CHANNEL(channel); |
930 scale = channels_[channel]->volume_scale; | 926 scale = channels_[channel]->volume_scale; |
931 return 0; | 927 return 0; |
932 } | 928 } |
933 WEBRTC_FUNC(SetOutputVolumePan, (int channel, float left, float right)) { | 929 WEBRTC_STUB(SetOutputVolumePan, (int channel, float left, float right)); |
934 WEBRTC_CHECK_CHANNEL(channel); | 930 WEBRTC_STUB(GetOutputVolumePan, (int channel, float& left, float& right)); |
935 channels_[channel]->volume_pan_left = left; | |
936 channels_[channel]->volume_pan_right = right; | |
937 return 0; | |
938 } | |
939 WEBRTC_FUNC(GetOutputVolumePan, (int channel, float& left, float& right)) { | |
940 WEBRTC_CHECK_CHANNEL(channel); | |
941 left = channels_[channel]->volume_pan_left; | |
942 right = channels_[channel]->volume_pan_right; | |
943 return 0; | |
944 } | |
945 | 931 |
946 // webrtc::VoEAudioProcessing | 932 // webrtc::VoEAudioProcessing |
947 WEBRTC_FUNC(SetNsStatus, (bool enable, webrtc::NsModes mode)) { | 933 WEBRTC_FUNC(SetNsStatus, (bool enable, webrtc::NsModes mode)) { |
948 ns_enabled_ = enable; | 934 ns_enabled_ = enable; |
949 ns_mode_ = mode; | 935 ns_mode_ = mode; |
950 return 0; | 936 return 0; |
951 } | 937 } |
952 WEBRTC_FUNC(GetNsStatus, (bool& enabled, webrtc::NsModes& mode)) { | 938 WEBRTC_FUNC(GetNsStatus, (bool& enabled, webrtc::NsModes& mode)) { |
953 enabled = ns_enabled_; | 939 enabled = ns_enabled_; |
954 mode = ns_mode_; | 940 mode = ns_mode_; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 int playout_sample_rate_; | 1139 int playout_sample_rate_; |
1154 DtmfInfo dtmf_info_; | 1140 DtmfInfo dtmf_info_; |
1155 FakeAudioProcessing audio_processing_; | 1141 FakeAudioProcessing audio_processing_; |
1156 }; | 1142 }; |
1157 | 1143 |
1158 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID | 1144 #undef WEBRTC_CHECK_HEADER_EXTENSION_ID |
1159 | 1145 |
1160 } // namespace cricket | 1146 } // namespace cricket |
1161 | 1147 |
1162 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_ | 1148 #endif // TALK_SESSION_PHONE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |