KSPIN_DISPATCH structure (ks.h)

The KSPIN_DISPATCH structure describes the callbacks for which clients can register in order to receive notification of pin events.

Syntax

typedef struct _KSPIN_DISPATCH {
  PFNKSPINIRP                Create;
  PFNKSPINIRP                Close;
  PFNKSPIN                   Process;
  PFNKSPINVOID               Reset;
  PFNKSPINSETDATAFORMAT      SetDataFormat;
  PFNKSPINSETDEVICESTATE     SetDeviceState;
  PFNKSPIN                   Connect;
  PFNKSPINVOID               Disconnect;
  const KSCLOCK_DISPATCH     *Clock;
  const KSALLOCATOR_DISPATCH *Allocator;
} KSPIN_DISPATCH, *PKSPIN_DISPATCH;

Members

Create

A pointer to a minidriver-supplied AVStrMiniPinCreate callback routine. Optional. Can be NULL.

Close

A pointer to a minidriver-supplied AVStrMiniPinClose callback routine. Optional. Can be NULL.

Process

A pointer to a minidriver-supplied AVStrMiniPinProcess callback routine. Optional. Can be NULL.

Reset

A pointer to a minidriver-supplied AVStrMiniPinReset callback routine. Optional. Can be NULL.

SetDataFormat

A pointer to a minidriver-supplied AVStrMiniPinSetDataFormat callback routine. Optional. Can be NULL.

SetDeviceState

A pointer to a minidriver-supplied AVStrMiniPinSetDeviceState callback routine. Optional. Can be NULL.

Connect

A pointer to a minidriver-supplied AVStrMiniPinConnect callback routine. Optional. Can be NULL.

Disconnect

A pointer to a minidriver-supplied AVStrMiniPinDisconnect callback routine. Optional. Can be NULL.

Clock

A pointer to a KSCLOCK_DISPATCH structure. Specify this member for a pin that exposes a clock. Optional. Can be NULL.

Allocator

A pointer to a KSALLOCATOR_DISPATCH structure. Specify this member for a pin that is capable of performing kernel-level allocation. Optional. Can be NULL.

Remarks

Any of the callback pointers can be NULL, indicating that the minidriver does not require to receive notification for this particular dispatch.

If the minidriver needs to determine whether it has been signaled to go to a specific state (for example KSSTATE_RUN), comparing the value of the DeviceState member of KSPIN to KSSTATE_RUN is not a reliable method of doing this. DeviceState refers to the state to which the pin has been signaled to go, not the pipe. To perform the above reliably, instead create a variable in the SetDeviceState callback of this structure and then check this variable to make the determination.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and in Microsoft DirectX 8.0 and later versions.
Header ks.h (include Ks.h)

See also

KSALLOCATOR_DISPATCH

KSCLOCK_DISPATCH

KSPIN

KsCompletePendingRequest