PFNKSPIN callback function (ks.h)

An AVStream minidriver's callback routine is called when:

  • There is data available for a KSPIN structure to process. Use this routine to perform Pin-Centric Processing.
  • The relevant KSPIN is serving as a sink pin and is connected to an AVStream source pin.

Syntax

PFNKSPIN Pfnkspin;

NTSTATUS Pfnkspin(
  [in] PKSPIN Pin
)
{...}

Parameters

[in] Pin

Pointer to the KSPIN that has frame data available to process.

Return value

Return STATUS_SUCCESS to continue processing. Return STATUS_PENDING to stop processing until the next triggering event.

Remarks

About AVStrMiniPinProcess

The minidriver specifies this routine's address in the Process member of its KSPIN_DISPATCH structure.

Indicate that a filter uses Pin-Centric Processing by providing this dispatch function. The minidriver sets pin flags in the relevant KSPIN_DESCRIPTOR_EX structure that determine when AVStream calls AVStrMiniPinProcess. If the minidriver sets no flags in the descriptor, the default behavior is that AVStream calls AVStrMiniPinProcess when new data arrives into a previously empty queue. See Pin-Centric Processing for more details on processing triggers.

After processing, the minidriver can prevent the frame from being completed by cloning the leading edge stream pointer. To do this, call KsStreamPointerClone. See Leading and Trailing Edge Stream Pointers.

Alternatively, specify a distinct trailing edge by setting KSPIN_FLAG_DISTINCT_TRAILING_EDGE on KSPIN_DESCRIPTOR_EX. A third option is not to advance the leading edge stream pointer.

The process dispatch is either made at the default IRQL = PASSIVE_LEVEL, or possibly at DISPATCH_LEVEL if the minidriver has specified KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING in the relevant KSPIN_DESCRIPTOR_EX.

This routine is optional.

About AVStrMiniPinConnect

The minidriver specifies this routine's address in the Connect member of its KSPIN_DISPATCH structure.

Return STATUS_SUCCESS or the error returned from the attempt to establish an intra-connection. Do not return STATUS_PENDING.

This routine is optional.

Also see KS Pins.

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 Desktop
Header ks.h (include Ks.h)
IRQL (See Remarks section)

See also

Filter-Centric Processing

KSPIN_DESCRIPTOR_EX

KSPIN_DISPATCH

KsStreamPointerClone

Pin-Centric Processing