DVDSeekPrio
DVDSeekAsyncPrio

Syntax

#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 Information about the file associated by calling the DVDOpen function beforehand.
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 completes normally and 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 optical disc device driver manages four queues: 0 to 3. Queue 0 has the highest priority and queue 3 the lowest. Each queue is FIFO (First In First Out). First executes the command with the highest priority within the first queue.

Normal optical disc 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 details, see the DVDSeekAsync function in the function reference manual.

The DVDReadPrio 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.

This 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.
2007/09/13 Fixed links and errors in Description.
2007/06/28 Revised the description of return values.
2006/03/01 Initial version.


CONFIDENTIAL