Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First working test of stdin of webworker #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

PaulKinlan
Copy link
Owner

@PaulKinlan PaulKinlan commented Apr 19, 2020

[DON'T MERGE] I had to disable closure compiler.
[DON'T MERGE] I mistakenly pretty printed the tests.

Creates a RingBuffer so that we can continuously pipe data to ffmpeg in a webwork.

  • Client creates a ring buffer to pipe the data to.
  • Client posts the shared array buffer to the worker before the first run,
  • FFmpeg needs to init the stdin for some reason.
  • When ffmpeg needs data from the buffer it reads 1 char from stdin.

Copy link

@tpetry tpetry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is only one byte read each time from the buffer? This sounds awfully slow for large files, a 20MB video would be 20 million calls to the ring buffer.

+ Added a test (which only works when debugging :\)
+ RingBuffer now blocks on read
+ stdin handler uses blocking Read
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.

3 participants