KsGetParent function (ks.h)

The KsGetParent function acquires the parent of the given object.

Syntax

KSDDKAPI PVOID KsGetParent(
  [in] PVOID Object
);

Parameters

[in] Object

A pointer to the AVStream object for which to find the parent. Must be a pointer to one of the following types: KSDEVICE, KSFILTERFACTORY, KSFILTER, or KSPIN. Callers must manually typecast the object to a PVOID.

Return value

KsGetParent returns the parent of Object as a PVOID. Callers must manually cast this return value to whatever the type of the parent of Object is.

Remarks

For a graphical representation of AVStream parent/child relationships, see the diagram in AVStream Object Hierarchy.

The object hierarchy is only guaranteed stable while the appropriate mutex is held, in this case the device mutex. For more information, see Mutexes in AVStream.

Minidrivers rarely use this function directly. Callers of KsGetParent must manually perform typecasts to and from PVOID. There are a number of inline versions that do the casting for you: KsFilterFactoryGetParentDevice, KsFilterGetParentFilterFactory, and KsPinGetParentFilter.

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

KSDEVICE

KSFILTER

KSFILTERFACTORY

KSPIN

KsFilterFactoryGetParentDevice

KsFilterGetParentFilterFactory

KsPinGetParentFilter