Bewerken

Delen via


ACX_STREAM_BRIDGE_CONFIG structure (acxstreams.h)

The AcxStreamBridge structure is used by a circuit to propagate stream creation, the stream’s states transitions and DRM settings between the endpoint's circuit stream segments.

Syntax

typedef struct _ACX_STREAM_BRIDGE_CONFIG {
  ULONG                  Size;
  ULONG                  Flags;
  ACX_STREAM_BRIDGE_TYPE Type;
  ULONG                  InModesCount;
  PCGUID                 *InModes;
  PCGUID                 OutMode;
  ACXOBJECTBAG           OutStreamVarArguments;
  WDF_OBJECT_ATTRIBUTES  TargetStreamAttributes;
} ACX_STREAM_BRIDGE_CONFIG, *PACX_STREAM_BRIDGE_CONFIG;

Members

Size

The length, in bytes, of this structure.

Flags

Bitwise OR of ACX_STREAM_BRIDGE_CONFIG_FLAGS enum.

Type

The ACX_STREAM_BRIDGE_TYPE enum that defines the type of bridge.

InModesCount

The number of AUDIO_SIGNALPROCESSINGMODEs listed in InModes. These are the signal processing modes accepted as input by ACXSTREAMBRIDGE. For more information about audio modes, see Audio Signal Processing Modes.

This field can be zero only if the InModes field is set to NULL.

InModes

A pointer to a list of AUDIO_SIGNALPROCESSINGMODE pointers supported by ACXSTREAMBRIDGE. This field can be NULL. A NULL GUID is a wild card value and it matches any AUDIO_SIGNALPROCESSINGMODEs.

If the input signal processing modes are not defined, the ACXSTREAMBRIDGE does not automatically match any mode. In this case, it is up to the driver to manually add the input stream to the stream bridge.

OutMode

A pointer to an AUDIO_SIGNALPROCESSINGMODE that defines the audio signal processing mode of the output stream. If this field is NULL, the AUDIO_SIGNALPROCESSINGMODE_DEFAULT is used if supported by the associated ACXPIN, else the AUDIO_SIGNALPROCESSINGMODE_RAW is used. If also the latter is not supported, the output stream is created without specifying an audio signal processing mode.

OutStreamVarArguments

And ACXOBJECTBAG object that is used to provide variable arguments for the output stream. This is an optional settings and can be NULL. For more information about ACX Objects, see ACX - Summary of ACX Objects.

TargetStreamAttributes

An WDF_OBJECT_ATTRIBUTES structure that is used to define the ACXTARGETSTREAM object attributes.

Remarks

AcxStreamBridge is used by a circuit to propagate stream creation, the stream’s states transitions and DRM settings between the endpoint's circuit stream segments. This object is only used in a multi-circuit (audio composite) scenario.

A pin can be associated with zero, one or more ACXSTREAMBRIDGEs. ACX searches the associated ACXPIN's signal processing mode list for a stream signal processing mode match. The search stops at the first match.

ACX creates a default ACXSTREAMBRIDGE for a ACXCIRCUIT to ACXCIRCUIT bridge if the driver doesn't create one, and the driver didn't disable the default stream bridge handling with the AcxCircuitInitDisableDefaultStreamBridgeHandling function.

If the associated ACXPIN supports the specified audio signal processing mode, the default data-format for that audio signal processing mode is used when creating the output stream.

If the associated ACXPIN doesn't support the specified audio signal processing mode, the input stream's data format is used when creating the output stream.

The ACXSTREAMBRIDGE must be parented to an object that has ACXCIRCUIT as an ancestor.

Example usage is shown below.

        ACXSTREAMBRIDGE             bridge          = NULL;
        ACX_STREAM_BRIDGE_CONFIG    bridgeCfg;
    
        ACX_STREAM_BRIDGE_CONFIG_INIT(&bridgeCfg);
        bridgeCfg.InModesCount = 0;     // no in-modes. this stream-bridge is manually managed.
        bridgeCfg.InModes      = NULL; 
        bridgeCfg.OutMode      = NULL;  // no mode, i.e., default (1st), raw (2nd) or no mode (3rd).
        bridgeCfg.Flags       |= AcxStreamBridgeInvertChangeStateSequence;

        WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
        attributes.ParentObject = pin;

        status = AcxStreamBridgeCreate(Circuit, &attributes, &bridgeCfg, &bridge);

This example shows how to set a stream BRIDGE for RAW and DEFAULT modes.

    //
    // Add a stream BRIDGE for RAW and DEFAULT modes.
    //
    PCGUID  inModes[] = 
    {
        &AUDIO_SIGNALPROCESSINGMODE_DEFAULT, 
        &AUDIO_SIGNALPROCESSINGMODE_RAW,
    };

    WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
    attributes.ParentObject = pin;

    ACXSTREAMBRIDGE bridge = NULL;
    ACX_STREAM_BRIDGE_CONFIG bridgeCfg;
 
    ACX_STREAM_BRIDGE_CONFIG_INIT(&bridgeCfg);
    streamCfg.InModesCount = 2;
    streamCfg.InModes      = inModes; 
    streamCfg.OutMode      = &AUDIO_SIGNALPROCESSINGMODE_DEFAULT;

    status = AcxStreamBridgeCreate(circuit, &attributes, &bridgeCfg, &bridge);

ACX requirements

Minimum ACX version: 1.0

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

Requirements

Requirement Value
Header acxstreams.h

See also