X hits on this document

Word document

Designing Hardware and Drivers for the Microsoft® Windows® Family of Operating Systems - page 6 / 13

36 views

0 shares

1 downloads

0 comments

6 / 13

Digital Video Camcorder Support in Windows 6

LONG lInSignalMode = 0;

// Determine the input signal mode (NTS/PAL, SD/SDL)

m_pDVcrExtTransport->GetTransportVideoParameters(ED_MODE_SIGNAL_INPUT, &lInSignalMode);

// Update property page controls according to lInSignalMode.

// lInSignalMode can be one of the following:

//ED_MODE_SIGNAL_525_60_SD

//ED_MODE_SIGNAL_525_60_SDL

//ED_MODE_SIGNAL_625_50_SD

//ED_MODE_SIGNAL_625_50_SDL

//ED_MODE_SIGNAL_MPEG2TS

// Determine the current transport state and set controls accordingly

m_pDVcrExtTransport->get_Mode(&lCurXPrtState);

// For a list of valid modes, see IAMExtTransport::put_Mode

// and IAMExtTransport::get_Mode later in this document.

Getting Timecode and Track Number Data

An application can get current timecode and track number data from a DV tape while it is playing or paused. The following code fragment shows how an application might call GetTimecode to retrieve the current timecode and absolute track number from a tape.

In this example, m_pDVcrTmCdReader is a property page class member previously initialized with a pointer to IAMTimecodeReader

TIMECODE_SAMPLE TimecodeSample;

TimecodeSample.timecode.dwFrames = 0;

TimecodeSample.dwFlags = ED_DEVCAP_TIMECODE_READ;

hr = m_pDVcrTmCdReader->GetTimecode(&TimecodeSample);

The TIMECODE_SAMPLE structure is defined in the DirectShow SDK:

typedef struct tagTIMECODE_SAMPLE {

LONGLONG  qwTick;

TIMECODE  timecode;

DWORD  dwUser;

DWORD  dwFlags;

} TIMECODE_SAMPLE;

In the TIMECODE_SAMPLE structure for this example:

dwUser is set to 0x1 0x0 ‘BF’, where BF is a “blank flag” that indicates discontinuity.

dwFlags is set to ED_DEVCAP_TIMECODE_READ, which is specific to the DV camcorder implementation.

The TIMECODE_SAMPLE structure has a TIMECODE structure as a member:

typedef struct tagTIMECODE {

WORD  wFrameRate;

WORD  wFrameFract;

DWORD  dwFrames;

}TIMECODE;

In the TIMECODE structure for this example:

September 28, 2001

Document info
Document views36
Page views36
Page last viewedSun Dec 04 10:47:21 UTC 2016
Pages13
Paragraphs288
Words4089

Comments