Repository navigation
Tst mp4 playback race - #767
Draft
kroq-gar78 wants to merge 2 commits into
Draft
kroq-gar78 wants to merge 2 commits into
kroq-gar78 wants to merge 2 commits into
Conversation
Annotate test_rendering_downloads_an_mp4 and the helpers it uses: _render_setup, _mp4_boxes, _find_box, _play_mp4, _js_value and _js_attrs. A recursive _Box alias describes the MP4 box tree. _find_box now asserts that the box it returns holds data rather than child boxes, and the test asserts that fps is a number, so the rest type-checks under mypy.
The playback check drew the video into a canvas on loadeddata, but Chromium can fire loadeddata before the first decoded frame is ready to draw. drawImage then paints nothing, and the test failed intermittently with lit == 0 although the file was well formed. Wait instead for requestVideoFrameCallback, which fires once a frame has been presented, and report an error if none is within 10 s. Under contention (16 concurrent playbacks on 24 cores) the loadeddata page gave lit 0 in 10 of 400 runs, each time with a fully transparent canvas, i.e. nothing drawn rather than a black frame. The requestVideoFrameCallback page gave the full frame in 400 of 400. A black H.264 video still fails on lit, and truncated or garbage files fail with a decode error.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.