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 20 matching lines...) Expand all Loading... |
31 #include "webrtc/media/engine/webrtcvoe.h" | 31 #include "webrtc/media/engine/webrtcvoe.h" |
32 #include "webrtc/pc/channel.h" | 32 #include "webrtc/pc/channel.h" |
33 | 33 |
34 namespace cricket { | 34 namespace cricket { |
35 | 35 |
36 class AudioDeviceModule; | 36 class AudioDeviceModule; |
37 class AudioSource; | 37 class AudioSource; |
38 class VoEWrapper; | 38 class VoEWrapper; |
39 class WebRtcVoiceMediaChannel; | 39 class WebRtcVoiceMediaChannel; |
40 | 40 |
| 41 struct SendCodecSpec { |
| 42 SendCodecSpec() { |
| 43 webrtc::CodecInst empty_inst = {0}; |
| 44 codec_inst = empty_inst; |
| 45 codec_inst.pltype = -1; |
| 46 } |
| 47 bool operator==(const SendCodecSpec& rhs) const; |
| 48 bool operator!=(const SendCodecSpec& rhs) const; |
| 49 |
| 50 bool nack_enabled = false; |
| 51 bool transport_cc_enabled = false; |
| 52 bool enable_codec_fec = false; |
| 53 bool enable_opus_dtx = false; |
| 54 int opus_max_playback_rate = 0; |
| 55 int red_payload_type = -1; |
| 56 int cng_payload_type = -1; |
| 57 int cng_plfreq = -1; |
| 58 webrtc::CodecInst codec_inst; |
| 59 }; |
| 60 |
41 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. | 61 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. |
42 // It uses the WebRtc VoiceEngine library for audio handling. | 62 // It uses the WebRtc VoiceEngine library for audio handling. |
43 class WebRtcVoiceEngine final : public webrtc::TraceCallback { | 63 class WebRtcVoiceEngine final : public webrtc::TraceCallback { |
44 friend class WebRtcVoiceMediaChannel; | 64 friend class WebRtcVoiceMediaChannel; |
45 public: | 65 public: |
46 // Exposed for the WVoE/MC unit test. | 66 // Exposed for the WVoE/MC unit test. |
47 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); | 67 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); |
48 | 68 |
49 WebRtcVoiceEngine( | 69 WebRtcVoiceEngine( |
50 webrtc::AudioDeviceModule* adm, | 70 webrtc::AudioDeviceModule* adm, |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; | 297 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; |
278 | 298 |
279 class WebRtcAudioSendStream; | 299 class WebRtcAudioSendStream; |
280 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; | 300 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; |
281 std::vector<webrtc::RtpExtension> send_rtp_extensions_; | 301 std::vector<webrtc::RtpExtension> send_rtp_extensions_; |
282 | 302 |
283 class WebRtcAudioReceiveStream; | 303 class WebRtcAudioReceiveStream; |
284 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 304 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
285 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 305 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
286 | 306 |
287 struct SendCodecSpec { | 307 SendCodecSpec send_codec_spec_; |
288 SendCodecSpec() { | |
289 webrtc::CodecInst empty_inst = {0}; | |
290 codec_inst = empty_inst; | |
291 codec_inst.pltype = -1; | |
292 } | |
293 bool nack_enabled = false; | |
294 bool transport_cc_enabled = false; | |
295 bool enable_codec_fec = false; | |
296 bool enable_opus_dtx = false; | |
297 int opus_max_playback_rate = 0; | |
298 int cng_payload_type = -1; | |
299 int cng_plfreq = -1; | |
300 webrtc::CodecInst codec_inst; | |
301 } send_codec_spec_; | |
302 | 308 |
303 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 309 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
304 }; | 310 }; |
305 } // namespace cricket | 311 } // namespace cricket |
306 | 312 |
307 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 313 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |