X hits on this document

Word document

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





7 / 13

Digital Video Camcorder Support in Windows 7

dwFrames contains a timecode in the format 0xhhmmssff (hours, minutes, seconds, and frames).

If dwFlags in a TIMECODE_SAMPLE structure is set to ED_DEVCAP_ATN_READ, then dwUser is set to the “blank flag” and timecode.dwFrames contains the track number.

For more information about the TIMECODE_SAMPLE and TIMECODE structures, see the DirectShow SDK documentation.

Controlling a DV Camcorder Device

An application issues commands to the device to perform standard camcorder operations such as play, rewind, fast forward, pause, stop, and record. An application developer can also send commands to the device using the edit box on the property page when the debug version of the driver is loaded.

Performing Standard Operations

An application uses IAMExtTransport::put_Mode to perform standard camcorder operations. For example, the following code fragment shows how an application would play a tape.

hr = m_pDVcrExtTransport->put_Mode(ED_MODE_PLAY)

// If hr is NOERROR, the play operation succeeded

The application can perform other operations by calling put_Mode with other mode flags, such as ED_MORE_FREEZE or ED_MODE_STEP_FWD. For a list of the modes supported by put_Mode, see IAMExtTransport::put_Mode later in this document.

IAMExtTransport::get_Mode implements two additional flags, ED_MODE_REW_FASTEST (fastest rewrind) and ED_MODE_REV_PLAY (reverse play). An application can determine whether the device is in these modes by calling get_Mode, but it cannot put the device into these modes with put_Mode.

Issuing Raw AV/C Commands

An application can send any AV/C command raw to a device, whether or not the command is supported by the DV camcorder interfaces described in this document. An application issues a raw AV/C command to a device by calling IAMExtTransport::GetTransportBasicParameters with ED_RAW_EXT_DEV_CMD and passing the number of bytes in the command and a pointer to a BYTE array that contains the raw AV/C command.

Developers should keep the following in mind when issuing raw AV/C commands:

All raw AV/C commands are synchronous; that is, the thread issuing the command blocks until the command returns.

Only one raw AV/C command can be issued at a time to the same device. Subsequent raw AV/C commands will be rejected while the current command is being processed.

This usage of GetTransportBasicParameters is strictly a pass-through service, which means that the application is responsible for command validation and error checking. The DV camcorder interfaces provide validation and error checking for all implemented commands, so developers are encouraged to issue raw AV/C commands only for commands not implemented by the interfaces.

The following code fragment shows how an application might issue a raw AV/C command to search for an absolute track number (ATN) on a tape. In this example:

cntByte indicates the number of bytes in the RawAVCPkt array.

After GetTransportBasicParameters returns, cntByte contains the number of bytes written to RawAVCPkt.

September 28, 2001

Document info
Document views44
Page views44
Page last viewedSun Dec 11 02:45:08 UTC 2016