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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 return ret; | 111 return ret; |
112 } | 112 } |
113 // Try to instantiate software codec. | 113 // Try to instantiate software codec. |
114 if (InitFallbackEncoder()) { | 114 if (InitFallbackEncoder()) { |
115 return WEBRTC_VIDEO_CODEC_OK; | 115 return WEBRTC_VIDEO_CODEC_OK; |
116 } | 116 } |
117 // Software encoder failed, use original return code. | 117 // Software encoder failed, use original return code. |
118 return ret; | 118 return ret; |
119 } | 119 } |
120 | 120 |
| 121 QualityScaler::Settings |
| 122 VideoEncoderSoftwareFallbackWrapper::GetQPThresholds() const { |
| 123 return encoder_->GetQPThresholds(); |
| 124 } |
| 125 |
121 int32_t VideoEncoderSoftwareFallbackWrapper::RegisterEncodeCompleteCallback( | 126 int32_t VideoEncoderSoftwareFallbackWrapper::RegisterEncodeCompleteCallback( |
122 EncodedImageCallback* callback) { | 127 EncodedImageCallback* callback) { |
123 callback_ = callback; | 128 callback_ = callback; |
124 int32_t ret = encoder_->RegisterEncodeCompleteCallback(callback); | 129 int32_t ret = encoder_->RegisterEncodeCompleteCallback(callback); |
125 if (fallback_encoder_) | 130 if (fallback_encoder_) |
126 return fallback_encoder_->RegisterEncodeCompleteCallback(callback); | 131 return fallback_encoder_->RegisterEncodeCompleteCallback(callback); |
127 return ret; | 132 return ret; |
128 } | 133 } |
129 | 134 |
130 int32_t VideoEncoderSoftwareFallbackWrapper::Release() { | 135 int32_t VideoEncoderSoftwareFallbackWrapper::Release() { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 return encoder_->OnDroppedFrame(); | 185 return encoder_->OnDroppedFrame(); |
181 } | 186 } |
182 | 187 |
183 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const { | 188 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const { |
184 if (fallback_encoder_) | 189 if (fallback_encoder_) |
185 return fallback_encoder_->SupportsNativeHandle(); | 190 return fallback_encoder_->SupportsNativeHandle(); |
186 return encoder_->SupportsNativeHandle(); | 191 return encoder_->SupportsNativeHandle(); |
187 } | 192 } |
188 | 193 |
189 } // namespace webrtc | 194 } // namespace webrtc |
OLD | NEW |