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

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: Created 4 years, 11 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
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, 237 const AudioCodec* GetRedSendCodec(
238 const std::vector<AudioCodec>& all_codecs, 238 const AudioCodec& red_codec,
239 webrtc::CodecInst* send_codec); 239 const std::vector<AudioCodec>& all_codecs) const;
240 bool SetPlayout(int channel, bool playout); 240 bool SetPlayout(int channel, bool playout);
241 void SetNack(int channel, bool nack_enabled); 241 void SetNack(int channel, bool nack_enabled);
242 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec); 242 bool SetSendCodec(int channel, const webrtc::CodecInst& send_codec);
243 bool ChangePlayout(bool playout); 243 bool ChangePlayout(bool playout);
244 bool ChangeSend(SendFlags send); 244 bool ChangeSend(SendFlags send);
245 bool ChangeSend(int channel, SendFlags send); 245 bool ChangeSend(int channel, SendFlags send);
246 int CreateVoEChannel(); 246 int CreateVoEChannel();
247 bool DeleteVoEChannel(int channel); 247 bool DeleteVoEChannel(int channel);
248 bool IsDefaultRecvStream(uint32_t ssrc) { 248 bool IsDefaultRecvStream(uint32_t ssrc) {
249 return default_recv_ssrc_ == static_cast<int64_t>(ssrc); 249 return default_recv_ssrc_ == static_cast<int64_t>(ssrc);
250 } 250 }
251 const AudioCodec* GetPreferredCodec(const std::vector<AudioCodec>& codecs,
252 webrtc::CodecInst* voe_codec,
253 int* red_payload_type) const;
251 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs); 254 bool SetSendCodecs(int channel, const std::vector<AudioCodec>& codecs);
252 bool SetSendBitrateInternal(int bps); 255 bool SetSendBitrateInternal(int bps);
253 256
254 rtc::ThreadChecker worker_thread_checker_; 257 rtc::ThreadChecker worker_thread_checker_;
255 258
256 WebRtcVoiceEngine* const engine_ = nullptr; 259 WebRtcVoiceEngine* const engine_ = nullptr;
257 std::vector<AudioCodec> recv_codecs_; 260 std::vector<AudioCodec> recv_codecs_;
258 std::vector<AudioCodec> send_codecs_; 261 std::vector<AudioCodec> send_codecs_;
259 rtc::scoped_ptr<webrtc::CodecInst> send_codec_; 262 rtc::scoped_ptr<webrtc::CodecInst> send_codec_;
260 bool send_bitrate_setting_ = false; 263 bool send_bitrate_setting_ = false;
261 int send_bitrate_bps_ = 0; 264 int send_bitrate_bps_ = 0;
262 AudioOptions options_; 265 AudioOptions options_;
263 rtc::Optional<int> dtmf_payload_type_; 266 rtc::Optional<int> dtmf_payload_type_;
264 bool desired_playout_ = false; 267 bool desired_playout_ = false;
265 bool nack_enabled_ = false; 268 bool nack_enabled_ = false;
269 bool transport_cc_enabled_ = false;
266 bool playout_ = false; 270 bool playout_ = false;
267 SendFlags desired_send_ = SEND_NOTHING; 271 SendFlags desired_send_ = SEND_NOTHING;
268 SendFlags send_ = SEND_NOTHING; 272 SendFlags send_ = SEND_NOTHING;
269 webrtc::Call* const call_ = nullptr; 273 webrtc::Call* const call_ = nullptr;
270 274
271 // SSRC of unsignalled receive stream, or -1 if there isn't one. 275 // SSRC of unsignalled receive stream, or -1 if there isn't one.
272 int64_t default_recv_ssrc_ = -1; 276 int64_t default_recv_ssrc_ = -1;
273 // Volume for unsignalled stream, which may be set before the stream exists. 277 // Volume for unsignalled stream, which may be set before the stream exists.
274 double default_recv_volume_ = 1.0; 278 double default_recv_volume_ = 1.0;
275 // Default SSRC to use for RTCP receiver reports in case of no signaled 279 // Default SSRC to use for RTCP receiver reports in case of no signaled
276 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740 280 // send streams. See: https://code.google.com/p/webrtc/issues/detail?id=4740
277 // and https://code.google.com/p/chromium/issues/detail?id=547661 281 // and https://code.google.com/p/chromium/issues/detail?id=547661
278 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u; 282 uint32_t receiver_reports_ssrc_ = 0xFA17FA17u;
279 283
280 class WebRtcAudioSendStream; 284 class WebRtcAudioSendStream;
281 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_; 285 std::map<uint32_t, WebRtcAudioSendStream*> send_streams_;
282 std::vector<webrtc::RtpExtension> send_rtp_extensions_; 286 std::vector<webrtc::RtpExtension> send_rtp_extensions_;
283 287
284 class WebRtcAudioReceiveStream; 288 class WebRtcAudioReceiveStream;
285 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; 289 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_;
286 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; 290 std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
287 291
288 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); 292 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel);
289 }; 293 };
290 } // namespace cricket 294 } // namespace cricket
291 295
292 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_ 296 #endif // TALK_MEDIA_WEBRTCVOICEENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698