|Microsoft DirectX 9.0|
The GetTimecode method retrieves the most recent timecode, userbit, and flag values available in the stream.
HRESULT GetTimecode( TIMECODE_SAMPLE *pTimecodeSample );
[out] Pointer to a TIMECODE_SAMPLE structure.
Returns an HRESULT value that depends on the implementation of the interface.
Use this method to monitor the timecode and to parse duplicates and discontinuities.
The timecode contains undefined bits, called userbits. Applications can use these bits to store synchronization information or other custom information.
DV and MPEG Camcorder Implementation
The MSDV driver supports reading SMPTE timecode or absolute track numbers (ATN). The MSTape driver supports reading the relative time counter (RTC). To read time information on these devices, do the following:
Set the dwFlags member of the TIMECODE_SAMPLE structure to one of the following values.
|ED_DEVCAP_ATN_READ||Absolute track number (DV)|
|ED_DEVCAP_RTC_READ||Relative time counter (MPEG tape)|
The timecode member of the TIMECODE_SAMPLE structure is a TIMECODE structure. Initialize that structure's dwFrames member to zero.
All other structure members are ignored.
When the method returns, the dwFrames member contains the time information, in the following format.
|Timecode||Hours, minutes, seconds, and frames, as a binary coded decimal (BCD) value: 0xhhmmssff.|
|RTC||Hours, minutes, seconds, and frames, as a BCD value: 0xhhmmssff. The most significant bit of the frames byte is a sign bit. If the frame count is not available, the remaining frame bits are set to 0x7F.|
Also, the dwUser member receives the blank flag bit from the device, which has one of the following values.
|0x00||Not a discontinuity.|