next up previous contents index
Next: TimeSearch Up: Disc functions Previous: SubPictureStreamChange   Contents   Index


TimePlay

Play from the specified position of the Title by the Title number and Time

DWORD TimePlay(bTitleNumber, dvdTimeCode);

Arguments
BYTE bTitleNumber Title Number to play(The number is set between 1 and 99)
ULONG dvdTimeCode See description below
For DVD:
dvdTimeCode is the value defining the time to start playback
in the form of the DVD_TIMECODE structure as defined by the Microsoft DirectX API.
typedef struct tagDVD_TIMECODE")
{
ULONG Hours1   :4;
ULONG Hours10  :4;

ULONG Minutes1 :4;
ULONG Minutes10:4;

ULONG Seconds1 :4;
ULONG Seconds10:4;

ULONG Frames1  :4;
ULONG Frames10 :2;

ULONG FrameRateCode:2;
} DVD_TIMECODE;


DVD timecode is binary coded decimal (BCD) encoded in the format 0xHhMmSsFf, where:

H is tens of hours
h is hours
M is tens of minutes
m is minutes
S is tens of seconds
s is seconds
F is tens of frames
f is frames
To use a BCD, first create the BCD.

ULONG timeCode = 0;	// create the BCD
//create a pointer to a DVD_TIMECODE structure at the address of the BCD
DVD_TIMECODE * dvdTimeCode = ( DVD_TIMECODE * ) &timeCode;

Then, dvdTimeCode can be used as a DVD_TIMECODE structure.

dvdTimeCode->Hours10 = 0;
dvdTimeCode->Hours1 = 2;

Return value
Zero if successful. Otherwise returns an error code. DVDE_ARG Arguments are not valid. DVDE_TITLENUMBER The Title number does not exist DVDE_UNAUTHORIZED Unauthorized operation.

Remarks
The Player accesses to the specified frame (time code) and starts playing.

This function is only allowed for a One_Sequential_PGC_Title. This function executes the Pre-Command of the Program Chain.

See also
TimeSearch(1.4.33),CDDAPlayTrack(1.2.6)

Figure 1.41: TimePlay Operating Systems and Streaming Models
\begin{figure}\centering\begin{tabular}{\vert l\vert c\vert c\vert c\vert c\vert...
...$\bullet$& & & \\
Linux & & $\bullet$& & & \\
\hline
\end{tabular}\end{figure}



Realmagic Build 2001-12-07