SeekVideo -- seek video stream to new position (V5.0)
int status = SeekVideo(APTR handle, ULONG pos, int mode);
This function must seek the specified video stream handle to the position passed as parameter 2. The new position is specified either in milliseconds or as a byte offset relative to the beginning of the file. This depends on the 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.

handle returned by OpenVideo()
new stream position in a unit that depends on "mode"
seek mode
status code indicating error or success (see above)

Show TOC