Reading Data from the Data Output of a Processor
To read the data from the output DataSource of a Processor.
A custom DataSink is designed to read data from the output DataSource of a Processor. The DataSink handles both PushBufferDataSource and PullBufferDataSource which are the default types of output DataSource from Processors.
The sample application takes an input URL; creates a processor for it; set the output contentDescritpor to RAW; hook it up to the custom DataSink.
For the purpose of this sample, the custom DataSink reads the data and prints out simple statistics concerning the data.
A monitor is created if the "-monitor" flag is used and the processor supports MonitorControl.
When the monitor is enabled, a handy trick is used to enable the RawSyncBufferMux (by disabling RawBufferMux). This allows the audio and video track to synchronize for monitoring. Otherwise, the video will be processed as fast as possible independent of the audio.