KsPinGetCopyRelationships function

The KsPinGetCopyRelationships function returns copy relationship information for a pin that is contained within a pin-centric filter.


void KsPinGetCopyRelationships(
  _In_  PKSPIN Pin,
  _Out_ PKSPIN *CopySource,
  _Out_ PKSPIN *DelegateBranch


Pin [in]

A pointer to the KSPIN structure from which you want to acquire copy information.

CopySource [out]

A pointer to a pointer to a KSPIN structure that is the copy source for Pin. If Pin is the copy source, AVStream sets this parameter to NULL.

DelegateBranch [out]

A pointer to a pointer to a KSPIN structure that is the pin from which Pin receives delegated frames. If Pin is the delegator, AVStream sets this parameter to NULL.

Return value



Filter-centric filters receive similar CopySource and DelegateBranch information when AVStream calls the minidriver's AVStrMiniFilterProcess function with an array of KSPROCESSPIN_INDEXENTRY structures.

The only difference is that KsPinGetCopyRelationships returns pointers to PKSPIN rather than pointers to PKSPROCESSPIN. For more information about the CopySource and DelegateBranch parameters, see AVStream Splitters.

All pins operate independently in the context of a pin-centric filter. As a result, a minidriver that calls KsPinGetCopyRelationships is responsible for ensuring that the appropriate synchronization is performed before call time.

To guarantee safety when calling KsPinGetCopyRelationships, either obtain the control mutex (do not use this mechanism in a processing dispatch) or make sure that the pin does not transition below KSSTATE_PAUSE while calling or using the information obtained. For more information about mutexes, see Mutexes in AVStream.

For more information, see Pin-Centric Processing and Filter-Centric Processing.


Target platform



Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.


Ks.h (include Ks.h)



See also




Send comments about this topic to Microsoft