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

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

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 9 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 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 webrtc::MediaType::VIDEO, 1344 webrtc::MediaType::VIDEO,
1345 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), 1345 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(),
1346 webrtc_packet_time); 1346 webrtc_packet_time);
1347 } 1347 }
1348 1348
1349 void WebRtcVideoChannel2::OnReadyToSend(bool ready) { 1349 void WebRtcVideoChannel2::OnReadyToSend(bool ready) {
1350 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); 1350 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready.");
1351 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); 1351 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown);
1352 } 1352 }
1353 1353
1354 void WebRtcVideoChannel2::OnNetworkChanged(int local_net_id,
1355 int remote_net_id) {
1356 call_->OnNetworkChanged(local_net_id, remote_net_id);
1357 }
1358
1354 bool WebRtcVideoChannel2::MuteStream(uint32_t ssrc, bool mute) { 1359 bool WebRtcVideoChannel2::MuteStream(uint32_t ssrc, bool mute) {
1355 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> " 1360 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> "
1356 << (mute ? "mute" : "unmute"); 1361 << (mute ? "mute" : "unmute");
1357 RTC_DCHECK(ssrc != 0); 1362 RTC_DCHECK(ssrc != 0);
1358 rtc::CritScope stream_lock(&stream_crit_); 1363 rtc::CritScope stream_lock(&stream_crit_);
1359 const auto& kv = send_streams_.find(ssrc); 1364 const auto& kv = send_streams_.find(ssrc);
1360 if (kv == send_streams_.end()) { 1365 if (kv == send_streams_.end()) {
1361 LOG(LS_ERROR) << "No sending stream on ssrc " << ssrc; 1366 LOG(LS_ERROR) << "No sending stream on ssrc " << ssrc;
1362 return false; 1367 return false;
1363 } 1368 }
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 rtx_mapping[video_codecs[i].codec.id] != 2522 rtx_mapping[video_codecs[i].codec.id] !=
2518 fec_settings.red_payload_type) { 2523 fec_settings.red_payload_type) {
2519 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2524 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2520 } 2525 }
2521 } 2526 }
2522 2527
2523 return video_codecs; 2528 return video_codecs;
2524 } 2529 }
2525 2530
2526 } // namespace cricket 2531 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698