| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); | 230 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
| 231 } | 231 } |
| 232 | 232 |
| 233 int GetReceiveChannelId(uint32_t ssrc) const; | 233 int GetReceiveChannelId(uint32_t ssrc) const; |
| 234 int GetSendChannelId(uint32_t ssrc) const; | 234 int GetSendChannelId(uint32_t ssrc) const; |
| 235 | 235 |
| 236 private: | 236 private: |
| 237 bool SetOptions(const AudioOptions& options); | 237 bool SetOptions(const AudioOptions& options); |
| 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); | |
| 241 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); | |
| 242 bool SetLocalSource(uint32_t ssrc, AudioSource* source); | 240 bool SetLocalSource(uint32_t ssrc, AudioSource* source); |
| 243 bool MuteStream(uint32_t ssrc, bool mute); | 241 bool MuteStream(uint32_t ssrc, bool mute); |
| 244 | 242 |
| 245 WebRtcVoiceEngine* engine() { return engine_; } | 243 WebRtcVoiceEngine* engine() { return engine_; } |
| 246 int GetLastEngineError() { return engine()->GetLastEngineError(); } | 244 int GetLastEngineError() { return engine()->GetLastEngineError(); } |
| 247 int GetOutputLevel(int channel); | 245 int GetOutputLevel(int channel); |
| 248 void ChangePlayout(bool playout); | 246 void ChangePlayout(bool playout); |
| 249 int CreateVoEChannel(); | 247 int CreateVoEChannel(); |
| 250 bool DeleteVoEChannel(int channel); | 248 bool DeleteVoEChannel(int channel); |
| 251 bool IsDefaultRecvStream(uint32_t ssrc) { | 249 bool IsDefaultRecvStream(uint32_t ssrc) { |
| 252 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); | 250 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); |
| 253 } | 251 } |
| 254 bool SetMaxSendBitrate(int bps); | 252 bool SetMaxSendBitrate(int bps); |
| 255 bool SetChannelSendParameters(int channel, | |
| 256 const webrtc::RtpParameters& parameters); | |
| 257 bool SetMaxSendBitrate(int channel, int bps); | |
| 258 bool HasSendCodec() const { | |
| 259 return send_codec_spec_.codec_inst.pltype != -1; | |
| 260 } | |
| 261 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); | 253 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); |
| 262 void SetupRecording(); | 254 void SetupRecording(); |
| 263 | 255 |
| 264 rtc::ThreadChecker worker_thread_checker_; | 256 rtc::ThreadChecker worker_thread_checker_; |
| 265 | 257 |
| 266 WebRtcVoiceEngine* const engine_ = nullptr; | 258 WebRtcVoiceEngine* const engine_ = nullptr; |
| 267 std::vector<AudioCodec> send_codecs_; | 259 std::vector<AudioCodec> send_codecs_; |
| 268 std::vector<AudioCodec> recv_codecs_; | 260 std::vector<AudioCodec> recv_codecs_; |
| 269 int max_send_bitrate_bps_ = 0; | 261 int max_send_bitrate_bps_ = 0; |
| 270 AudioOptions options_; | 262 AudioOptions options_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 295 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 287 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
| 296 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 288 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 297 | 289 |
| 298 SendCodecSpec send_codec_spec_; | 290 SendCodecSpec send_codec_spec_; |
| 299 | 291 |
| 300 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 292 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
| 301 }; | 293 }; |
| 302 } // namespace cricket | 294 } // namespace cricket |
| 303 | 295 |
| 304 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 296 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |