Information about the streams
[Decoding of multimedia streams]

Functions

BGAV_PUBLIC const
gavl_audio_format_t
bgav_get_audio_format (bgav_t *bgav, int stream)
 Get the format of an audio stream.
BGAV_PUBLIC const
gavl_video_format_t
bgav_get_video_format (bgav_t *bgav, int stream)
 Get the format of a video stream.
BGAV_PUBLIC gavl_frame_table_tbgav_get_frame_table (bgav_t *bgav, int stream)
 Get the frame table of a video stream.
BGAV_PUBLIC const
gavl_video_format_t
bgav_get_subtitle_format (bgav_t *bgav, int stream)
 Get the video format of a subtitle stream.
BGAV_PUBLIC int bgav_subtitle_is_text (bgav_t *bgav, int stream)
 Check if a subtitle is text or graphics based.
BGAV_PUBLIC const char * bgav_get_audio_description (bgav_t *bgav, int stream)
 Get the description of an audio stream.
BGAV_PUBLIC const char * bgav_get_audio_info (bgav_t *bgav, int stream)
 Get additional info about an audio stream.
BGAV_PUBLIC const char * bgav_get_video_description (bgav_t *bgav, int stream)
 Get the description of a video stream.
BGAV_PUBLIC const char * bgav_get_subtitle_description (bgav_t *bgav, int stream)
 Get the description of a subtitle stream.
BGAV_PUBLIC const char * bgav_get_subtitle_info (bgav_t *bgav, int stream)
 Get additional info about a subtitle stream.
BGAV_PUBLIC int bgav_can_pause (bgav_t *bgav)
 Query if a track is pausable.

Function Documentation

BGAV_PUBLIC const gavl_audio_format_t* bgav_get_audio_format ( bgav_t bgav,
int  stream 
)

Get the format of an audio stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
The format

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_audio_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC const gavl_video_format_t* bgav_get_video_format ( bgav_t bgav,
int  stream 
)

Get the format of a video stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
The format

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_video_stream) and started the decoders (see bgav_start).

Special care has to be taken, if the video stream consists of (a) still image(s). This is the case, when the framerate_mode member of the format is GAVL_FRAMERATE_STILL. See bgav_video_has_still.

BGAV_PUBLIC gavl_frame_table_t* bgav_get_frame_table ( bgav_t bgav,
int  stream 
)

Get the frame table of a video stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
The frame table or NULL

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_video_stream) and started the decoders (see bgav_start).

If you want to make sure that the frame table is available for as many files as possible, use sample accurate mode (see bgav_options_set_sample_accurate) The returned table (if non-null) must be freed by the caller with gavl_frame_table_destroy.

Since 1.0.2

BGAV_PUBLIC const gavl_video_format_t* bgav_get_subtitle_format ( bgav_t bgav,
int  stream 
)

Get the video format of a subtitle stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
The format

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_subtitle_stream) and started the decoders (see bgav_start). For overlay subtitles, this is the video format of the decoded overlays. For text subtitles, it's the format of the associated video stream. The timescale member is always the timescale of the subtitles (not the video frames).

BGAV_PUBLIC int bgav_subtitle_is_text ( bgav_t bgav,
int  stream 
)

Check if a subtitle is text or graphics based.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
1 for text subtitles, 0 for graphic subtitles

If this function returns 1, you must use bgav_read_subtitle_text to decode subtitles, else use bgav_read_subtitle_overlay

BGAV_PUBLIC const char* bgav_get_audio_description ( bgav_t bgav,
int  stream 
)

Get the description of an audio stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
A technical decription of the stream

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_audio_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC const char* bgav_get_audio_info ( bgav_t bgav,
int  stream 
)

Get additional info about an audio stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
An info string about the stream or NULL

This returns additional information about the audio stream e.g. if it contains directors comments, audio for the visually impaired or whatever.

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_audio_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC const char* bgav_get_video_description ( bgav_t bgav,
int  stream 
)

Get the description of a video stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
A technical decription of the stream

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_video_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC const char* bgav_get_subtitle_description ( bgav_t bgav,
int  stream 
)

Get the description of a subtitle stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
A technical decription of the stream

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_subtitle_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC const char* bgav_get_subtitle_info ( bgav_t bgav,
int  stream 
)

Get additional info about a subtitle stream.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
An info string about the stream or NULL

This returns additional information about the subtitle stream e.g. if it contains directors comments or whatever.

Note, that you can trust the return value of this function only, if you enabled the stream (see bgav_set_subtitle_stream) and started the decoders (see bgav_start).

BGAV_PUBLIC int bgav_can_pause ( bgav_t bgav  ) 

Query if a track is pausable.

Parameters:
bgav A decoder instance
Returns:
1 is decoding can be paused for a longer time, 0 else

Check this if you intend to pause decoding. Pausing a livestream doesn't make sense, so in this case 0 is returned.

Generated on Fri Jun 8 17:30:02 2012 for gmerlin-avdecoder by  doxygen 1.6.3