A file input is always allowed. It is a valid source for all media formats defined in the StreamType enumeration.
An implementation of primo::Stream can be used as input if it supports reading and seeking. A seekable primo::Stream is equivalent to a file and therefore it can be used with all media formats (StreamType). A future version of AVBlocks will support the usage of non-seekable streams as Transcoder inputs for certain media formats.
Using file or stream as output
A file output is always allowed. It is a valid sink for all media formats defined in the StreamType enumeration.
An implementation of primo::Stream can be used as output if it supports writing. For certain media formats seek support is also required in order to overwrite certain metadata attributes at the beginning or the middle of the generated stream. Seek support is required for the following media formats:
Only elementary streams and uncompressed video/audio may be pushed. Container formats cannot be pushed. A future version of AVBlocks will support push mode for certain container formats. Elementary stream types and container types are defined in separate ranges in the StreamType enumeration:
When a video stream is pushed the video data must be provided in whole video frames (compressed or uncompressed). The MediaSample pushed to Transcoder must describe a single video frame. The video frame may be combined with header frames.
When an audio stream is pushed the audio data may be pushed in fragments of any size.
Using `Transcoder::pull` to get output
Only elementary streams and uncompressed video/audio may be pulled. Container formats cannot be pulled.
When a video stream is pulled the retrieved MediaSample contains a single and complete video frame (compressed or uncompressed).
When an audio stream is pulled the audio data is retrieved in one or more compressed frames or uncompressed LPCM samples.