Media processor class holding and running insertable streams pipeline.
The class should be created on the proper thread.
- Application main thread when media processing wants to be performed in the main thread.
- Worker thread when media processing wants to be performed in a Web worker thread.
• new MediaProcessor()
Sets the expected rate of the track per second. The media processor will use this number for calculating drops in the rate. This could happen when the transformation will take more time than expected. This will not cause an error, just warning to the client. Mostly: Video: 30 frames per second Audio: 50 audio data per second for OPUS In case of increased frame dropping rate a warning will be emitted according to info here. This is an optional method.
|number holds the predicted track rate.|
Starts running the tranformation logic performed by the media processor instance.
When running an instance of this class on a Web worker thread the call for this function should be made by the user. See example here.
When running an instance of this class on the application main thread there is no need to call this method given it will be called by the
|Readable stream associated to the media source being processed.|
|Writable stream associated to the resulting media once processed.|
Sets an array of transfromer instances that will be hold and ran by the media processor instance. See example here
|An array of transformer instances.|
Stops running the tranformation logic performed by the media processor instance.