Expand Minimize

KsStreamPointerClone function

The KsStreamPointerClone function creates a clone of a given stream pointer.

Syntax


NTSTATUS KsStreamPointerClone(
  _In_      PKSSTREAM_POINTER StreamPointer,
  _In_opt_  PFNKSSTREAMPOINTER CancelCallback,
  _In_      ULONG ContextSize,
  _Out_     PKSSTREAM_POINTER *CloneStreamPointer
);

Parameters

StreamPointer [in]

A pointer to a KSSTREAM_POINTER structure representing the stream pointer that is to be cloned.

CancelCallback [in, optional]

Optional. A pointer to a minidriver-supplied AVStrMiniCancelCallback routine. AVStream calls this routine if the IRP associated with CloneStreamPointer is canceled.

ContextSize [in]

This parameter indicates how many bytes of minidriver context information the resulting clone stream pointer should have. If nonzero, the requested number of bytes are allocated immediately after the returned stream pointer, and the Context field of CloneStreamPointer points to the allocated memory.

CloneStreamPointer [out]

A pointer to a pointer to a KSSTREAM_POINTER structure. Upon successful completion of the cloning operation, CloneStreamPointer contains a pointer to the address of the cloned stream pointer.

Return value

KsStreamPointerClone returns either STATUS_SUCCESS, indicating that the cloning operation completed normally, or an appropriate error code.

Remarks

The resulting clone initially refers to the same data frame as the original stream pointer and is in the same state (locked or unlocked). Adding a clone stream pointer referencing a data frame increments the reference count on that particular frame. Note that the frame in question, and therefore the IRP to which the frame belongs, is not completed until the reference count drops to zero.

You can use the ContextSize parameter of this call to minimize allocation calls.

Also see Stream Pointers.

Requirements

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

<=DISPATCH_LEVEL

See also

KsStreamPointerDelete
KsStreamPointerLock
KsStreamPointerUnlock
KsStreamPointerAdvance
KsStreamPointerAdvanceOffsets
KsStreamPointerAdvanceOffsetsAndUnlock

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft