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

Unified Diff: remoting/codec/video_encoder_vpx.h

Issue 1908203002: Adapt encoder behavior to target bitrate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: remoting/codec/video_encoder_vpx.h
diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h
index a6701093b2cba402396c217b20cb9317614e9c16..6d76af45afa596576de238e7aed117e6fb936585 100644
--- a/remoting/codec/video_encoder_vpx.h
+++ b/remoting/codec/video_encoder_vpx.h
@@ -14,6 +14,7 @@
#include "remoting/codec/scoped_vpx_codec.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/codec/video_encoder_helper.h"
+#include "third_party/libvpx/source/libvpx/vpx/vpx_encoder.h"
typedef struct vpx_image vpx_image_t;
@@ -39,6 +40,7 @@ class VideoEncoderVpx : public VideoEncoder {
void SetLosslessColor(bool want_lossless) override;
std::unique_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame,
uint32_t flags) override;
+ void UpdateTargetBitrate(uint32_t bitrate) override;
private:
explicit VideoEncoderVpx(bool use_vp9);
@@ -71,6 +73,9 @@ class VideoEncoderVpx : public VideoEncoder {
// Holds the initialized & configured codec.
ScopedVpxCodec codec_;
+ vpx_codec_enc_cfg_t config_;
+ uint32_t target_bitrate_kbps_;
+
// Used to generate zero-based frame timestamps.
base::TimeTicks timestamp_base_;

Powered by Google App Engine
This is Rietveld 408576698