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>THPPlayerPrepare</title>
10</head>
11
12<body>
13
14<h1>THPPlayerPrepare</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &quot;THPPlayer.h&quot;
19
20BOOL THPPlayerPrepare(s32 frameNum, s32 playFlag, s32 audioTrack);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<TABLE class="arguments" border="1" >
25  <tr>
26<th>frameNum</th>
27<td>Frame number from which to start playing the THP movie data.</td>
28  </tr>
29  <tr>
30<th>playFlag</th>
31<td>Playback flag.</td>
32  </tr>
33  <tr>
34<th>audioTrack</th>
35<td>Audio track number to play.</td>
36  </tr>
37</table>
38
39<h2>Return Values</h2>
40<p>Returns <CODE>TRUE</CODE> if successful, <CODE>FALSE</CODE> otherwise.</p>
41
42<H2>Description</H2>
43<p>The <code>THPPlayerPrepare</code> function performs preparations to playback the THP movie data. Based on the presence or absence of THP audio data and the playback style (streaming or memory-based), a video decode thread, audio decode thread, and read thread are created. Next it preloads the data and decodes the starting frame. In addition, a VI post callback is registered to control playback. (The VI post callback that is registered first will be called internally.)</p>
44
45<p>The first argument of the <code>THPPlayerPrepare</code> function is the frame number from which to start THP movie playback. The second argument is the playback flag. The third argument is the audio track number (0- ) to play. If the THP movie data does not have audio data, the third argument is ignored.</p>
46
47<p>If the THP movie data does not have offset data to each frame, the playback start frame must be set to 0.</p>
48
49<p>The playback flag is set to one of the following values.</p>
50
51<TABLE class="arguments" border="1" >
52  <tbody>
53    <tr ALIGN="center">
54<td bgcolor="#CCCCCC">Flag</td>
55<td bgcolor="#CCCCCC" width=50>Value</td>
56<td bgcolor="#CCCCCC">Description</td>
57    </tr>
58    <tr>
59<th>THP_PLAY_ONESHOT</th>
60      <td align="center">0</td>
61<td>Plays the THP movie data once and then stops.</td>
62    </tr>
63    <tr>
64<th>THP_PLAY_LOOP</th>
65      <td align="center">1</td>
66<td>Plays the THP movie data as a loop.</td>
67    </tr>
68  </tbody>
69</table>
70
71<H2>See Also</H2>
72<p>None.</p>
73
74<H2>Revision History</H2>
75<P>
762006/03/01 Initial version.<br>
77</P>
78
79<hr><p>CONFIDENTIAL</p></body>
80</html>
81