KsPinRegisterIrpCompletionCallback function

The KsPinRegisterIrpCompletionCallback function registers a minidriver-defined callback routine for a specified pin. AVStream calls the minidriver-provided routine when an IRP completes a pass around the circuit and the frame that is associated with the IRP is about to be recycled or retired.

Syntax


void KsPinRegisterIrpCompletionCallback(
  _In_ PKSPIN                Pin,
  _In_ PFNKSPINIRPCOMPLETION IrpCompletion
);

Parameters

Pin [in]

A pointer to the KSPIN structure for which to register a completion callback.

IrpCompletion [in]

This parameter supplies the address of a AVStrMiniPinIrpCompletion routine to be called when an IRP completes its traversal of the circuit and is about to be recycled or retired.

Return value

None

Remarks

KsPinRegisterIrpCompletionCallback must be called at IRQL=PASSIVE_LEVEL before the pin goes into KSSTATE_ACQUIRE. For more information about pin states, see KSSTATE.

This function is frequently called from the pin creation dispatch. See KSPIN_DISPATCH.

KsPinRegisterIrpCompletionCallback is only useful on IRP source pins, and is typically used on data source pins. For a data source pin, the callback is made once the IRP is completed back to the pin and is about to be recycled. For a data sink pin, however, the callback is not tied directly to IRP completion. AVStream still makes the callback when the IRP returns for recycling. This return does not occur until that IRP has passed through all the queues that need to use the data that it contains. For information about IRP source/sink pins versus data source/sink pins, see the DataFlow and Communication members of the KSPIN_DESCRIPTOR structure.

KsPinRegisterIrpCompletionCallback differs significantly from KsPinRegisterFrameReturnCallback in that this routine does not place the pin in any new mode; it simply registers a callback routine.

Requirements

Target platform

Universal

Version

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

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

PASSIVE_LEVEL

See also

KsPinRegisterFrameReturnCallback
KSPIN_DISPATCH
AVStrMiniPinCreate
KSSTATE
KSPIN
AVStrMiniPinIrpCompletion

 

 

Send comments about this topic to Microsoft

Show: