Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.h

Issue 2478433003: Revert of Removed the legacy behavior of stopping playout when setting new receive codecs. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
248 int CreateVoEChannel(); 249 int CreateVoEChannel();
249 bool DeleteVoEChannel(int channel); 250 bool DeleteVoEChannel(int channel);
250 bool IsDefaultRecvStream(uint32_t ssrc) { 251 bool IsDefaultRecvStream(uint32_t ssrc) {
251 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); 252 return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
252 } 253 }
253 bool SetMaxSendBitrate(int bps); 254 bool SetMaxSendBitrate(int bps);
254 bool SetChannelSendParameters(int channel, 255 bool SetChannelSendParameters(int channel,
255 const webrtc::RtpParameters& parameters); 256 const webrtc::RtpParameters& parameters);
256 bool SetMaxSendBitrate(int channel, int bps); 257 bool SetMaxSendBitrate(int channel, int bps);
257 bool HasSendCodec() const { 258 bool HasSendCodec() const {
258 return send_codec_spec_.codec_inst.pltype != -1; 259 return send_codec_spec_.codec_inst.pltype != -1;
259 } 260 }
260 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters); 261 bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
261 void SetupRecording(); 262 void SetupRecording();
262 263
263 rtc::ThreadChecker worker_thread_checker_; 264 rtc::ThreadChecker worker_thread_checker_;
264 265
265 WebRtcVoiceEngine* const engine_ = nullptr; 266 WebRtcVoiceEngine* const engine_ = nullptr;
266 std::vector<AudioCodec> send_codecs_; 267 std::vector<AudioCodec> send_codecs_;
267 std::vector<AudioCodec> recv_codecs_; 268 std::vector<AudioCodec> recv_codecs_;
268 int max_send_bitrate_bps_ = 0; 269 int max_send_bitrate_bps_ = 0;
269 AudioOptions options_; 270 AudioOptions options_;
270 rtc::Optional<int> dtmf_payload_type_; 271 rtc::Optional<int> dtmf_payload_type_;
272 bool desired_playout_ = false;
271 bool recv_transport_cc_enabled_ = false; 273 bool recv_transport_cc_enabled_ = false;
272 bool recv_nack_enabled_ = false; 274 bool recv_nack_enabled_ = false;
273 bool playout_ = false; 275 bool playout_ = false;
274 bool send_ = false; 276 bool send_ = false;
275 webrtc::Call* const call_ = nullptr; 277 webrtc::Call* const call_ = nullptr;
276 278
277 // SSRC of unsignalled receive stream, or -1 if there isn't one. 279 // SSRC of unsignalled receive stream, or -1 if there isn't one.
278 int64_t default_recv_ssrc_ = -1; 280 int64_t default_recv_ssrc_ = -1;
279 // Volume for unsignalled stream, which may be set before the stream exists. 281 // Volume for unsignalled stream, which may be set before the stream exists.
280 double default_recv_volume_ = 1.0; 282 double default_recv_volume_ = 1.0;
(...skipping 12 matching lines...) Expand all
293 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; 295 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
294 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 296 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
295 297
296 SendCodecSpec send_codec_spec_; 298 SendCodecSpec send_codec_spec_;
297 299
298 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); 300 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
299 }; 301 };
300 } // namespace cricket 302 } // namespace cricket
301 303
302 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ 304 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698