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

Side by Side Diff: webrtc/config.h

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: Rebased 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) 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 private: 173 private:
174 VideoCodecVP9 specifics_; 174 VideoCodecVP9 specifics_;
175 }; 175 };
176 176
177 enum class ContentType { 177 enum class ContentType {
178 kRealtimeVideo, 178 kRealtimeVideo,
179 kScreen, 179 kScreen,
180 }; 180 };
181 181
182 class VideoStreamFactoryInterface : public rtc::RefCountInterface {
183 public:
184 // An implementation should return a std::vector<VideoStream> with the
185 // wanted VideoStream settings for the given video resolution.
186 // The size of the vector may not be larger than
187 // |encoder_config.number_of_streams|.
188 virtual std::vector<VideoStream> CreateEncoderStreams(
189 int width,
190 int height,
191 const VideoEncoderConfig& encoder_config) = 0;
192
193 protected:
194 virtual ~VideoStreamFactoryInterface() {}
195 };
196
182 VideoEncoderConfig& operator=(VideoEncoderConfig&&) = default; 197 VideoEncoderConfig& operator=(VideoEncoderConfig&&) = default;
183 VideoEncoderConfig& operator=(const VideoEncoderConfig&) = delete; 198 VideoEncoderConfig& operator=(const VideoEncoderConfig&) = delete;
184 199
185 // Mostly used by tests. Avoid creating copies if you can. 200 // Mostly used by tests. Avoid creating copies if you can.
186 VideoEncoderConfig Copy() const { return VideoEncoderConfig(*this); } 201 VideoEncoderConfig Copy() const { return VideoEncoderConfig(*this); }
187 202
188 VideoEncoderConfig(); 203 VideoEncoderConfig();
189 VideoEncoderConfig(VideoEncoderConfig&&) = default; 204 VideoEncoderConfig(VideoEncoderConfig&&) = default;
190 ~VideoEncoderConfig(); 205 ~VideoEncoderConfig();
191 std::string ToString() const; 206 std::string ToString() const;
192 207
193 std::vector<VideoStream> streams; 208 rtc::scoped_refptr<VideoStreamFactoryInterface> encoder_stream_factory;
194 std::vector<SpatialLayer> spatial_layers; 209 std::vector<SpatialLayer> spatial_layers;
195 ContentType content_type; 210 ContentType content_type;
196 rtc::scoped_refptr<const EncoderSpecificSettings> encoder_specific_settings; 211 rtc::scoped_refptr<const EncoderSpecificSettings> encoder_specific_settings;
197 212
198 // Padding will be used up to this bitrate regardless of the bitrate produced 213 // Padding will be used up to this bitrate regardless of the bitrate produced
199 // by the encoder. Padding above what's actually produced by the encoder helps 214 // by the encoder. Padding above what's actually produced by the encoder helps
200 // maintaining a higher bitrate estimate. Padding will however not be sent 215 // maintaining a higher bitrate estimate. Padding will however not be sent
201 // unless the estimated bandwidth indicates that the link can handle it. 216 // unless the estimated bandwidth indicates that the link can handle it.
202 int min_transmit_bitrate_bps; 217 int min_transmit_bitrate_bps;
203 bool expect_encode_from_texture; 218 int max_bitrate_bps;
219
220 // Max number of encoded VideoStreams to produce.
221 size_t number_of_streams;
204 222
205 private: 223 private:
206 // Access to the copy constructor is private to force use of the Copy() 224 // Access to the copy constructor is private to force use of the Copy()
207 // method for those exceptional cases where we do use it. 225 // method for those exceptional cases where we do use it.
208 VideoEncoderConfig(const VideoEncoderConfig&) = default; 226 VideoEncoderConfig(const VideoEncoderConfig&) = default;
209 }; 227 };
210 228
211 struct VideoDecoderH264Settings { 229 struct VideoDecoderH264Settings {
212 std::string sprop_parameter_sets; 230 std::string sprop_parameter_sets;
213 }; 231 };
214 232
215 class DecoderSpecificSettings { 233 class DecoderSpecificSettings {
216 public: 234 public:
217 virtual ~DecoderSpecificSettings() {} 235 virtual ~DecoderSpecificSettings() {}
218 rtc::Optional<VideoDecoderH264Settings> h264_extra_settings; 236 rtc::Optional<VideoDecoderH264Settings> h264_extra_settings;
219 }; 237 };
220 238
221 } // namespace webrtc 239 } // namespace webrtc
222 240
223 #endif // WEBRTC_CONFIG_H_ 241 #endif // WEBRTC_CONFIG_H_
OLDNEW
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | webrtc/config.cc » ('j') | webrtc/test/encoder_settings.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698