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

Side by Side Diff: webrtc/video_encoder.h

Issue 1328863002: Allow encoders to fall back dynamically to software. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 5 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
« no previous file with comments | « webrtc/video/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const CodecSpecificInfo* codec_specific_info, 149 const CodecSpecificInfo* codec_specific_info,
150 const std::vector<FrameType>* frame_types) override; 150 const std::vector<FrameType>* frame_types) override;
151 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; 151 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
152 152
153 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override; 153 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override;
154 void OnDroppedFrame() override; 154 void OnDroppedFrame() override;
155 int GetTargetFramerate() override; 155 int GetTargetFramerate() override;
156 bool SupportsNativeHandle() const override; 156 bool SupportsNativeHandle() const override;
157 157
158 private: 158 private:
159 bool InitFallbackEncoder();
160
161 // Settings used in the last InitEncode call and used if a dynamic fallback to
162 // software is required.
163 VideoCodec codec_settings_;
164 int32_t number_of_cores_;
165 size_t max_payload_size_;
166
167 // The last bitrate/framerate set, and a flag for noting they are set.
168 bool rates_set_;
169 uint32_t bitrate_;
170 uint32_t framerate_;
171
172 // The last channel parameters set, and a flag for noting they are set.
173 bool channel_parameters_set_;
174 uint32_t packet_loss_;
175 int64_t rtt_;
176
159 const EncoderType encoder_type_; 177 const EncoderType encoder_type_;
160 webrtc::VideoEncoder* const encoder_; 178 webrtc::VideoEncoder* const encoder_;
161 179
162 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_; 180 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_;
163 EncodedImageCallback* callback_; 181 EncodedImageCallback* callback_;
164 }; 182 };
165 } // namespace webrtc 183 } // namespace webrtc
166 #endif // WEBRTC_VIDEO_ENCODER_H_ 184 #endif // WEBRTC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_encoder_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698