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