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 16 matching lines...) Expand all Loading... |
27 #include "webrtc/config.h" | 27 #include "webrtc/config.h" |
28 #include "webrtc/media/base/rtputils.h" | 28 #include "webrtc/media/base/rtputils.h" |
29 #include "webrtc/media/engine/webrtccommon.h" | 29 #include "webrtc/media/engine/webrtccommon.h" |
30 #include "webrtc/media/engine/webrtcvoe.h" | 30 #include "webrtc/media/engine/webrtcvoe.h" |
31 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 31 #include "webrtc/modules/audio_processing/include/audio_processing.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 AudioMixer; | |
38 class AudioSource; | 37 class AudioSource; |
39 class VoEWrapper; | 38 class VoEWrapper; |
40 class WebRtcVoiceMediaChannel; | 39 class WebRtcVoiceMediaChannel; |
41 | 40 |
42 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. | 41 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. |
43 // It uses the WebRtc VoiceEngine library for audio handling. | 42 // It uses the WebRtc VoiceEngine library for audio handling. |
44 class WebRtcVoiceEngine final : public webrtc::TraceCallback { | 43 class WebRtcVoiceEngine final : public webrtc::TraceCallback { |
45 friend class WebRtcVoiceMediaChannel; | 44 friend class WebRtcVoiceMediaChannel; |
46 public: | 45 public: |
47 // Exposed for the WVoE/MC unit test. | 46 // Exposed for the WVoE/MC unit test. |
48 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); | 47 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); |
49 | 48 |
50 WebRtcVoiceEngine( | 49 WebRtcVoiceEngine( |
51 webrtc::AudioDeviceModule* adm, | 50 webrtc::AudioDeviceModule* adm, |
52 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory, | 51 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory); |
53 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer); | |
54 // Dependency injection for testing. | 52 // Dependency injection for testing. |
55 WebRtcVoiceEngine( | 53 WebRtcVoiceEngine( |
56 webrtc::AudioDeviceModule* adm, | 54 webrtc::AudioDeviceModule* adm, |
57 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory, | 55 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& decoder_factory, |
58 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer, | |
59 VoEWrapper* voe_wrapper); | 56 VoEWrapper* voe_wrapper); |
60 ~WebRtcVoiceEngine() override; | 57 ~WebRtcVoiceEngine() override; |
61 | 58 |
62 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; | 59 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; |
63 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 60 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
64 const MediaConfig& config, | 61 const MediaConfig& config, |
65 const AudioOptions& options); | 62 const AudioOptions& options); |
66 | 63 |
67 int GetInputLevel(); | 64 int GetInputLevel(); |
68 | 65 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 279 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
283 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 280 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
284 | 281 |
285 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; | 282 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; |
286 | 283 |
287 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 284 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
288 }; | 285 }; |
289 } // namespace cricket | 286 } // namespace cricket |
290 | 287 |
291 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 288 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |