Microsoft DirectX 8.1 (C++)

DVD_TIMECODE Structure

The DVD_TIMECODE structure contains DVD timecode in hours, minutes, seconds, and frames.

Syntax

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;

Members

Hours1

Hours.

Hours10

Tens of hours.

Minutes1

Minutes.

Minutes10

Tens of minutes.

Seconds1

Seconds.

Seconds10

Tens of seconds.

Frames1

Frames.

Frames10

Tens of frames.

FrameRateCode

Frames per second dropped and not dropped as indicated by DVD_FRAMERATE.

Remarks

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

To use a BCD, first create the BCD.

ULONG timeCode = 0;

Second, 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;

Finally, timeCode is passed to the IDvdControl::TimeSearch method.

TimeSearch ( timeCode );

See Also