Previous Next

KSPIN_DISPATCH

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

typedef struct {
  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
Pointer to a minidriver-supplied AVStrMiniPinCreate callback routine. Optional. Can be NULL.
Close
Pointer to a minidriver-supplied AVStrMiniPinClose callback routine. Optional. Can be NULL.
Process
Pointer to a minidriver-supplied AVStrMiniPinProcess callback routine. Optional. Can be NULL.
Reset
Pointer to a minidriver-supplied AVStrMiniPinReset callback routine. Optional. Can be NULL.
SetDataFormat
Pointer to a minidriver-supplied AVStrMiniPinSetDataFormat callback routine. Optional. Can be NULL.
SetDeviceState
Pointer to a minidriver-supplied AVStrMiniPinSetDeviceState callback routine. Optional. Can be NULL.
Connect
Pointer to a minidriver-supplied AVStrMiniPinConnect callback routine. Optional. Can be NULL.
Disconnect
Pointer to a minidriver-supplied AVStrMiniPinDisconnect callback routine. Optional. Can be NULL.
Clock
Pointer to a KSCLOCK_DISPATCH structure. Specify this member for a pin that exposes a clock. Optional. Can be NULL.
Allocator
Pointer to a KSALLOCATOR_DISPATCH structure. Specify this member for a pin that is capable of performing kernel-level allocation. Optional. Can be NULL.

Headers

Declared in ks.h. Include ks.h.

Comments

This structure is available in Windows XP and later operating systems and in DirectX 8.0 and later versions.

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 or not 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.

See Also

KSCLOCK_DISPATCH, KSALLOCATOR_DISPATCH, KsCompletePendingRequest, KSPIN