Chromium Code Reviews| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 const AudioOptions& options, | 139 const AudioOptions& options, |
| 140 webrtc::Call* call); | 140 webrtc::Call* call); |
| 141 ~WebRtcVoiceMediaChannel() override; | 141 ~WebRtcVoiceMediaChannel() override; |
| 142 | 142 |
| 143 const AudioOptions& options() const { return options_; } | 143 const AudioOptions& options() const { return options_; } |
| 144 | 144 |
| 145 rtc::DiffServCodePoint PreferredDscp() const override; | 145 rtc::DiffServCodePoint PreferredDscp() const override; |
| 146 | 146 |
| 147 bool SetSendParameters(const AudioSendParameters& params) override; | 147 bool SetSendParameters(const AudioSendParameters& params) override; |
| 148 bool SetRecvParameters(const AudioRecvParameters& params) override; | 148 bool SetRecvParameters(const AudioRecvParameters& params) override; |
| 149 webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const override; | |
| 150 bool SetRtpParameters(uint32_t ssrc, | |
| 151 const webrtc::RtpParameters& parameters) override; | |
| 152 | |
| 149 bool SetPlayout(bool playout) override; | 153 bool SetPlayout(bool playout) override; |
| 150 bool PausePlayout(); | 154 bool PausePlayout(); |
| 151 bool ResumePlayout(); | 155 bool ResumePlayout(); |
| 152 void SetSend(bool send) override; | 156 void SetSend(bool send) override; |
| 153 bool SetAudioSend(uint32_t ssrc, | 157 bool SetAudioSend(uint32_t ssrc, |
| 154 bool enable, | 158 bool enable, |
| 155 const AudioOptions* options, | 159 const AudioOptions* options, |
| 156 AudioSource* source) override; | 160 AudioSource* source) override; |
| 157 bool AddSendStream(const StreamParams& sp) override; | 161 bool AddSendStream(const StreamParams& sp) override; |
| 158 bool RemoveSendStream(uint32_t ssrc) override; | 162 bool RemoveSendStream(uint32_t ssrc) override; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); | 203 return VoiceMediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
| 200 } | 204 } |
| 201 | 205 |
| 202 int GetReceiveChannelId(uint32_t ssrc) const; | 206 int GetReceiveChannelId(uint32_t ssrc) const; |
| 203 int GetSendChannelId(uint32_t ssrc) const; | 207 int GetSendChannelId(uint32_t ssrc) const; |
| 204 | 208 |
| 205 private: | 209 private: |
| 206 bool SetOptions(const AudioOptions& options); | 210 bool SetOptions(const AudioOptions& options); |
| 207 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); | 211 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); |
| 208 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); | 212 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); |
| 209 bool SetSendCodecs(int channel); | 213 bool SetSendCodecs(int channel, const webrtc::RtpParameters& rtp_parameters); |
|
pthatcher1
2016/04/12 18:04:23
Should this be SetChannelSendCodecsAndParameters?
| |
| 210 void SetNack(int channel, bool nack_enabled); | 214 void SetNack(int channel, bool nack_enabled); |
| 211 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); | 215 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); |
| 212 bool SetMaxSendBandwidth(int bps); | |
| 213 bool SetLocalSource(uint32_t ssrc, AudioSource* source); | 216 bool SetLocalSource(uint32_t ssrc, AudioSource* source); |
| 214 bool MuteStream(uint32_t ssrc, bool mute); | 217 bool MuteStream(uint32_t ssrc, bool mute); |
| 215 | 218 |
| 216 WebRtcVoiceEngine* engine() { return engine_; } | 219 WebRtcVoiceEngine* engine() { return engine_; } |
| 217 int GetLastEngineError() { return engine()->GetLastEngineError(); } | 220 int GetLastEngineError() { return engine()->GetLastEngineError(); } |
| 218 int GetOutputLevel(int channel); | 221 int GetOutputLevel(int channel); |
| 219 bool SetPlayout(int channel, bool playout); | 222 bool SetPlayout(int channel, bool playout); |
| 220 bool ChangePlayout(bool playout); | 223 bool ChangePlayout(bool playout); |
| 221 int CreateVoEChannel(); | 224 int CreateVoEChannel(); |
| 222 bool DeleteVoEChannel(int channel); | 225 bool DeleteVoEChannel(int channel); |
| 223 bool IsDefaultRecvStream(uint32_t ssrc) { | 226 bool IsDefaultRecvStream(uint32_t ssrc) { |
| 224 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); | 227 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); |
| 225 } | 228 } |
| 226 bool SetSendBitrateInternal(int bps); | 229 bool SetSendBitrate(int bps); |
| 230 bool SetChannelParameters(int channel, | |
| 231 const webrtc::RtpParameters& parameters); | |
|
pthatcher1
2016/04/12 18:04:23
Shouldn't this be called SetChannelSendParameters?
| |
| 232 bool SetSendBitrate(int channel, int bps); | |
|
pthatcher1
2016/04/12 18:04:23
And should this be SetChannelSendBitrate?
| |
| 227 bool HasSendCodec() const { | 233 bool HasSendCodec() const { |
| 228 return send_codec_spec_.codec_inst.pltype != -1; | 234 return send_codec_spec_.codec_inst.pltype != -1; |
| 229 } | 235 } |
| 236 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); | |
| 230 | 237 |
| 231 rtc::ThreadChecker worker_thread_checker_; | 238 rtc::ThreadChecker worker_thread_checker_; |
| 232 | 239 |
| 233 WebRtcVoiceEngine* const engine_ = nullptr; | 240 WebRtcVoiceEngine* const engine_ = nullptr; |
| 234 std::vector<AudioCodec> recv_codecs_; | 241 std::vector<AudioCodec> recv_codecs_; |
| 235 bool send_bitrate_setting_ = false; | |
| 236 int send_bitrate_bps_ = 0; | 242 int send_bitrate_bps_ = 0; |
| 237 AudioOptions options_; | 243 AudioOptions options_; |
| 238 rtc::Optional<int> dtmf_payload_type_; | 244 rtc::Optional<int> dtmf_payload_type_; |
| 239 bool desired_playout_ = false; | 245 bool desired_playout_ = false; |
| 240 bool recv_transport_cc_enabled_ = false; | 246 bool recv_transport_cc_enabled_ = false; |
| 241 bool playout_ = false; | 247 bool playout_ = false; |
| 242 bool send_ = false; | 248 bool send_ = false; |
| 243 webrtc::Call* const call_ = nullptr; | 249 webrtc::Call* const call_ = nullptr; |
| 244 | 250 |
| 245 // SSRC of unsignalled receive stream, or -1 if there isn't one. | 251 // SSRC of unsignalled receive stream, or -1 if there isn't one. |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 276 int cng_payload_type = -1; | 282 int cng_payload_type = -1; |
| 277 int cng_plfreq = -1; | 283 int cng_plfreq = -1; |
| 278 webrtc::CodecInst codec_inst; | 284 webrtc::CodecInst codec_inst; |
| 279 } send_codec_spec_; | 285 } send_codec_spec_; |
| 280 | 286 |
| 281 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 287 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
| 282 }; | 288 }; |
| 283 } // namespace cricket | 289 } // namespace cricket |
| 284 | 290 |
| 285 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 291 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
| OLD | NEW |