| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // SetSendCodec succeeded, _encoder should be set. | 109 // SetSendCodec succeeded, _encoder should be set. |
| 110 RTC_DCHECK(_encoder); | 110 RTC_DCHECK(_encoder); |
| 111 | 111 |
| 112 int numLayers; | 112 int numLayers; |
| 113 if (sendCodec->codecType == kVideoCodecVP8) { | 113 if (sendCodec->codecType == kVideoCodecVP8) { |
| 114 numLayers = sendCodec->codecSpecific.VP8.numberOfTemporalLayers; | 114 numLayers = sendCodec->VP8().numberOfTemporalLayers; |
| 115 } else if (sendCodec->codecType == kVideoCodecVP9) { | 115 } else if (sendCodec->codecType == kVideoCodecVP9) { |
| 116 numLayers = sendCodec->codecSpecific.VP9.numberOfTemporalLayers; | 116 numLayers = sendCodec->VP9().numberOfTemporalLayers; |
| 117 } else { | 117 } else { |
| 118 numLayers = 1; | 118 numLayers = 1; |
| 119 } | 119 } |
| 120 | 120 |
| 121 // If we have screensharing and we have layers, we disable frame dropper. | 121 // If we have screensharing and we have layers, we disable frame dropper. |
| 122 bool disable_frame_dropper = | 122 bool disable_frame_dropper = |
| 123 numLayers > 1 && sendCodec->mode == kScreensharing; | 123 numLayers > 1 && sendCodec->mode == kScreensharing; |
| 124 if (disable_frame_dropper) { | 124 if (disable_frame_dropper) { |
| 125 _mediaOpt.EnableFrameDropper(false); | 125 _mediaOpt.EnableFrameDropper(false); |
| 126 } else if (frame_dropper_enabled_) { | 126 } else if (frame_dropper_enabled_) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // 10 kbps. | 382 // 10 kbps. |
| 383 int window_bps = std::max(threshold_bps / 10, 10000); | 383 int window_bps = std::max(threshold_bps / 10, 10000); |
| 384 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); | 384 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); |
| 385 } | 385 } |
| 386 | 386 |
| 387 bool VideoSender::VideoSuspended() const { | 387 bool VideoSender::VideoSuspended() const { |
| 388 return _mediaOpt.IsVideoSuspended(); | 388 return _mediaOpt.IsVideoSuspended(); |
| 389 } | 389 } |
| 390 } // namespace vcm | 390 } // namespace vcm |
| 391 } // namespace webrtc | 391 } // namespace webrtc |
| OLD | NEW |