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="Microsoft FrontPage 5.0">
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
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">#include &lt;revolution/dvd.h&gt;
18
19typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
20
21s32  DVDSeekPrio         ( DVDFileInfo* fileInfo,
22                           s32 offset, s32 prio );
23
24BOOL DVDSeekAsyncPrio    ( DVDFileInfo* fileInfo,
25                           s32 offset,
26                           DVDCallback callback, s32 prio );
27</pre></dd></dl>
28
29<h2>Arguments</h2>
30<TABLE class="arguments" border="1" >
31  <tr>
32<TH>fileInfo</TH>
33<TD>Information about the file associated by calling the <A href="DVDOpen.html"><CODE>DVDOpen</CODE></A> function beforehand.</TD>
34    </tr>
35  <tr>
36<TH>offset</TH>
37<TD>Offset position in the file that moves the pickup. Must be a multiple of 4.</TD>
38    </tr>
39  <tr>
40<TH>callback</TH>
41<TD>Address of callback function to notify about the seek result (only the <CODE>DVDSeekAsyncPrio</CODE> function).</TD>
42    </tr>
43  <tr>
44<TH>prio</TH>
45<TD>Priority of the queue for entering the seek request.</TD>
46    </tr>
47</TABLE>
48
49<h2>Return Values</h2>
50<P>The <code>DVDSeekPrio</code> function returns zero if the command completes normally and a negative value if the command fails to complete.</P>
51<P>The <CODE>DVDSeekAsyncPrio</CODE> function always returns <CODE>TRUE</CODE>.</P>
52
53<H2>Description</H2>
54<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="DVDSeek.html"><CODE>DVDSeekAsync</CODE></A> function.</P>
55<P>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.</P>
56<P>Normal optical disc commands use queue 2.</P>
57<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>
58<P>For details, see the <A href="DVDSeek.html"><CODE>DVDSeekAsync</CODE></A> function in the function reference manual.</P>
59<P>The <CODE>DVDReadPrio</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>
60<P><strong><B>Note:</B></strong>Be careful if you are considering the use of a synchronous function in a real game. Synchronous functions&nbsp;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>
61
62<p>This function may put the current thread to sleep. Refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.</p>
63
64<h2>See Also</h2>
65<p class="reference">
66<a href="DVDSeek.html">DVDSeek</a>,
67<a href="DVDOpen.html">DVDOpen</a>,
68<a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>
69</p>
70
71<H2>Revision History</H2>
72<P>
732007/09/25 Added an explanation of thread behavior. <BR>2007/09/13 Fixed links and errors in <B>Description</B>.<BR>2007/06/28 Revised the description of return values.<BR>2006/03/01 Initial version.<BR>
74</P>
75
76<hr><p>CONFIDENTIAL</p></body>
77</html>