next up previous contents index
Next: TitlePlay Up: Disc functions Previous: TimePlay   Contents   Index


TimeSearch

This command stops the current presentation and starts presentation from the specified position of the title by Time within the same title.

DWORD TimeSearch( dvdTimeCode);

Arguments
ULONG dvdTimeCode See details below
For DVD:
dvdTimeCode is a 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;

For SVCD:
dvdTimeCode is an integer value which is the time to start playback expressed in number of seconds.
For example inputing 600 means to start playback at 10 minutes.

Return value
DVD
Zero if successful. Otherwise returns an error code.
DVDE_ARG Arguments are not valid.
DVDE_UNAUTHORIZED Unauthorized operation.

SVCD
FMPE_OK successful
FMPE_NOINTERFACE this interface is not supported in this case
FMPE_UNEXPECTED unknow errors
FMPE_INVALIDARG the specified time is out of range
FMPE_TIMERACTIVATED the timer has been activated
FMPE_FAILURE SVCD is not currently playing

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 does not execute the Pre-Command of the Program Chain.

See also
TimePlay(1.4.32), CDDAPlayTrack(1.2.6)

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


next up previous contents index
Next: TitlePlay Up: Disc functions Previous: TimePlay   Contents   Index
Realmagic Build 2001-12-07