AVBlocks for C++  2.1
Audio and Video Software Development Kit
Transcoder Input/Output Model

Using file or stream as input

  • 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:

Using `Transcoder::push` to provide input

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.