Calculate pacing delay based on decode start time
Schedule the frames to be decoded based on the pacing delay from the last decode scheduled time. In the current implementation, multiple threads and different functions in same thread can call MaxWaitingTime(), thereby increasing the wait time each time the function is called. Instead of returning the wait time for a future frame based on the number of times the function is called, return the wait time only for the next frame to be decoded. Threads can call the function repeatedly to check the waiting time for next frame and wake up and then go back to waiting if an encoded frame is not available. Change-Id: I00886c1619599f94bde5d5eb87405572e435bd73 Bug: chromium:1237402 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226502 Reviewed-by: Johannes Kron <kron@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Johannes Kron <kron@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34660}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
d937f50e20
commit
82c2248511
@ -55,7 +55,8 @@ class VCMTimingFake : public VCMTiming {
|
||||
return last_ms_;
|
||||
}
|
||||
|
||||
int64_t MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) override {
|
||||
int64_t MaxWaitingTime(int64_t render_time_ms,
|
||||
int64_t now_ms) const override {
|
||||
return render_time_ms - now_ms - kDecodeTime;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user