KsPinGetLeadingEdgeStreamPointer function (ks.h)

The KsPinGetLeadingEdgeStreamPointer function acquires the leading edge stream pointer for the queue associated with the given pin.

Syntax

KSDDKAPI PKSSTREAM_POINTER KsPinGetLeadingEdgeStreamPointer(
  [in] PKSPIN                 Pin,
  [in] KSSTREAM_POINTER_STATE State
);

Parameters

[in] Pin

A pointer to the KSPIN structure owning the queue for which the leading edge stream pointer should be acquired.

[in] State

This parameter specifies how to acquire the leading edge stream pointer. Can be one of the following:

KSSTREAM_POINTER_STATE_UNLOCKED

Acquire the leading edge stream pointer regardless of whether it references a data frame or not.

No attempts can be made to access any data associated with the pointer until the pointer is locked. Also note that frames associated with an unlocked stream pointer can be canceled.

KSSTREAM_POINTER_STATE_LOCKED

Acquire and lock the leading edge stream pointer. If no data frame is associated with the stream pointer, return NULL. If a nonnull pointer is returned, it is a locked stream pointer and has a data frame associated with it. Frames associated with a locked stream pointer cannot be canceled.

Return value

KsPinGetLeadingEdgeStreamPointer returns a pointer to a KSSTREAM_POINTER structure or NULL. A return value of NULL may occur because there is no queue associated with the pin, indicating that the pin does not use the standard transport mechanism. Alternatively, a return value of NULL may occur because an attempt to lock the leading edge failed, indicating that there is no data frame associated with the leading edge.

Remarks

Filters that implement Pin-Centric Processing often call KsPinGetLeadingEdgeStreamPointer.

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 <=DISPATCH_LEVEL

See also

KsPinGetTrailingEdgeStreamPointer

KsStreamPointerAdvance

KsStreamPointerAdvanceOffsetsAndUnlock

KsStreamPointerClone

KsStreamPointerDelete

KsStreamPointerLock

KsStreamPointerUnlock