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 28 matching lines...) Expand all Loading... |
39 class WebRtcVoiceMediaChannel; | 39 class WebRtcVoiceMediaChannel; |
40 | 40 |
41 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. | 41 // WebRtcVoiceEngine is a class to be used with CompositeMediaEngine. |
42 // It uses the WebRtc VoiceEngine library for audio handling. | 42 // It uses the WebRtc VoiceEngine library for audio handling. |
43 class WebRtcVoiceEngine final : public webrtc::TraceCallback { | 43 class WebRtcVoiceEngine final : public webrtc::TraceCallback { |
44 friend class WebRtcVoiceMediaChannel; | 44 friend class WebRtcVoiceMediaChannel; |
45 public: | 45 public: |
46 // Exposed for the WVoE/MC unit test. | 46 // Exposed for the WVoE/MC unit test. |
47 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); | 47 static bool ToCodecInst(const AudioCodec& in, webrtc::CodecInst* out); |
48 | 48 |
49 explicit WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm); | 49 explicit WebRtcVoiceEngine( |
| 50 webrtc::AudioDeviceModule* adm, |
| 51 std::shared_ptr<webrtc::AudioDecoderFactory> decoder_factory); |
50 // Dependency injection for testing. | 52 // Dependency injection for testing. |
51 WebRtcVoiceEngine(webrtc::AudioDeviceModule* adm, VoEWrapper* voe_wrapper); | 53 WebRtcVoiceEngine( |
| 54 webrtc::AudioDeviceModule* adm, |
| 55 std::shared_ptr<webrtc::AudioDecoderFactory> decoder_factory, |
| 56 VoEWrapper* voe_wrapper); |
52 ~WebRtcVoiceEngine() override; | 57 ~WebRtcVoiceEngine() override; |
53 | 58 |
54 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; | 59 rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const; |
55 VoiceMediaChannel* CreateChannel(webrtc::Call* call, | 60 VoiceMediaChannel* CreateChannel(webrtc::Call* call, |
56 const MediaConfig& config, | 61 const MediaConfig& config, |
57 const AudioOptions& options); | 62 const AudioOptions& options); |
58 | 63 |
59 bool GetOutputVolume(int* level); | 64 bool GetOutputVolume(int* level); |
60 bool SetOutputVolume(int level); | 65 bool SetOutputVolume(int level); |
61 int GetInputLevel(); | 66 int GetInputLevel(); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 int cng_payload_type = -1; | 291 int cng_payload_type = -1; |
287 int cng_plfreq = -1; | 292 int cng_plfreq = -1; |
288 webrtc::CodecInst codec_inst; | 293 webrtc::CodecInst codec_inst; |
289 } send_codec_spec_; | 294 } send_codec_spec_; |
290 | 295 |
291 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 296 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
292 }; | 297 }; |
293 } // namespace cricket | 298 } // namespace cricket |
294 | 299 |
295 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 300 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |