OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |