Pin Property Set

[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 pin property set returns the pin category for a pin on a filter. The category is set by the filter when it creates the pin; the category indicates what type of data the pin is delivered or receives by this pin.

Label Value
Property Set GUID AMPROPSETID_Pin

 

Property ID Description
AMPROPERTY_PIN_CATEGORY Specifies the category of a pin.

 

DirectShow defines the following pin categories in the Uuids.h header file.

Category GUID Description
PIN_CATEGORY_ANALOGVIDEOIN Input pin of the capture filter that takes analog and digitizes it.
PIN_CATEGORY_CAPTURE Capture pin.
PIN_CATEGORY_CC Pin providing closed captioning data from Line 21.
PIN_CATEGORY_EDS Pin providing Extended Data Services (Line 21, even fields).
PIN_CATEGORY_NABTS Pin providing North American Videotext Standard data.
PIN_CATEGORY_PREVIEW Preview pin.
PIN_CATEGORY_STILL Pin that provides a still image. The filter's capture pin must be connected before the still-image pin is connected.
PIN_CATEGORY_TELETEXT Pin providing teletext (a closed captioning variant).
PIN_CATEGORY_TIMECODE Pin providing timecode data.
PIN_CATEGORY_VBI Pin providing vertical blanking interval data.
PIN_CATEGORY_VIDEOPORT Video output pin to be connected to input pin zero on the Overlay Mixer.
PIN_CATEGORY_VIDEOPORT_VBI Pin to be connected to the VBI Surface Allocator, the VBI surface allocator filter that is needed to allocate the correct video memory for things like closed captioning overlays in scenarios where a video port is being used. PCI, IEEE 1394, and USB scenarios do not use this filter.
PINNAME_VIDEO_CC_CAPTURE Hardware slicing closed-captioning pin

 

This property is read-only.

Example Code

The following code shows how to check whether a pin supports this property set, and if so, how to obtain the pin category:

HRESULT GetPinCategory(IPin *pPin, GUID *pPinCategory)
{
    IKsPropertySet *pKs = NULL;

    HRESULT hr = pPin->QueryInterface(IID_PPV_ARGS(&pKs));
    if (FAILED(hr))
    {
        return hr;
    }

    // Try to retrieve the pin category.
    DWORD cbReturned = 0;
    hr = pKs->Get(AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY, NULL, 0, 
        pPinCategory, sizeof(GUID), &cbReturned);
    
    // If this succeeded, pPinCategory now contains the category GUID.

    SafeRelease(&pKs);
    return hr;
}

Note

This example uses the SafeRelease function to release interface pointers.

 

Pin Requirements for Capture Filters

Property Sets

Working with Pin Categories