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

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

Issue 1604563002: Add send-side BWE to WebRtcVoiceEngine under a finch experiment. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed one more comment. Created 4 years, 10 months 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 | « talk/media/base/codec.cc ('k') | talk/media/webrtc/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 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool SetSendCodecs(const std::vector<AudioCodec>& codecs); 227 bool SetSendCodecs(const std::vector<AudioCodec>& codecs);
228 bool SetOptions(const AudioOptions& options); 228 bool SetOptions(const AudioOptions& options);
229 bool SetMaxSendBandwidth(int bps); 229 bool SetMaxSendBandwidth(int bps);
230 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs); 230 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
231 bool SetLocalRenderer(uint32_t ssrc, AudioRenderer* renderer); 231 bool SetLocalRenderer(uint32_t ssrc, AudioRenderer* renderer);
232 bool MuteStream(uint32_t ssrc, bool mute); 232 bool MuteStream(uint32_t ssrc, bool mute);
233 233
234 WebRtcVoiceEngine* engine() { return engine_; } 234 WebRtcVoiceEngine* engine() { return engine_; }
235 int GetLastEngineError() { return engine()->GetLastEngineError(); } 235 int GetLastEngineError() { return engine()->GetLastEngineError(); }
236 int GetOutputLevel(int channel); 236 int GetOutputLevel(int channel);
237 bool GetRedSendCodec(const AudioCodec& red_codec,
238 const std::vector<AudioCodec>& all_codecs,
239 webrtc::CodecInst* send_codec);
240 bool SetPlayout(int channel, bool playout); 237 bool SetPlayout(int channel, bool playout);
241 void SetNack(int channel, bool nack_enabled); 238 void SetNack(int channel, bool nack_enabled);
242 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); 239 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
243 bool ChangePlayout(bool playout); 240 bool ChangePlayout(bool playout);
244 bool ChangeSend(SendFlags send); 241 bool ChangeSend(SendFlags send);
245 bool ChangeSend(int channel, SendFlags send); 242 bool ChangeSend(int channel, SendFlags send);
246 int CreateVoEChannel(); 243 int CreateVoEChannel();
247 bool DeleteVoEChannel(int channel); 244 bool DeleteVoEChannel(int channel);
248 bool IsDefaultRecvStream(uint32_t ssrc) { 245 bool IsDefaultRecvStream(uint32_t ssrc) {
249 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); 246 return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
250 } 247 }
251 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); 248 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs);
252 bool SetSendBitrateInternal(int bps); 249 bool SetSendBitrateInternal(int bps);
253 250
254 rtc::ThreadChecker worker_thread_checker_; 251 rtc::ThreadChecker worker_thread_checker_;
255 252
256 WebRtcVoiceEngine* const engine_ = nullptr; 253 WebRtcVoiceEngine* const engine_ = nullptr;
257 std::vector<AudioCodec> recv_codecs_; 254 std::vector<AudioCodec> recv_codecs_;
258 std::vector<AudioCodec> send_codecs_; 255 std::vector<AudioCodec> send_codecs_;
259 rtc::scoped_ptr<webrtc::CodecInst> send_codec_; 256 rtc::scoped_ptr<webrtc::CodecInst> send_codec_;
260 bool send_bitrate_setting_ = false; 257 bool send_bitrate_setting_ = false;
261 int send_bitrate_bps_ = 0; 258 int send_bitrate_bps_ = 0;
262 AudioOptions options_; 259 AudioOptions options_;
263 rtc::Optional<int> dtmf_payload_type_; 260 rtc::Optional<int> dtmf_payload_type_;
264 bool desired_playout_ = false; 261 bool desired_playout_ = false;
265 bool nack_enabled_ = false; 262 bool nack_enabled_ = false;
263 bool transport_cc_enabled_ = false;
266 bool playout_ = false; 264 bool playout_ = false;
267 SendFlags desired_send_ = SEND_NOTHING; 265 SendFlags desired_send_ = SEND_NOTHING;
268 SendFlags send_ = SEND_NOTHING; 266 SendFlags send_ = SEND_NOTHING;
269 webrtc::Call* const call_ = nullptr; 267 webrtc::Call* const call_ = nullptr;
270 268
271 // SSRC of unsignalled receive stream, or -1 if there isn't one. 269 // SSRC of unsignalled receive stream, or -1 if there isn't one.
272 int64_t default_recv_ssrc_ = -1; 270 int64_t default_recv_ssrc_ = -1;
273 // Volume for unsignalled stream, which may be set before the stream exists. 271 // Volume for unsignalled stream, which may be set before the stream exists.
274 double default_recv_volume_ = 1.0; 272 double default_recv_volume_ = 1.0;
275 // Sink for unsignalled stream, which may be set before the stream exists. 273 // Sink for unsignalled stream, which may be set before the stream exists.
276 rtc::scoped_ptr<webrtc::AudioSinkInterface> default_sink_; 274 rtc::scoped_ptr<webrtc::AudioSinkInterface> default_sink_;
277 // Default SSRC to use for RTCP receiver reports in case of no signaled 275 // Default SSRC to use for RTCP receiver reports in case of no signaled
278 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740 276 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
279 // and https://code.google.com/p/chromium/issues/detail?id=547661 277 // and https://code.google.com/p/chromium/issues/detail?id=547661
280 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; 278 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
281 279
282 class WebRtcAudioSendStream; 280 class WebRtcAudioSendStream;
283 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; 281 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
284 std::vector<webrtc::RtpExtension> send_rtp_extensions_; 282 std::vector<webrtc::RtpExtension> send_rtp_extensions_;
285 283
286 class WebRtcAudioReceiveStream; 284 class WebRtcAudioReceiveStream;
287 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; 285 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
288 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 286 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
289 287
290 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); 288 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
291 }; 289 };
292 } // namespace cricket 290 } // namespace cricket
293 291
294 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ 292 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
OLDNEW
« no previous file with comments | « talk/media/base/codec.cc ('k') | talk/media/webrtc/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698