KsStreamPointerClone function (ks.h)
The KsStreamPointerClone function creates a clone of a given stream pointer.
Syntax
KSDDKAPI NTSTATUS KsStreamPointerClone(
[in] PKSSTREAM_POINTER StreamPointer,
[in, optional] PFNKSSTREAMPOINTER CancelCallback,
[in] ULONG ContextSize,
[out] PKSSTREAM_POINTER *CloneStreamPointer
);
Parameters
[in] StreamPointer
A pointer to a KSSTREAM_POINTER structure representing the stream pointer that is to be cloned.
[in, optional] CancelCallback
Optional. A pointer to a minidriver-supplied AVStrMiniCancelCallback routine. AVStream calls this routine if the IRP associated with CloneStreamPointer is canceled.
[in] ContextSize
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.
[out] CloneStreamPointer
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
Requirement | Value |
---|---|
Minimum supported client | Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions. |
Target Platform | Universal |
Header | ks.h (include Ks.h) |
Library | Ks.lib |
IRQL | <=DISPATCH_LEVEL |