Make Frame buffer not drop frames unnecessary
Now VCMTiming::MaxWaitingTime will not clip negative values. Thus frame buffer will be able to distinguish between late frames and when waiting cycle was simply interrupted by a new inserted frame right before the waiting timer would expire. Bug: webrtc:8917 Change-Id: I6b253f459fcb3a346064a103cc92ee332b074e1b Reviewed-on: https://webrtc-review.googlesource.com/57741 Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22210}
This commit is contained in:
committed by
Commit Bot
parent
99a2c5dcb6
commit
8c4fe16e4c
@ -52,9 +52,9 @@ class VCMTimingFake : public VCMTiming {
|
||||
return last_ms_;
|
||||
}
|
||||
|
||||
uint32_t MaxWaitingTime(int64_t render_time_ms,
|
||||
int64_t now_ms) const override {
|
||||
return std::max<int>(0, render_time_ms - now_ms - kDecodeTime);
|
||||
int64_t MaxWaitingTime(int64_t render_time_ms,
|
||||
int64_t now_ms) const override {
|
||||
return render_time_ms - now_ms - kDecodeTime;
|
||||
}
|
||||
|
||||
bool GetTimings(int* decode_ms,
|
||||
@ -359,7 +359,7 @@ TEST_F(TestFrameBuffer2, DropTemporalLayerSlowDecoder) {
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
ExtractFrame();
|
||||
clock_.AdvanceTimeMilliseconds(60);
|
||||
clock_.AdvanceTimeMilliseconds(70);
|
||||
}
|
||||
|
||||
CheckFrame(0, pid, 0);
|
||||
@ -388,10 +388,10 @@ TEST_F(TestFrameBuffer2, DropSpatialLayerSlowDecoder) {
|
||||
|
||||
ExtractFrame();
|
||||
ExtractFrame();
|
||||
clock_.AdvanceTimeMilliseconds(55);
|
||||
clock_.AdvanceTimeMilliseconds(57);
|
||||
for (int i = 2; i < 12; ++i) {
|
||||
ExtractFrame();
|
||||
clock_.AdvanceTimeMilliseconds(55);
|
||||
clock_.AdvanceTimeMilliseconds(57);
|
||||
}
|
||||
|
||||
CheckFrame(0, pid, 0);
|
||||
|
||||
Reference in New Issue
Block a user