Index: webrtc/test/fake_encoder.h |
diff --git a/webrtc/test/fake_encoder.h b/webrtc/test/fake_encoder.h |
index e3878ecd4a78daefae1807b418cc16174faee49f..06c19467151e4c03ed5cab2668b129839c01b78b 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(); |
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]; |
+ |
+ // Keeps a history a byte debts to be payed over a number of frames. |
+ // The debt is acquired by keyframes overshooting the bitrate target. |
+ std::deque<size_t> debt_bytes_; |
}; |
class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback { |