Skip to content

Tst mp4 playback race - #767

Draft
kroq-gar78 wants to merge 2 commits into
devfrom
tst-mp4-playback-race
Draft

kroq-gar78 wants to merge 2 commits into
devfrom
tst-mp4-playback-race

Conversation

@kroq-gar78

Copy link
Copy Markdown
Contributor

No description provided.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant