| 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 |
| 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "webrtc/api/audio/audio_mixer.h" |
| 19 #include "webrtc/api/call/audio_state.h" | 20 #include "webrtc/api/call/audio_state.h" |
| 20 #include "webrtc/base/buffer.h" | 21 #include "webrtc/base/buffer.h" |
| 21 #include "webrtc/base/constructormagic.h" | 22 #include "webrtc/base/constructormagic.h" |
| 22 #include "webrtc/base/networkroute.h" | 23 #include "webrtc/base/networkroute.h" |
| 23 #include "webrtc/base/scoped_ref_ptr.h" | 24 #include "webrtc/base/scoped_ref_ptr.h" |
| 24 #include "webrtc/base/stream.h" | 25 #include "webrtc/base/stream.h" |
| 25 #include "webrtc/base/thread_checker.h" | 26 #include "webrtc/base/thread_checker.h" |
| 26 #include "webrtc/call.h" | 27 #include "webrtc/call.h" |
| 27 #include "webrtc/config.h" | 28 #include "webrtc/config.h" |
| 28 #include "webrtc/media/base/rtputils.h" | 29 #include "webrtc/media/base/rtputils.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 282 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
| 280 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 283 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 281 | 284 |
| 282 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; | 285 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; |
| 283 | 286 |
| 284 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 287 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
| 285 }; | 288 }; |
| 286 } // namespace cricket | 289 } // namespace cricket |
| 287 | 290 |
| 288 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 291 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |