KsPinRegisterFrameReturnCallback function (ks.h)

The KsPinRegisterFrameReturnCallback function registers a frame return callback with AVStream for a given pin.

Syntax

void KsPinRegisterFrameReturnCallback(
  [in] PKSPIN              Pin,
  [in] PFNKSPINFRAMERETURN FrameReturn
);

Parameters

[in] Pin

A pointer to the AVStream KSPIN structure that you want to place into injection mode by registering a frame return callback.

[in] FrameReturn

This parameter supplies the address of a minidriver-provided AVStrMiniFrameReturn routine.

Return value

None

Remarks

If a pin has registered a frame return callback before transitioning from KSSTATE_STOP to KSSTATE_ACQUIRE, the pin is placed into injection mode. This indicates that the pin will not receive buffers and fill them, but rather manually inject data frames into the circuit using KsPinSubmitFrame or KsPinSubmitFrameMdl. When the data frame completes its travel around the circuit and returns to the pin on which it was submitted, AVStream recycles it by calling AVStrMiniFrameReturn.

Minidrivers that call this function are directly responsible for injecting frames into the circuit; they do not receive buffers to fill and do not directly interact with the queue as do most minidrivers. Also note that the frame return callback should be registered before the kernel pipe section is created. The kernel pipe section is created when the pin transitions to KSSTATE_ACQUIRE. For more information, see Frame Injection.

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

AVStrMiniFrameReturn

KsPinSubmitFrame

KsPinSubmitFrameMdl