AcxStreamInitAssignAcxStreamCallbacks function (acxstreams.h)

The AcxStreamInitAssignAcxStreamCallbacks function sets the callbacks using an ACX_STREAM_CALLBACKS structure and an ACXSTREAM_INIT object. For more information about ACX Objects, see ACX - Summary of ACX Objects.

Syntax

NTSTATUS AcxStreamInitAssignAcxStreamCallbacks(
  PACXSTREAM_INIT       StreamInit,
  PACX_STREAM_CALLBACKS StreamCallbacks
);

Parameters

StreamInit

Address of a ACXSTREAM_INIT object used to define the stream initialization parameters.

StreamCallbacks

An [ACX_STREAM_CALLBACKS structure](An ACX_STREAM_CALLBACKS structure that is used to define the following callbacks.

  • PFN_ACX_STREAM_PREPARE_HARDWARE
  • PFN_ACX_STREAM_RELEASE_HARDWARE
  • PFN_ACX_STREAM_RUN
  • PFN_ACX_STREAM_PAUSE
  • PFN_ACX_STREAM_ASSIGN_DRM_CONTENT_ID

Return value

Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.

Remarks

Example

Example usage is shown below.

    ACX_STREAM_CALLBACKS            streamCallbacks;
    //
    // Init streaming callbacks.
    //
    ACX_STREAM_CALLBACKS_INIT(&streamCallbacks);
    streamCallbacks.EvtAcxStreamPrepareHardware     = Dsp_EvtStreamPrepareHardware;
    streamCallbacks.EvtAcxStreamReleaseHardware     = Dsp_EvtStreamReleaseHardware;
    streamCallbacks.EvtAcxStreamRun                 = Dsp_EvtStreamRun;
    streamCallbacks.EvtAcxStreamPause               = Dsp_EvtStreamPause;

    status = AcxStreamInitAssignAcxStreamCallbacks(StreamInit, &streamCallbacks);

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

Requirements

Requirement Value
Header acxstreams.h
IRQL PASSIVE_LEVEL

See also