int status = SeekVideo(APTR handle, ULONG pos, int mode);
SeekMode
you
have set in OpenVideo(). The mode
parameter passed to this
function is actually redundant. It will always be the same as the SeekMode
passed in OpenVideo().
Before calling SeekVideo()
, Hollywood will always flush your audio and video decoder
states using FlushAudio() and FlushVideo().
Note that you only need to implement seeking if you have set the flag HWVIDFLAGS_CANSEEK
in
OpenVideo(). However, seeking back to position 0 has to be
implemented by all plugins - no matter whether HWVIDFLAGS_CANSEEK
has
been set or not. If SeekVideo()
is called with 0 as the new position, you need
to rewind the stream so that the next call to NextPacket()
returns packets right from the start of the stream.
This function must be implemented in a thread-safe way.