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

Unified Diff: webrtc/config.h

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: fix line ending. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/config.h
diff --git a/webrtc/config.h b/webrtc/config.h
index 9303f548e7299d857447970f0208d2e476665a76..3758fc2ef3cfb7624ddef2e86b4cff0bf21d0815 100644
--- a/webrtc/config.h
+++ b/webrtc/config.h
@@ -17,6 +17,8 @@
#include <vector>
#include "webrtc/base/optional.h"
+#include "webrtc/base/refcount.h"
+#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/typedefs.h"
@@ -130,6 +132,21 @@ struct VideoEncoderConfig {
kScreen,
};
+ class VideoStreamFactoryInterface : public rtc::RefCountInterface {
+ public:
+ // An implementation should return a std::vector<VideoStream> with the
+ // wanted VideoStream settings for the given video resolution.
+ // The size of the vector may not be larger than
+ // |encoder_config.number_of_streams|.
+ virtual std::vector<VideoStream> CreateEncoderStreams(
+ int width,
+ int height,
+ const VideoEncoderConfig& encoder_config) = 0;
+
+ protected:
+ virtual ~VideoStreamFactoryInterface() {}
+ };
+
VideoEncoderConfig& operator=(VideoEncoderConfig&&) = default;
VideoEncoderConfig& operator=(const VideoEncoderConfig&) = delete;
@@ -141,7 +158,7 @@ struct VideoEncoderConfig {
~VideoEncoderConfig();
std::string ToString() const;
- std::vector<VideoStream> streams;
+ rtc::scoped_refptr<VideoStreamFactoryInterface> encoder_stream_factory;
perkj_webrtc 2016/09/27 13:45:17 renamed video_stream_factory.
std::vector<SpatialLayer> spatial_layers;
ContentType content_type;
void* encoder_specific_settings;
@@ -151,7 +168,10 @@ struct VideoEncoderConfig {
// maintaining a higher bitrate estimate. Padding will however not be sent
// unless the estimated bandwidth indicates that the link can handle it.
int min_transmit_bitrate_bps;
- bool expect_encode_from_texture;
+ int max_bitrate_bps;
+
+ // Max number of encoded VideoStreams to produce.
+ size_t number_of_streams;
private:
// Access to the copy constructor is private to force use of the Copy()

Powered by Google App Engine
This is Rietveld 408576698