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

Side by Side Diff: webrtc/video/video_encoder.cc

Issue 2434073003: Extract bitrate allocation of spatial/temporal layers out of codec impl. (Closed)
Patch Set: Updated tl listener registration. Fixed tests. Created 4 years, 2 months 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) 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 case kVideoCodecVP9: 60 case kVideoCodecVP9:
61 return VideoEncoder::kVp9; 61 return VideoEncoder::kVp9;
62 default: 62 default:
63 return VideoEncoder::kUnsupportedCodec; 63 return VideoEncoder::kUnsupportedCodec;
64 } 64 }
65 } 65 }
66 66
67 VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper( 67 VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
68 VideoCodecType codec_type, 68 VideoCodecType codec_type,
69 webrtc::VideoEncoder* encoder) 69 webrtc::VideoEncoder* encoder)
70 : rates_set_(false), 70 : number_of_cores_(0),
71 max_payload_size_(0),
72 rates_set_(false),
73 bitrate_(0),
74 framerate_(0),
71 channel_parameters_set_(false), 75 channel_parameters_set_(false),
76 packet_loss_(0),
77 rtt_(0),
72 encoder_type_(CodecToEncoderType(codec_type)), 78 encoder_type_(CodecToEncoderType(codec_type)),
73 encoder_(encoder), 79 encoder_(encoder),
74 callback_(nullptr) {} 80 callback_(nullptr) {}
75 81
76 bool VideoEncoderSoftwareFallbackWrapper::InitFallbackEncoder() { 82 bool VideoEncoderSoftwareFallbackWrapper::InitFallbackEncoder() {
77 if (!VideoEncoder::IsSupportedSoftware(encoder_type_)) { 83 if (!VideoEncoder::IsSupportedSoftware(encoder_type_)) {
78 LOG(LS_WARNING) 84 LOG(LS_WARNING)
79 << "Encoder requesting fallback to codec not supported in software."; 85 << "Encoder requesting fallback to codec not supported in software.";
80 return false; 86 return false;
81 } 87 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return encoder_->OnDroppedFrame(); 212 return encoder_->OnDroppedFrame();
207 } 213 }
208 214
209 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const { 215 bool VideoEncoderSoftwareFallbackWrapper::SupportsNativeHandle() const {
210 if (fallback_encoder_) 216 if (fallback_encoder_)
211 return fallback_encoder_->SupportsNativeHandle(); 217 return fallback_encoder_->SupportsNativeHandle();
212 return encoder_->SupportsNativeHandle(); 218 return encoder_->SupportsNativeHandle();
213 } 219 }
214 220
215 } // namespace webrtc 221 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698