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.
NTSTATUS KsPinGetAvailableByteCount( _In_ PKSPIN Pin, _Out_opt_ PLONG InputDataBytes, _Out_opt_ PLONG OutputBufferBytes );
- Pin [in]
A pointer to a KSPIN structure for which to calculate these queue parameters.
- InputDataBytes [out, optional]
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.
- OutputBufferBytes [out, optional]
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.
Returns STATUS_SUCCESS if the requested count(s) have been retrieved. A nonsuccessful return status indicates that Pin does not have an associated queue.
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.
|Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.|