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

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

Issue 2001533003: Refactoring: Hide VideoCodec.codecSpecific as "private" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 1 month 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 LOG(LS_ERROR) << "Failed to initialize set encoder with payload name '" 96 LOG(LS_ERROR) << "Failed to initialize set encoder with payload name '"
97 << sendCodec->plName << "'."; 97 << sendCodec->plName << "'.";
98 return VCM_CODEC_ERROR; 98 return VCM_CODEC_ERROR;
99 } 99 }
100 100
101 // SetSendCodec succeeded, _encoder should be set. 101 // SetSendCodec succeeded, _encoder should be set.
102 RTC_DCHECK(_encoder); 102 RTC_DCHECK(_encoder);
103 103
104 int numLayers; 104 int numLayers;
105 if (sendCodec->codecType == kVideoCodecVP8) { 105 if (sendCodec->codecType == kVideoCodecVP8) {
106 numLayers = sendCodec->codecSpecific.VP8.numberOfTemporalLayers; 106 numLayers = sendCodec->VP8().numberOfTemporalLayers;
107 } else if (sendCodec->codecType == kVideoCodecVP9) { 107 } else if (sendCodec->codecType == kVideoCodecVP9) {
108 numLayers = sendCodec->codecSpecific.VP9.numberOfTemporalLayers; 108 numLayers = sendCodec->VP9().numberOfTemporalLayers;
109 } else { 109 } else {
110 numLayers = 1; 110 numLayers = 1;
111 } 111 }
112 112
113 // If we have screensharing and we have layers, we disable frame dropper. 113 // If we have screensharing and we have layers, we disable frame dropper.
114 bool disable_frame_dropper = 114 bool disable_frame_dropper =
115 numLayers > 1 && sendCodec->mode == kScreensharing; 115 numLayers > 1 && sendCodec->mode == kScreensharing;
116 if (disable_frame_dropper) { 116 if (disable_frame_dropper) {
117 _mediaOpt.EnableFrameDropper(false); 117 _mediaOpt.EnableFrameDropper(false);
118 } else if (frame_dropper_enabled_) { 118 } else if (frame_dropper_enabled_) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 351
352 int32_t VideoSender::EnableFrameDropper(bool enable) { 352 int32_t VideoSender::EnableFrameDropper(bool enable) {
353 rtc::CritScope lock(&encoder_crit_); 353 rtc::CritScope lock(&encoder_crit_);
354 frame_dropper_enabled_ = enable; 354 frame_dropper_enabled_ = enable;
355 _mediaOpt.EnableFrameDropper(enable); 355 _mediaOpt.EnableFrameDropper(enable);
356 return VCM_OK; 356 return VCM_OK;
357 } 357 }
358 } // namespace vcm 358 } // namespace vcm
359 } // namespace webrtc 359 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc ('k') | webrtc/modules/video_coding/video_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698