KsFilterGetChildPinCount function (ks.h)

The KsFilterGetChildPinCountfunctionreturns the number of pins of a given type that are currently instantiated on a given filter.

Syntax

KSDDKAPI ULONG KsFilterGetChildPinCount(
  [in] PKSFILTER Filter,
  [in] ULONG     PinId
);

Parameters

[in] Filter

A pointer to the KSFILTER structure for which to find the number of instantiated pins of type PinID.

[in] PinId

The pin type for which to find the number of instantiated pins. PinID is an index into the array of pin descriptors for the filter to which the pin belongs.

Return value

KsFilterGetChildPinCount returns the number of pins of type PinID that are currently instantiated on Filter. If no such pins exist or if PinID is out of range, zero is returned.

Remarks

The count returned by this call is guaranteed to be correct only if the function is called while the filter control mutex is held. The count remains correct after the call as long as this mutex continues to be held. As soon as the mutex is released, other pins can be added or removed, thereby altering the actual pin count.

For more information, see Mutexes in AVStream.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib
IRQL PASSIVE_LEVEL

See also

KSFILTER

KSPIN

KsFilterGetFirstChildPin

KsPinGetNextSiblingPin