KsPinGetAvailableByteCount function (ks.h)
The KsPinGetAvailableByteCount routine outputs the number of bytes of input data ahead of the leading edge and the number of bytes of output buffer ahead of the leading edge, both for the queue of a caller-specified pin.
Syntax
KSDDKAPI NTSTATUS KsPinGetAvailableByteCount(
[in] PKSPIN Pin,
[out, optional] PLONG InputDataBytes,
[out, optional] PLONG OutputBufferBytes
);
Parameters
[in] Pin
A pointer to a KSPIN structure for which to calculate these queue parameters.
[out, optional] InputDataBytes
A pointer to a LONG value in which the routine returns the number of input data bytes ahead of the leading edge. Caller sets to NULL if this value is not requested.
[out, optional] OutputBufferBytes
A pointer to a LONG value in which the routine returns the number of output buffer bytes ahead of the leading edge. Caller sets to NULL if this value is not requested.
Return value
Returns STATUS_SUCCESS if the requested count(s) have been retrieved. An unsuccessful return status indicates that Pin does not have an associated queue.
Remarks
Noninplace pins should use InputDataBytes for input pins and OutputBufferBytes for output pins.
The results of this call are not guaranteed to be safe unless either the processing mutex is held at call-time, or the caller has privately synchronized before calling the routine. To private synchronize, ensure that the pin does not transition from Acquire to Stop while the routine is executing. See Processing Mutex in AVStream.
Also note that in-place transform can supply input and output counts.
In Windows XP and DirectX 8.0, the InputDataBytes count is not valid unless frames that the filter receives are full.
For additional information, see Leading and Trailing Edge 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 |
See also
KsFilterAcquireProcessingMutex
KsFilterReleaseProcessingMutex
KsPinGetLeadingEdgeStreamPointer