IMiniportWaveCyclic::NewStream method

The NewStream method creates a new instance of a logical stream that is associated with a specified physical channel.

Syntax


NTSTATUS NewStream(
  [out]           PMINIPORTWAVECYCLICSTREAM *Stream,
  [in, optional]  PUNKNOWN OuterUnknown,
  [in]            POOL_TYPE PoolType,
  [in]            ULONG Pin,
  [in]            BOOLEAN Capture,
  [in]            PKSDATAFORMAT DataFormat,
  [out]           PDMACHANNEL *DmaChannel,
  [out]           PSERVICEGROUP *ServiceGroup
);

Parameters

Stream [out]

Output pointer for the new stream. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the stream object's IMiniportWaveCyclicStream interface. The caller specifies a valid, non-NULL pointer value for this parameter.

OuterUnknown [in, optional]

Pointer to the IUnknown interface of an object that needs to aggregate the stream object. This parameter is optional. If aggregation is not required, the caller specifies this parameter as NULL.

PoolType [in]

Specifies the type of memory pool from which the storage for the DMA-channel object should be allocated. This parameter will be one of the nonpaged pool types defined in the POOL_TYPE enumeration.

Pin [in]

Number of the pin that is to be opened. If the WaveCyclic miniport driver's IMiniport::GetDescription method outputs a filter descriptor that specifies a total of n pin factories on the filter, then valid values for parameter Pin are in the range 0 to n-1.

Capture [in]

Specifies whether to create a capture stream or a render stream. This parameter is TRUE for a capture (input) channel, and FALSE for a playback (output) channel.

DataFormat [in]

Pointer to a KSDATAFORMAT structure indicating the format to use for this instance.

DmaChannel [out]

Output pointer to the DMA channel. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the IDmaChannel interface of the miniport driver's DMA-channel object. The caller specifies a valid, non-NULL pointer value for this parameter. For more information, see the following Remarks section.

ServiceGroup [out]

Output pointer for the service group. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the IServiceGroup interface of the stream's service group object. This is the service group that is being registered for interrupt notification. The caller specifies a valid, non-NULL pointer value for this parameter.

Return value

NewStream returns STATUS_SUCCESS if the call was successful. Otherwise, the method returns an appropriate error code.

Remarks

The NewStream method sets the initial state of the stream to KSSTATE_STOP and its initial position to zero. (See IMiniportWaveCyclicStream::SetState and IMiniportWaveCyclicStream::GetPosition.)

The port driver calls only the following methods on the DmaChannel object:

IDmaChannel::AllocatedBufferSize

IDmaChannel::BufferSize

IDmaChannel::CopyFrom

IDmaChannel::CopyTo

IDmaChannel::SetBufferSize

IDmaChannel::SystemAddress

The Stream, OuterUnknown, DmaChannel, and ServiceGroup parameters follow the reference-counting conventions for COM objects.

Requirements

Header

Portcls.h (include Portcls.h)

IRQL

PASSIVE_LEVEL

See also

IMiniportWaveCyclicStream
POOL_TYPE
IMiniport::GetDescription
KSDATAFORMAT
IDmaChannel
IServiceGroup

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft