Currently, we are not precisely describing the threading model and instead rely on pipeTo et al.
We should probably define a encoded media thread which is the thread on which happen the generation and consumption of frames.
And the thread of the window + the thread of the worker.
We could post/enqueue tasks between the various threads which would further clarify things.