Functions | |
BGAV_PUBLIC int | bgav_can_seek (bgav_t *bgav) |
Check if a track is seekabkle. | |
BGAV_PUBLIC void | bgav_seek (bgav_t *bgav, gavl_time_t *time) |
Seek to a specific time. | |
BGAV_PUBLIC void | bgav_seek_scaled (bgav_t *bgav, int64_t *time, int scale) |
Seek to a specific stream position. |
gmerlin_avdecoder supports multiple demultiplexing modes, some are optimized for linear playback, some are optimized for sample accurate random access. By default, the demuxer will be in linear playback mode. The associated seek API is described in this section.
BGAV_PUBLIC int bgav_can_seek | ( | bgav_t * | bgav | ) |
Check if a track is seekabkle.
bgav | A decoder handle |
BGAV_PUBLIC void bgav_seek | ( | bgav_t * | bgav, | |
gavl_time_t * | time | |||
) |
Seek to a specific time.
bgav | A decoder handle | |
time | The time to seek to. |
The time argument is changed to the actually seeked time, which can be different.
BGAV_PUBLIC void bgav_seek_scaled | ( | bgav_t * | bgav, | |
int64_t * | time, | |||
int | scale | |||
) |
Seek to a specific stream position.
bgav | A decoder handle | |
time | The time to seek to. | |
scale | Timescale |
This function allows sample and frame accurate seeking, if the following conditions are met:
Typically, only one stream will be positioned accurately. For editing applications, it's recommended, that separate decoder instances are opened for audio and video. They can then be positoned independently.
The time argument might be changed to the actually seeked time, which can be different. For sample accurate formats, it should always be unchanged.
This function allows sample accurate seeking for some cases even in linear decoding mode. For more sophisticated sample accurate access, see Sample accurate seek API.