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

Unified Diff: webrtc/test/fake_encoder.h

Issue 2883963002: Periodically update codec bit/frame rate settings. (Closed)
Patch Set: Dumb typo Created 3 years, 6 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
« no previous file with comments | « webrtc/modules/video_coding/video_sender.cc ('k') | webrtc/test/fake_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fake_encoder.h
diff --git a/webrtc/test/fake_encoder.h b/webrtc/test/fake_encoder.h
index e3878ecd4a78daefae1807b418cc16174faee49f..4487c52e1e7a6de294d2b1b3f69b3bb2270a91d7 100644
--- a/webrtc/test/fake_encoder.h
+++ b/webrtc/test/fake_encoder.h
@@ -45,6 +45,7 @@ class FakeEncoder : public VideoEncoder {
int32_t SetRateAllocation(const BitrateAllocation& rate_allocation,
uint32_t framerate) override;
const char* ImplementationName() const override;
+ int GetConfiguredInputFramerate() const;
static const char* kImplementationName;
@@ -53,11 +54,16 @@ class FakeEncoder : public VideoEncoder {
VideoCodec config_ GUARDED_BY(crit_sect_);
EncodedImageCallback* callback_ GUARDED_BY(crit_sect_);
BitrateAllocation target_bitrate_ GUARDED_BY(crit_sect_);
+ int configured_input_framerate_ GUARDED_BY(crit_sect_);
int max_target_bitrate_kbps_ GUARDED_BY(crit_sect_);
- int64_t last_encode_time_ms_ GUARDED_BY(crit_sect_);
+ bool pending_keyframe_ GUARDED_BY(crit_sect_);
rtc::CriticalSection crit_sect_;
uint8_t encoded_buffer_[100000];
+
+ // Current byte debt to be payed over a number of frames.
+ // The debt is acquired by keyframes overshooting the bitrate target.
+ size_t debt_bytes_;
};
class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback {
« no previous file with comments | « webrtc/modules/video_coding/video_sender.cc ('k') | webrtc/test/fake_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698