Accesing Individual Decoded Video Frames
[Pass-through Video Codec]
How to access individual decoded video frames from a Processor while processing the media. This could be used for scanning the decoded data; computing statistics for each video frame, etc.
There are basically 2 ways to do it: 1) get the data from the output DataSource of the Processor; 2) using a pass-through plugin codec as a callback when individual frames are being processed.
This example will demonstrate the second approach:
Build the pass-through codec. Specify what input format you desire and define that as the Codec.getSupportedInputFormats().
Create a processor from the input file.
Get the TrackControls from the processor.
Set your codec on the video track: TrackControl.setCodecChain(your_codec).
That way, your codec's process call will be the "callback" whenever a video frame goes through your plugin.
To require for a specific input to your codec, you can define your codec to support only your desirable type of input. Then the processor will try its best to construct a data flow path to connect to your codec.