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

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: Created 5 years, 3 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) 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = (sendCodec->codecType != kVideoCodecVP8)
110 ? 1 110 ? sendCodec->codecSpecific.VP9.numberOfTemporalLayers
ivica 2015/09/22 11:15:36 This "int numLayers = ..." was written before VP9.
pbos-webrtc 2015/09/22 11:23:54 Check if codecType is kVideoCodecVP9 before using
ivica 2015/09/22 11:58:09 Done.
111 : sendCodec->codecSpecific.VP8.numberOfTemporalLayers; 111 : sendCodec->codecSpecific.VP8.numberOfTemporalLayers;
112 // If we have screensharing and we have layers, we disable frame dropper. 112 // If we have screensharing and we have layers, we disable frame dropper.
113 bool disable_frame_dropper = 113 bool disable_frame_dropper =
114 numLayers > 1 && sendCodec->mode == kScreensharing; 114 (numLayers > 1 && sendCodec->mode == kScreensharing) ||
115 sendCodec->forceDisableWrapperFrameDropper;
115 if (disable_frame_dropper) { 116 if (disable_frame_dropper) {
116 _mediaOpt.EnableFrameDropper(false); 117 _mediaOpt.EnableFrameDropper(false);
117 } else if (frame_dropper_enabled_) { 118 } else if (frame_dropper_enabled_) {
118 _mediaOpt.EnableFrameDropper(true); 119 _mediaOpt.EnableFrameDropper(true);
119 } 120 }
120 _nextFrameTypes.clear(); 121 _nextFrameTypes.clear();
121 _nextFrameTypes.resize(VCM_MAX(sendCodec->numberOfSimulcastStreams, 1), 122 _nextFrameTypes.resize(VCM_MAX(sendCodec->numberOfSimulcastStreams, 1),
122 kVideoFrameDelta); 123 kVideoFrameDelta);
123 124
124 _mediaOpt.SetEncodingData(sendCodec->codecType, 125 _mediaOpt.SetEncodingData(sendCodec->codecType,
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 int window_bps = std::max(threshold_bps / 10, 10000); 389 int window_bps = std::max(threshold_bps / 10, 10000);
389 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); 390 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps);
390 } 391 }
391 392
392 bool VideoSender::VideoSuspended() const { 393 bool VideoSender::VideoSuspended() const {
393 rtc::CritScope lock(&send_crit_); 394 rtc::CritScope lock(&send_crit_);
394 return _mediaOpt.IsVideoSuspended(); 395 return _mediaOpt.IsVideoSuspended();
395 } 396 }
396 } // namespace vcm 397 } // namespace vcm
397 } // namespace webrtc 398 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698