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

Side by Side Diff: webrtc/modules/video_coding/main/source/video_sender.cc

Issue 1351693005: Read the number of TLs for VP9 too + cleanup (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Reverting all frame dropping related changes Created 5 years, 2 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 | « no previous file | webrtc/video/video_loopback.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Cache the current codec here so they can be fetched from this thread 99 // Cache the current codec here so they can be fetched from this thread
100 // without requiring the _sendCritSect lock. 100 // without requiring the _sendCritSect lock.
101 current_codec_ = *sendCodec; 101 current_codec_ = *sendCodec;
102 102
103 if (!ret) { 103 if (!ret) {
104 LOG(LS_ERROR) << "Failed to initialize set encoder with payload name '" 104 LOG(LS_ERROR) << "Failed to initialize set encoder with payload name '"
105 << sendCodec->plName << "'."; 105 << sendCodec->plName << "'.";
106 return VCM_CODEC_ERROR; 106 return VCM_CODEC_ERROR;
107 } 107 }
108 108
109 int numLayers = (sendCodec->codecType != kVideoCodecVP8) 109 int numLayers;
110 ? 1 110 if (sendCodec->codecType == kVideoCodecVP8) {
111 : sendCodec->codecSpecific.VP8.numberOfTemporalLayers; 111 numLayers = sendCodec->codecSpecific.VP8.numberOfTemporalLayers;
112 } else if (sendCodec->codecType == kVideoCodecVP9) {
113 numLayers = sendCodec->codecSpecific.VP9.numberOfTemporalLayers;
114 } else {
115 numLayers = 1;
116 }
117
112 // If we have screensharing and we have layers, we disable frame dropper. 118 // If we have screensharing and we have layers, we disable frame dropper.
113 bool disable_frame_dropper = 119 bool disable_frame_dropper =
114 numLayers > 1 && sendCodec->mode == kScreensharing; 120 numLayers > 1 && sendCodec->mode == kScreensharing;
115 if (disable_frame_dropper) { 121 if (disable_frame_dropper) {
116 _mediaOpt.EnableFrameDropper(false); 122 _mediaOpt.EnableFrameDropper(false);
117 } else if (frame_dropper_enabled_) { 123 } else if (frame_dropper_enabled_) {
118 _mediaOpt.EnableFrameDropper(true); 124 _mediaOpt.EnableFrameDropper(true);
119 } 125 }
120 _nextFrameTypes.clear(); 126 _nextFrameTypes.clear();
121 _nextFrameTypes.resize(VCM_MAX(sendCodec->numberOfSimulcastStreams, 1), 127 _nextFrameTypes.resize(VCM_MAX(sendCodec->numberOfSimulcastStreams, 1),
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 int window_bps = std::max(threshold_bps / 10, 10000); 387 int window_bps = std::max(threshold_bps / 10, 10000);
382 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); 388 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps);
383 } 389 }
384 390
385 bool VideoSender::VideoSuspended() const { 391 bool VideoSender::VideoSuspended() const {
386 rtc::CritScope lock(&send_crit_); 392 rtc::CritScope lock(&send_crit_);
387 return _mediaOpt.IsVideoSuspended(); 393 return _mediaOpt.IsVideoSuspended();
388 } 394 }
389 } // namespace vcm 395 } // namespace vcm
390 } // namespace webrtc 396 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/video_loopback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698