OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return ret; | 130 return ret; |
131 } | 131 } |
132 // Try to instantiate software codec. | 132 // Try to instantiate software codec. |
133 if (InitFallbackEncoder()) { | 133 if (InitFallbackEncoder()) { |
134 return WEBRTC_VIDEO_CODEC_OK; | 134 return WEBRTC_VIDEO_CODEC_OK; |
135 } | 135 } |
136 // Software encoder failed, use original return code. | 136 // Software encoder failed, use original return code. |
137 return ret; | 137 return ret; |
138 } | 138 } |
139 | 139 |
| 140 QualityScaler::Settings VideoEncoderSoftwareFallbackWrapper::GetQPThresholds() |
| 141 const { |
| 142 return encoder_->GetQPThresholds(); |
| 143 } |
| 144 |
140 int32_t VideoEncoderSoftwareFallbackWrapper::RegisterEncodeCompleteCallback( | 145 int32_t VideoEncoderSoftwareFallbackWrapper::RegisterEncodeCompleteCallback( |
141 EncodedImageCallback* callback) { | 146 EncodedImageCallback* callback) { |
142 callback_ = callback; | 147 callback_ = callback; |
143 int32_t ret = encoder_->RegisterEncodeCompleteCallback(callback); | 148 int32_t ret = encoder_->RegisterEncodeCompleteCallback(callback); |
144 if (fallback_encoder_) | 149 if (fallback_encoder_) |
145 return fallback_encoder_->RegisterEncodeCompleteCallback(callback); | 150 return fallback_encoder_->RegisterEncodeCompleteCallback(callback); |
146 return ret; | 151 return ret; |
147 } | 152 } |
148 | 153 |
149 int32_t VideoEncoderSoftwareFallbackWrapper::Release() { | 154 int32_t VideoEncoderSoftwareFallbackWrapper::Release() { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 return encoder_->OnDroppedFrame(); | 211 return encoder_->OnDroppedFrame(); |
207 } | 212 } |
208 | 213 |
209 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const { | 214 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const { |
210 if (fallback_encoder_) | 215 if (fallback_encoder_) |
211 return fallback_encoder_->SupportsNativeHandle(); | 216 return fallback_encoder_->SupportsNativeHandle(); |
212 return encoder_->SupportsNativeHandle(); | 217 return encoder_->SupportsNativeHandle(); |
213 } | 218 } |
214 | 219 |
215 } // namespace webrtc | 220 } // namespace webrtc |
OLD | NEW |