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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // ignored. This allows us to selectively turn on and off different options | 96 // ignored. This allows us to selectively turn on and off different options |
97 // easily at any time. | 97 // easily at any time. |
98 bool ApplyOptions(const AudioOptions& options); | 98 bool ApplyOptions(const AudioOptions& options); |
99 void SetDefaultDevices(); | 99 void SetDefaultDevices(); |
100 | 100 |
101 // webrtc::TraceCallback: | 101 // webrtc::TraceCallback: |
102 void Print(webrtc::TraceLevel level, const char* trace, int length) override; | 102 void Print(webrtc::TraceLevel level, const char* trace, int length) override; |
103 | 103 |
104 void StartAecDump(const std::string& filename); | 104 void StartAecDump(const std::string& filename); |
105 int CreateVoEChannel(); | 105 int CreateVoEChannel(); |
| 106 webrtc::AudioDeviceModule* adm(); |
106 | 107 |
107 rtc::ThreadChecker signal_thread_checker_; | 108 rtc::ThreadChecker signal_thread_checker_; |
108 rtc::ThreadChecker worker_thread_checker_; | 109 rtc::ThreadChecker worker_thread_checker_; |
109 | 110 |
110 // The audio device manager. | 111 // The audio device manager. |
111 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; | 112 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; |
112 // The primary instance of WebRtc VoiceEngine. | 113 // The primary instance of WebRtc VoiceEngine. |
113 std::unique_ptr<VoEWrapper> voe_wrapper_; | 114 std::unique_ptr<VoEWrapper> voe_wrapper_; |
114 rtc::scoped_refptr<webrtc::AudioState> audio_state_; | 115 rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
115 std::vector<AudioCodec> codecs_; | 116 std::vector<AudioCodec> codecs_; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 bool ChangePlayout(bool playout); | 221 bool ChangePlayout(bool playout); |
221 int CreateVoEChannel(); | 222 int CreateVoEChannel(); |
222 bool DeleteVoEChannel(int channel); | 223 bool DeleteVoEChannel(int channel); |
223 bool IsDefaultRecvStream(uint32_t ssrc) { | 224 bool IsDefaultRecvStream(uint32_t ssrc) { |
224 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); | 225 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); |
225 } | 226 } |
226 bool SetSendBitrateInternal(int bps); | 227 bool SetSendBitrateInternal(int bps); |
227 bool HasSendCodec() const { | 228 bool HasSendCodec() const { |
228 return send_codec_spec_.codec_inst.pltype != -1; | 229 return send_codec_spec_.codec_inst.pltype != -1; |
229 } | 230 } |
| 231 void SetupRecording(); |
230 | 232 |
231 rtc::ThreadChecker worker_thread_checker_; | 233 rtc::ThreadChecker worker_thread_checker_; |
232 | 234 |
233 WebRtcVoiceEngine* const engine_ = nullptr; | 235 WebRtcVoiceEngine* const engine_ = nullptr; |
234 std::vector<AudioCodec> recv_codecs_; | 236 std::vector<AudioCodec> recv_codecs_; |
235 bool send_bitrate_setting_ = false; | 237 bool send_bitrate_setting_ = false; |
236 int send_bitrate_bps_ = 0; | 238 int send_bitrate_bps_ = 0; |
237 AudioOptions options_; | 239 AudioOptions options_; |
238 rtc::Optional<int> dtmf_payload_type_; | 240 rtc::Optional<int> dtmf_payload_type_; |
239 bool desired_playout_ = false; | 241 bool desired_playout_ = false; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 int cng_payload_type = -1; | 278 int cng_payload_type = -1; |
277 int cng_plfreq = -1; | 279 int cng_plfreq = -1; |
278 webrtc::CodecInst codec_inst; | 280 webrtc::CodecInst codec_inst; |
279 } send_codec_spec_; | 281 } send_codec_spec_; |
280 | 282 |
281 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 283 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
282 }; | 284 }; |
283 } // namespace cricket | 285 } // namespace cricket |
284 | 286 |
285 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 287 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |