AVbin Documentation

To open a file and prepare it for decoding, the general procedure is

  1. Initialise AVbin by calling avbin_init()
  2. Open a file using avbin_open_filename()
  3. Retrieve details of the file using avbin_file_info(). The resulting _AVbinFileInfo structure includes details such as:
  4. Examine details of each stream using avbin_stream_info(), passing in each stream index as an integer from 0 to n_streams. For video streams, the _AVbinStreamInfo structure includes For audio streams, the structure includes
  5. For each stream you intend to decode, call avbin_open_stream().

When all information has been determined and the streams are open, you can proceed to read and decode the file:

  1. Call avbin_read() to read a packet of data from the file.
  2. Examine the resulting _AVbinPacket structure for the stream_index, which indicates how the packet should be decoded. If the stream is not one that you have opened, you can discard the packet and continue with step 1 again.
  3. To decode an audio packet, repeatedly pass the data within the packet to avbin_decode_audio(), until there is no data left to consume or an error is returned.
  4. To decode a video packet, pass the data within the packet to avbin_decode_video(), which will decode a single image in RGB format.
  5. Synchronise audio and video data by observing the _AVbinPacket::timestamp member.

When decoding is complete, call avbin_close_stream() on each stream and avbin_close_file() on the open file.


Generated on Thu Apr 17 23:51:44 2008 for AVbin by  doxygen 1.5.1