External Device Interfaces for DV Camcorders
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The WDM Video Capture filter exposes three interfaces for controlling a camcorder.
Label | Value |
---|---|
IAMExtDevice | The base interface for external device control. |
IAMExtTransport | Controls the VCR functions. |
IAMTimecodeReader | Reads timecode from the device. |
Note
To use these interfaces with the MSDV camcorder driver, include the header file XPrtDefs.h in your project.
After you select a capture device and create an instance of the capture filter, query the filter for these interfaces. The following example declares a custom structure that holds the interface pointers, along with Boolean values that specify the availability of each interface:
struct _MyDevCap
{
IAMExtDevice *pDevice;
IAMExtTransport *pTransport;
IAMTimecodeReader *pTimecode;
BOOL bHasDevice;
BOOL bHasTransport;
BOOL bHasTimecode;
} MyDevCap;
HRESULT hr;
IBaseFilter *pDVCam; // Pointer to the capture filter.
// Create an instance of the capture filter (not shown).
hr = pDVCam->QueryInterface(IID_IAMExtDevice, (void **)&MyDevCap.pDevice);
MyDevCap.bHasDevice = (SUCCEEDED(hr));
hr = pDVCam->QueryInterface(IID_IAMExtTransport, (void **)&MyDevCap.pTransport);
MyDevCap.bHasTransport = (SUCCEEDED(hr));
hr = pDVCam->QueryInterface(IID_IAMTimecodeReader, (void **)&MyDevCap.pTimecode);
MyDevCap.bHasTimecode = (SUCCEEDED(hr));
Related topics