Modules | |
Creating and destroying a decoder | |
Configuration of a decoder | |
Opening a media stream | |
Various methods of opening a media stream. | |
EDL support | |
EDL support. | |
Redirector support | |
Redirector support. | |
Query and select tracks | |
Query and select streams | |
Read compressed media packets | |
Start codecs | |
Information about the streams | |
Decode media frames | |
Simple seek API | |
Sample accurate seek API |
Setting up a decoder is a multi-step process. It might be a bit complicated, but it provides support for many different multimedia sources through a single API.
First you need to create a decoder instance (see Creating and destroying a decoder). Then you might want to change some options and set callbacks (see Configuration of a decoder). The opening can happen with different functions (see Opening a media stream). If you also open URLs, it can happen, that you opened a redirector (see Redirector support).
If you have no redirector, the decoder can have an arbitrary number of tracks. You can query various informations about the tracks and must select the track you want (see Query and select tracks).
Once a track is opened, you must set up the streams (See Query and select streams). To tell the decoder, that you are done, call bgav_start. This will start all codecs. Once the codecs are initialized, you can get informations about the streams (see Information about the streams). Then you are ready to decode media frames (see Decode media frames). In many streams you can also seek (see Simple seek API).