| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 int GetReceiveChannelId(uint32_t ssrc) const; | 211 int GetReceiveChannelId(uint32_t ssrc) const; |
| 212 int GetSendChannelId(uint32_t ssrc) const; | 212 int GetSendChannelId(uint32_t ssrc) const; |
| 213 | 213 |
| 214 private: | 214 private: |
| 215 bool SetOptions(const AudioOptions& options); | 215 bool SetOptions(const AudioOptions& options); |
| 216 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); | 216 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); |
| 217 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 217 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
| 218 bool SetSendCodecs(int channel); | 218 bool SetSendCodecs(int channel); |
| 219 void SetNack(int channel, bool nack_enabled); | 219 void SetNack(int channel, bool nack_enabled); |
| 220 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); | 220 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); |
| 221 bool SetMaxSendBandwidth(int bps); | 221 bool SetMaxSendBitrate(rtc::Optional<int> bps); |
| 222 bool SetLocalSource(uint32_t ssrc, AudioSource* source); | 222 bool SetLocalSource(uint32_t ssrc, AudioSource* source); |
| 223 bool MuteStream(uint32_t ssrc, bool mute); | 223 bool MuteStream(uint32_t ssrc, bool mute); |
| 224 | 224 |
| 225 WebRtcVoiceEngine* engine() { return engine_; } | 225 WebRtcVoiceEngine* engine() { return engine_; } |
| 226 int GetLastEngineError() { return engine()->GetLastEngineError(); } | 226 int GetLastEngineError() { return engine()->GetLastEngineError(); } |
| 227 int GetOutputLevel(int channel); | 227 int GetOutputLevel(int channel); |
| 228 bool SetPlayout(int channel, bool playout); | 228 bool SetPlayout(int channel, bool playout); |
| 229 bool ChangePlayout(bool playout); | 229 bool ChangePlayout(bool playout); |
| 230 int CreateVoEChannel(); | 230 int CreateVoEChannel(); |
| 231 bool DeleteVoEChannel(int channel); | 231 bool DeleteVoEChannel(int channel); |
| 232 bool IsDefaultRecvStream(uint32_t ssrc) { | 232 bool IsDefaultRecvStream(uint32_t ssrc) { |
| 233 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); | 233 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); |
| 234 } | 234 } |
| 235 bool SetSendBitrateInternal(int bps); | 235 bool SetSendBitrateInternal(rtc::Optional<int> bps); |
| 236 bool HasSendCodec() const { | 236 bool HasSendCodec() const { |
| 237 return send_codec_spec_.codec_inst.pltype != -1; | 237 return send_codec_spec_.codec_inst.pltype != -1; |
| 238 } | 238 } |
| 239 | 239 |
| 240 rtc::ThreadChecker worker_thread_checker_; | 240 rtc::ThreadChecker worker_thread_checker_; |
| 241 | 241 |
| 242 WebRtcVoiceEngine* const engine_ = nullptr; | 242 WebRtcVoiceEngine* const engine_ = nullptr; |
| 243 std::vector<AudioCodec> recv_codecs_; | 243 std::vector<AudioCodec> recv_codecs_; |
| 244 bool send_bitrate_setting_ = false; | 244 rtc::Optional<int> send_bitrate_bps_; |
| 245 int send_bitrate_bps_ = 0; | |
| 246 AudioOptions options_; | 245 AudioOptions options_; |
| 247 rtc::Optional<int> dtmf_payload_type_; | 246 rtc::Optional<int> dtmf_payload_type_; |
| 248 bool desired_playout_ = false; | 247 bool desired_playout_ = false; |
| 249 bool recv_transport_cc_enabled_ = false; | 248 bool recv_transport_cc_enabled_ = false; |
| 250 bool playout_ = false; | 249 bool playout_ = false; |
| 251 bool send_ = false; | 250 bool send_ = false; |
| 252 webrtc::Call* const call_ = nullptr; | 251 webrtc::Call* const call_ = nullptr; |
| 253 | 252 |
| 254 // SSRC of unsignalled receive stream, or -1 if there isn't one. | 253 // SSRC of unsignalled receive stream, or -1 if there isn't one. |
| 255 int64_t default_recv_ssrc_ = -1; | 254 int64_t default_recv_ssrc_ = -1; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 285 int cng_payload_type = -1; | 284 int cng_payload_type = -1; |
| 286 int cng_plfreq = -1; | 285 int cng_plfreq = -1; |
| 287 webrtc::CodecInst codec_inst; | 286 webrtc::CodecInst codec_inst; |
| 288 } send_codec_spec_; | 287 } send_codec_spec_; |
| 289 | 288 |
| 290 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 289 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
| 291 }; | 290 }; |
| 292 } // namespace cricket | 291 } // namespace cricket |
| 293 | 292 |
| 294 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 293 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |