DVDSeekPrio
DVDSeekAsyncPrio

C Specification

#include <revolution/dvd.h>
typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
s32  DVDSeekPrio       ( DVDFileInfo* fileInfo,
                         s32 offset, s32 prio );

BOOL DVDSeekAsyncPrio  ( DVDFileInfo* fileInfo,
                         s32 offset,
                         DVDCallback callback, s32 prio );

Arguments

fileInfo File information retrieved by calling the DVDOpen function.
offset Offset position in the file that moves the pickup. Must be a multiple of 4.
callback Address of callback function to notify about the seek result (only the DVDSeekAsyncPrio function).
prio Priority of the queue for entering the seek request.

Return Values

The DVDSeekPrio function returns zero if the command succeeds to complete and returns a negative value if the command fails to complete.

The DVDSeekAsyncPrio function always returns TRUE.

Description

The DVDSeekAsyncPrio function can specify the queue to use for placing seek requests, but is otherwise the same as the DVDSeekAsync function.

Internally the DVD device driver manages four queues--queue 0 - 3; queue 0 has the highest priority and queue 3 has the lowest priority. Each queue is FIFO (First In First Out). First executes the command with the highest priority within the first queue.

Normal DVD commands use queue 2.

The DVDSeekAsyncPrio function allows you change the priority for a seek command. You can specify which queue to use for the seek request.

For more details, see the DVDSeekAsync function.

The DVDSeekPrio function is the synchronous version of the DVDSeekAsyncPrio function. For more details, see the DVDSeek function.

Note: Be careful if you are considering the use of a synchronous function in a real game. Synchronous functions can only be used in a multithreaded game. In single thread games, synchronous functions can't be used because there is no way to check errors.

The DVDSeekPrio function may put the current thread to sleep. Refer to Interrupts and Callback Functions.

See Also

DVDSeek
DVDOpen

Interrupts and Callback Functions

Revision History

2007/09/25 Added an explanation of thread behavior and corrected typos.
2007/06/28 Revised return value descriptions.
2006/03/01 Initial version.


CONFIDENTIAL