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

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

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed changes in call dir and leave that in a separate CL. Created 4 years, 8 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 | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/p2p/base/candidatepairinterface.h » ('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 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2325 2325
2326 // SR may continue RR and any RR entry may correspond to any one of the send 2326 // SR may continue RR and any RR entry may correspond to any one of the send
2327 // channels. So all RTCP packets must be forwarded all send channels. VoE 2327 // channels. So all RTCP packets must be forwarded all send channels. VoE
2328 // will filter out RR internally. 2328 // will filter out RR internally.
2329 for (const auto& ch : send_streams_) { 2329 for (const auto& ch : send_streams_) {
2330 engine()->voe()->network()->ReceivedRTCPPacket( 2330 engine()->voe()->network()->ReceivedRTCPPacket(
2331 ch.second->channel(), packet->cdata(), packet->size()); 2331 ch.second->channel(), packet->cdata(), packet->size());
2332 } 2332 }
2333 } 2333 }
2334 2334
2335 void WebRtcVoiceMediaChannel::OnNetworkRouteChanged(
2336 const std::string& transport_name,
2337 const NetworkRoute& network_route) {
2338 // TODO(honghaiz): uncomment this once the function in call is implemented.
2339 // call_->OnNetworkRouteChanged(transport_name, network_route);
2340 }
2341
2335 bool WebRtcVoiceMediaChannel::MuteStream(uint32_t ssrc, bool muted) { 2342 bool WebRtcVoiceMediaChannel::MuteStream(uint32_t ssrc, bool muted) {
2336 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2343 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2337 int channel = GetSendChannelId(ssrc); 2344 int channel = GetSendChannelId(ssrc);
2338 if (channel == -1) { 2345 if (channel == -1) {
2339 LOG(LS_WARNING) << "The specified ssrc " << ssrc << " is not in use."; 2346 LOG(LS_WARNING) << "The specified ssrc " << ssrc << " is not in use.";
2340 return false; 2347 return false;
2341 } 2348 }
2342 if (engine()->voe()->volume()->SetInputMute(channel, muted) == -1) { 2349 if (engine()->voe()->volume()->SetInputMute(channel, muted) == -1) {
2343 LOG_RTCERR2(SetInputMute, channel, muted); 2350 LOG_RTCERR2(SetInputMute, channel, muted);
2344 return false; 2351 return false;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 } 2555 }
2549 } else { 2556 } else {
2550 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2557 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2551 engine()->voe()->base()->StopPlayout(channel); 2558 engine()->voe()->base()->StopPlayout(channel);
2552 } 2559 }
2553 return true; 2560 return true;
2554 } 2561 }
2555 } // namespace cricket 2562 } // namespace cricket
2556 2563
2557 #endif // HAVE_WEBRTC_VOICE 2564 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/p2p/base/candidatepairinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698