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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h

Issue 2288223002: Extract simulcast rate allocation outside of video encoder. (Closed)
Patch Set: Rebase, handle pause case in simulcast wrapper 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/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
index be6aa59b6c6651a67c4193be40ba798a3ef86190..30d5abb6cc81fe4fcac53613347d60202f5d8def 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h
@@ -20,6 +20,8 @@
namespace webrtc {
+class SimulcastRateAllocator;
+
class VideoEncoderFactory {
public:
virtual VideoEncoder* Create() = 0;
@@ -91,22 +93,12 @@ class SimulcastEncoderAdapter : public VP8Encoder {
bool send_stream;
};
- // Get the stream bitrate, for the stream |stream_idx|, given the bitrate
- // |new_bitrate_kbit| and the actual configured stream count in
- // |total_number_of_streams|. The function also returns whether there's enough
- // bandwidth to send this stream via |send_stream|.
- uint32_t GetStreamBitrate(int stream_idx,
- size_t total_number_of_streams,
- uint32_t new_bitrate_kbit,
- bool* send_stream) const;
-
// Populate the codec settings for each stream.
void PopulateStreamCodec(const webrtc::VideoCodec* inst,
int stream_index,
- size_t total_number_of_streams,
+ uint32_t start_bitrate_kbps,
bool highest_resolution_stream,
- webrtc::VideoCodec* stream_codec,
- bool* send_stream);
+ webrtc::VideoCodec* stream_codec);
bool Initialized() const;
@@ -116,6 +108,7 @@ class SimulcastEncoderAdapter : public VP8Encoder {
std::vector<StreamInfo> streaminfos_;
EncodedImageCallback* encoded_complete_callback_;
std::string implementation_name_;
+ std::unique_ptr<SimulcastRateAllocator> rate_allocator_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/BUILD.gn ('k') | webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698