Actually throttle frame rate with Page.screencastFrameAck
The implementation Page.screencastFrameAck method is supposedly here to throttle the frame rate when doing a screencast over CDP. It's supposed to be used like this: on('Page.screencastFrame', frame => { Page.screencastFrameAck({sessionId: frame.sessionId}); }); Page.startScreencast(); But in reality, calling screencastFrameAck or not does not make any difference. The frames are still sent by the backend at the same rate, without waiting. This change fixes the video_consumer code path in PageHandler so it does wait for Page.screencastFrameAck to be called after it has reached the maximum number of inflight frames. Bug: 1126915 Change-Id: I8bc1bc37e48689262b250376879fb9ae726a6700 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404113 Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com> Reviewed-by:Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#808277}
Showing
Please register or sign in to comment