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/base/buffer.h" | 19 #include "webrtc/base/buffer.h" |
20 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
21 #include "webrtc/base/networkroute.h" | 21 #include "webrtc/base/networkroute.h" |
22 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
23 #include "webrtc/base/thread_checker.h" | 23 #include "webrtc/base/thread_checker.h" |
24 #include "webrtc/call/audio_state.h" | 24 #include "webrtc/call/audio_state.h" |
25 #include "webrtc/call/call.h" | 25 #include "webrtc/call/call.h" |
26 #include "webrtc/config.h" | 26 #include "webrtc/config.h" |
27 #include "webrtc/media/base/rtputils.h" | 27 #include "webrtc/media/base/rtputils.h" |
28 #include "webrtc/media/engine/webrtccommon.h" | 28 #include "webrtc/media/engine/webrtccommon.h" |
29 #include "webrtc/media/engine/webrtcvoe.h" | 29 #include "webrtc/media/engine/webrtcvoe.h" |
| 30 #include "webrtc/modules/audio_coding/codecs/audio_encoder_factory.h" |
30 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 31 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
31 #include "webrtc/pc/channel.h" | 32 #include "webrtc/pc/channel.h" |
32 | 33 |
33 namespace webrtc { | 34 namespace webrtc { |
34 namespace voe { | 35 namespace voe { |
35 class TransmitMixer; | 36 class TransmitMixer; |
36 } // namespace voe | 37 } // namespace voe |
37 } // namespace webrtc | 38 } // namespace webrtc |
38 | 39 |
39 namespace cricket { | 40 namespace cricket { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 107 |
107 // webrtc::TraceCallback: | 108 // webrtc::TraceCallback: |
108 void Print(webrtc::TraceLevel level, const char* trace, int length) override; | 109 void Print(webrtc::TraceLevel level, const char* trace, int length) override; |
109 | 110 |
110 void StartAecDump(const std::string& filename); | 111 void StartAecDump(const std::string& filename); |
111 int CreateVoEChannel(); | 112 int CreateVoEChannel(); |
112 webrtc::AudioDeviceModule* adm(); | 113 webrtc::AudioDeviceModule* adm(); |
113 webrtc::AudioProcessing* apm(); | 114 webrtc::AudioProcessing* apm(); |
114 webrtc::voe::TransmitMixer* transmit_mixer(); | 115 webrtc::voe::TransmitMixer* transmit_mixer(); |
115 | 116 |
116 AudioCodecs CollectRecvCodecs() const; | 117 AudioCodecs CollectCodecs( |
| 118 const std::vector<webrtc::AudioCodecSpec>& specs) const; |
117 | 119 |
118 rtc::ThreadChecker signal_thread_checker_; | 120 rtc::ThreadChecker signal_thread_checker_; |
119 rtc::ThreadChecker worker_thread_checker_; | 121 rtc::ThreadChecker worker_thread_checker_; |
120 | 122 |
121 // The audio device manager. | 123 // The audio device manager. |
122 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; | 124 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; |
| 125 rtc::scoped_refptr<webrtc::AudioEncoderFactory> encoder_factory_; |
123 rtc::scoped_refptr<webrtc::AudioDecoderFactory> decoder_factory_; | 126 rtc::scoped_refptr<webrtc::AudioDecoderFactory> decoder_factory_; |
124 // Reference to the APM, owned by VoE. | 127 // Reference to the APM, owned by VoE. |
125 webrtc::AudioProcessing* apm_ = nullptr; | 128 webrtc::AudioProcessing* apm_ = nullptr; |
126 // Reference to the TransmitMixer, owned by VoE. | 129 // Reference to the TransmitMixer, owned by VoE. |
127 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; | 130 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; |
128 // The primary instance of WebRtc VoiceEngine. | 131 // The primary instance of WebRtc VoiceEngine. |
129 std::unique_ptr<VoEWrapper> voe_wrapper_; | 132 std::unique_ptr<VoEWrapper> voe_wrapper_; |
130 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 133 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
131 std::vector<AudioCodec> send_codecs_; | 134 std::vector<AudioCodec> send_codecs_; |
132 std::vector<AudioCodec> recv_codecs_; | 135 std::vector<AudioCodec> recv_codecs_; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; | 280 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; |
278 | 281 |
279 class WebRtcAudioSendStream; | 282 class WebRtcAudioSendStream; |
280 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; | 283 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; |
281 std::vector<webrtc::RtpExtension> send_rtp_extensions_; | 284 std::vector<webrtc::RtpExtension> send_rtp_extensions_; |
282 | 285 |
283 class WebRtcAudioReceiveStream; | 286 class WebRtcAudioReceiveStream; |
284 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 287 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
285 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 288 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
286 | 289 |
287 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; | 290 rtc::Optional<webrtc::AudioSendStream::Config::SendCodecSpec> |
| 291 send_codec_spec_; |
288 | 292 |
289 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
290 }; | 294 }; |
291 } // namespace cricket | 295 } // namespace cricket |
292 | 296 |
293 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 297 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |