Microsoft DirectX 8.1 (C++) |
A capture filter can have multiple output pins, each with a different purpose. For example, some capture filters have separate pins for capture and preview. Others deliver closed-captioned data in addition to a primary video stream. The function of a pin is identified by a kernel-streaming property set. For the complete list of defined pin categories, see Pin Property Set. This section discusses the following categories:
Category GUID | Description |
PIN_CATEGORY_CAPTURE | Capture pin |
PIN_CATEGORY_PREVIEW | Preview pin |
PIN_CATEGORY_VIDEOPORT | Video port (VP) pin |
PIN_CATEGORY_CC | Closed-captioned pin |
PIN_CATEGORY_VBI | Vertical blanking interval (VBI) pin |
PIN_CATEGORY_VIDEOPORT_VBI | Video port pin for VBI |
PINNAME_VIDEO_NABTS_CAPTURE | Hardware slicing pin for NABTS data |
PINNAME_VIDEO_CC_CAPTURE | Hardware slicing pin for CC data |
Every capture filter has at least one capture pin. It may also have a preview pin or a video port pin, but never both. Filters can have multiple capture pins and preview pins, each delivering a separate media type. Thus, a single filter might have video and audio capture pins, plus video and audio preview pins. Closed captioning and VBI are both used in television. DVD uses CC but not VBI. If the pins are hardware slicing pins, they must be connected directly to pins of the corresponding category on the CC Decoder, NABTS/FEC VBI Codec or WST Codec filters. See the reference pages for these filters for more information.
To determine a pin's category, call the IKsPropertySet::Get method. The GUID of the property set is AMPROPSETID_Pin and the property identifier is AMPROPERTY_PIN_CATEGORY (). The following code example shows how to query the pin:
IPin *pPin; // Pointer to an output pin on a capture filter.
IKsPropertySet *pKs;
HRESULT hr = pPin->QueryInterface(IID_IKsPropertySet, (void **)&pKs);
if (SUCCEEDED(hr))
{
GUID PinCategory;
DWORD cbReturned;
hr = pKs->Get(AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY, NULL, 0,
&PinCategory, sizeof(GUID), &cbReturned);
if (SUCCEEDED(hr))
{
// PinCategory now contains the category GUID.
}
pKs->Release();
}
For more information about property sets, refer to the Microsoft® Windows® Driver Development Kit (DDK) documentation.