1,295
edits
Line 111: | Line 111: | ||
interface StreamProcessor : Stream { | interface StreamProcessor : Stream { | ||
readonly attribute Stream[] inputs; | readonly attribute Stream[] inputs; | ||
void addStream(Stream input); | void addStream(Stream input, [optional] double atTime); | ||
void setInputParams(Stream input, any params); | void setInputParams(Stream input, any params, [optional] double atTime); | ||
void removeStream(Stream input); | void removeStream(Stream input, [optional] double atTime); | ||
// Causes this stream to enter the ended state. | // Causes this stream to enter the ended state. | ||
// No more worker callbacks will be issued. | // No more worker callbacks will be issued. | ||
void end( | void end([optional] double atTime); | ||
attribute Worker worker; | attribute Worker worker; | ||
Line 124: | Line 124: | ||
This object combines multiple streams with synchronization to create a new stream. While any input stream is blocked and not live, the StreamProcessor is blocked. While the StreamProcessor is blocked, all its input streams are forced to be blocked. (Note that this can cause other StreamProcessors using the same input stream(s) to block, etc.) | This object combines multiple streams with synchronization to create a new stream. While any input stream is blocked and not live, the StreamProcessor is blocked. While the StreamProcessor is blocked, all its input streams are forced to be blocked. (Note that this can cause other StreamProcessors using the same input stream(s) to block, etc.) | ||
When 'atTime' is specified, the operation happens instantaneously at the given media time, and all changes with the same atTime happen atomically. Media times are on the same timeline as "animation time" (window.mozAnimationStartTime or whatever the standardized version of that turns out to be). If atTime is in the past or omitted, the change happens as soon as possible, and all such immediate changes issued by a given HTML5 task happen atomically. | |||
While 'worker' is null, the output is produced simply by adding the streams together. Video frames are composited with the last-added stream on top, everything letterboxed to the size of the last-added stream that has video. While there is no input stream, the StreamProcessor produces silence and no video. | While 'worker' is null, the output is produced simply by adding the streams together. Video frames are composited with the last-added stream on top, everything letterboxed to the size of the last-added stream that has video. While there is no input stream, the StreamProcessor produces silence and no video. |
edits