Decode media frames
[Decoding of multimedia streams]


Functions

int bgav_read_video (bgav_t *bgav, gavl_video_frame_t *frame, int stream)
 Decode a video frame.
int bgav_read_audio (bgav_t *bgav, gavl_audio_frame_t *frame, int stream, int num_samples)
 Decode audio samples.
int bgav_has_subtitle (bgav_t *bgav, int stream)
 Check, if a new subtitle is available.
int bgav_read_subtitle_overlay (bgav_t *bgav, gavl_overlay_t *ovl, int stream)
 Decode an overlay subtitle.
int bgav_read_subtitle_text (bgav_t *bgav, char **ret, int *ret_alloc, int64_t *start_time, int64_t *duration, int stream)
 Decode a text subtitle.

Function Documentation

int bgav_read_video ( bgav_t bgav,
gavl_video_frame_t frame,
int  stream 
)

Decode a video frame.

Parameters:
bgav A decoder instance
frame The frame to which the image will be decoded.
stream Stream index (starting with 0)
Returns:
1 if a frame could be decoded, 0 for EOF.

int bgav_read_audio ( bgav_t bgav,
gavl_audio_frame_t frame,
int  stream,
int  num_samples 
)

Decode audio samples.

Parameters:
bgav A decoder instance
frame The frame to which the samples will be decoded.
stream Stream index (starting with 0)
num_samples Number of samples to be decoded
Returns:
The number of actually decoded samples, which can be smaller than num_samples. 0 means EOF.

int bgav_has_subtitle ( bgav_t bgav,
int  stream 
)

Check, if a new subtitle is available.

Parameters:
bgav A decoder instance
stream Stream index (starting with 0)
Returns:
1 if a subtitle is available.
Use this function to check in advance, if it would make sense to call bgav_read_subtitle_overlay or bgav_read_subtitle_text.

int bgav_read_subtitle_overlay ( bgav_t bgav,
gavl_overlay_t ovl,
int  stream 
)

Decode an overlay subtitle.

Parameters:
bgav A decoder instance
ovl The overlay to which the subtitle will be decoded.
stream Stream index (starting with 0)
Returns:
1 if a subtitle could be decoded, 0 else
If this function returns 1, a subtitle was decoded. If this function returns 0 and bgav_has_subtitle returned 0 before as well, there is no subtitle yet available, but there might come others at a later point in the stream. If this function returns 0 and bgav_has_subtitle returned 1 before, it means, that you reached the end of the subtitle stream.

int bgav_read_subtitle_text ( bgav_t bgav,
char **  ret,
int *  ret_alloc,
int64_t *  start_time,
int64_t *  duration,
int  stream 
)

Decode a text subtitle.

Parameters:
bgav A decoder instance
ret The string, where the text will be stored.
ret_alloc The number of allocated bytes for ret
start_time Returns the start time
duration Returns the duration
stream Stream index (starting with 0)
Returns:
1 if a subtitle could be decoded, 0 else
If this function returns 1, a subtitle was decoded. If this function returns 0 and bgav_has_subtitle returned 0 before as well, there is no subtitle yet available, but there might come others at a later point in the stream. If this function returns 0 and bgav_has_subtitle returned 1 before, it means, that you reached the end of the subtitle stream. start_time and duration are scaled by the timescale of the subtitle stream (see bgav_get_subtitle_format).


Generated on Sun Aug 3 15:34:52 2008 for gmerlin-avdecoder by  doxygen 1.5.6