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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); | 238 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); |
239 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 239 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
240 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters); | 240 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters); |
241 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); | 241 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); |
242 bool SetLocalSource(uint32_t ssrc, AudioSource* source); | 242 bool SetLocalSource(uint32_t ssrc, AudioSource* source); |
243 bool MuteStream(uint32_t ssrc, bool mute); | 243 bool MuteStream(uint32_t ssrc, bool mute); |
244 | 244 |
245 WebRtcVoiceEngine* engine() { return engine_; } | 245 WebRtcVoiceEngine* engine() { return engine_; } |
246 int GetLastEngineError() { return engine()->GetLastEngineError(); } | 246 int GetLastEngineError() { return engine()->GetLastEngineError(); } |
247 int GetOutputLevel(int channel); | 247 int GetOutputLevel(int channel); |
248 void ChangePlayout(bool playout); | |
249 int CreateVoEChannel(); | 248 int CreateVoEChannel(); |
250 bool DeleteVoEChannel(int channel); | 249 bool DeleteVoEChannel(int channel); |
251 bool IsDefaultRecvStream(uint32_t ssrc) { | 250 bool IsDefaultRecvStream(uint32_t ssrc) { |
252 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); | 251 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); |
253 } | 252 } |
254 bool SetMaxSendBitrate(int bps); | 253 bool SetMaxSendBitrate(int bps); |
255 bool SetChannelSendParameters(int channel, | 254 bool SetChannelSendParameters(int channel, |
256 const webrtc::RtpParameters& parameters); | 255 const webrtc::RtpParameters& parameters); |
257 bool SetMaxSendBitrate(int channel, int bps); | 256 bool SetMaxSendBitrate(int channel, int bps); |
258 bool HasSendCodec() const { | 257 bool HasSendCodec() const { |
259 return send_codec_spec_.codec_inst.pltype != -1; | 258 return send_codec_spec_.codec_inst.pltype != -1; |
260 } | 259 } |
261 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); | 260 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); |
262 void SetupRecording(); | 261 void SetupRecording(); |
263 | 262 |
264 rtc::ThreadChecker worker_thread_checker_; | 263 rtc::ThreadChecker worker_thread_checker_; |
265 | 264 |
266 WebRtcVoiceEngine* const engine_ = nullptr; | 265 WebRtcVoiceEngine* const engine_ = nullptr; |
267 std::vector<AudioCodec> send_codecs_; | 266 std::vector<AudioCodec> send_codecs_; |
268 std::vector<AudioCodec> recv_codecs_; | 267 std::vector<AudioCodec> recv_codecs_; |
269 int max_send_bitrate_bps_ = 0; | 268 int max_send_bitrate_bps_ = 0; |
270 AudioOptions options_; | 269 AudioOptions options_; |
271 rtc::Optional<int> dtmf_payload_type_; | 270 rtc::Optional<int> dtmf_payload_type_; |
272 bool desired_playout_ = false; | |
273 bool recv_transport_cc_enabled_ = false; | 271 bool recv_transport_cc_enabled_ = false; |
274 bool recv_nack_enabled_ = false; | 272 bool recv_nack_enabled_ = false; |
275 bool playout_ = false; | 273 bool playout_ = false; |
276 bool send_ = false; | 274 bool send_ = false; |
277 webrtc::Call* const call_ = nullptr; | 275 webrtc::Call* const call_ = nullptr; |
278 | 276 |
279 // SSRC of unsignalled receive stream, or -1 if there isn't one. | 277 // SSRC of unsignalled receive stream, or -1 if there isn't one. |
280 int64_t default_recv_ssrc_ = -1; | 278 int64_t default_recv_ssrc_ = -1; |
281 // Volume for unsignalled stream, which may be set before the stream exists. | 279 // Volume for unsignalled stream, which may be set before the stream exists. |
282 double default_recv_volume_ = 1.0; | 280 double default_recv_volume_ = 1.0; |
(...skipping 12 matching lines...) Expand all Loading... |
295 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 293 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
296 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 294 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
297 | 295 |
298 SendCodecSpec send_codec_spec_; | 296 SendCodecSpec send_codec_spec_; |
299 | 297 |
300 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 298 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
301 }; | 299 }; |
302 } // namespace cricket | 300 } // namespace cricket |
303 | 301 |
304 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 302 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |