1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>DVDSeekPrio</title> 10</head> 11 12<body> 13 14<h1>DVDSeekPrio<BR>DVDSeekAsyncPrio</h1> 15<h2>C Specification</h2> 16 17<dl> 18<dd><pre><code>#include <revolution/dvd.h></code></pre> 19<dd><pre><CODE>typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);</CODE></pre> 20<dd><pre><CODE>s32 DVDSeekPrio ( DVDFileInfo* fileInfo, 21 s32 offset, s32 prio ); 22 23BOOL DVDSeekAsyncPrio ( DVDFileInfo* fileInfo, 24 s32 offset, 25 DVDCallback callback, s32 prio );</CODE></pre> 26</dl> 27<h2>Arguments</h2> 28<TABLE border="1" cellpadding="3" cellspacing="0.1"> 29 <tr> 30<TD width="120" bgcolor="#ffffe8"><em><strong><code>fileInfo</code></strong></em></TD> 31<TD width="520">File information retrieved by calling the <A href="DVDOpen.html"><CODE>DVDOpen</CODE></A> function.</TD> 32 </tr> 33 <tr> 34<TD width="120" bgcolor="#ffffe8"><em><strong><code>offset</code></strong></em></TD> 35<TD width="520">Offset position in the file that moves the pickup. Must be a multiple of 4.</TD> 36 </tr> 37 <tr> 38<TD width="120" bgcolor="#ffffe8"><em><strong><code>callback</code></strong></em></TD> 39<TD width="520">Address of callback function to notify about the seek result (only the <code>DVDSeekAsyncPrio</code> function).</TD> 40 </tr> 41 <tr> 42<TD width="120" bgcolor="#ffffe8"><em><strong><code>prio</code></strong></em></TD> 43<TD width="520">Priority of the queue for entering the seek request.</TD> 44 </tr> 45</TABLE> 46<h2>Return Values</h2> 47 48<P>The <code>DVDSeekPrio</code> function returns zero if the command succeeds to complete and returns a negative value if the command fails to complete. </P> 49<P>The <CODE>DVDSeekAsyncPrio</CODE> function always returns TRUE. </P> 50<H2>Description</H2> 51<P>The <CODE>DVDSeekAsyncPrio</CODE> function can specify the queue to use for placing seek requests, but is otherwise the same as the <A href="DVDReadAsync.html"><CODE>DVDSeekAsync</CODE></A> function.</P> 52<P>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.</P> 53<P>Normal DVD commands use queue 2.</P> 54<P>The <code>DVDSeekAsyncPrio</code> function allows you change the priority for a seek command. You can specify which queue to use for the seek request.</P> 55<P>For more details, see the <A href="DVDSeek.html"><code>DVDSeekAsync</code></a> function.</P> 56<P>The <CODE>DVDSeekPrio</CODE> function is the synchronous version of the <CODE>DVDSeekAsyncPrio</CODE> function. For more details, see the <A href="DVDSeek.html"><code>DVDSeek</code></a> function.</P> 57<P><strong><B>Note:</B></strong> 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.</P> 58 59<p>The <CODE>DVDSeekPrio</CODE> function may put the current thread to sleep. Refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.</p> 60 61<h2>See Also</h2> 62 63<p><code><a href="DVDRead.html">DVDSeek</a><BR> <a href="DVDOpen.html">DVDOpen</a></code><BR> <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a></p> 64<H2>Revision History</H2> 65<P>2007/09/25 Added an explanation of thread behavior and corrected typos.<BR> 2007/06/28 Revised return value descriptions.<BR> 2006/03/01 Initial version.</P> 66<hr><p>CONFIDENTIAL</p></body> 67</html> 68