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 explicit WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm); | 69 explicit WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm); |
50 // Dependency injection for testing. | 70 // Dependency injection for testing. |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; | 290 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; |
271 | 291 |
272 class WebRtcAudioSendStream; | 292 class WebRtcAudioSendStream; |
273 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; | 293 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; |
274 std::vector<webrtc::RtpExtension> send_rtp_extensions_; | 294 std::vector<webrtc::RtpExtension> send_rtp_extensions_; |
275 | 295 |
276 class WebRtcAudioReceiveStream; | 296 class WebRtcAudioReceiveStream; |
277 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 297 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
278 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 298 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
279 | 299 |
280 struct SendCodecSpec { | 300 SendCodecSpec send_codec_spec_; |
281 SendCodecSpec() { | |
282 webrtc::CodecInst empty_inst = {0}; | |
283 codec_inst = empty_inst; | |
284 codec_inst.pltype = -1; | |
285 } | |
286 bool nack_enabled = false; | |
287 bool transport_cc_enabled = false; | |
288 bool enable_codec_fec = false; | |
289 bool enable_opus_dtx = false; | |
290 int opus_max_playback_rate = 0; | |
291 int red_payload_type = -1; | |
292 int cng_payload_type = -1; | |
293 int cng_plfreq = -1; | |
294 webrtc::CodecInst codec_inst; | |
295 } send_codec_spec_; | |
296 | 301 |
297 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 302 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
298 }; | 303 }; |
299 } // namespace cricket | 304 } // namespace cricket |
300 | 305 |
301 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 306 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |