Expand Minimize

KsPinGetAvailableByteCount routine

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


NTSTATUS KsPinGetAvailableByteCount(
  _In_      PKSPIN Pin,
  _Out_opt_ PLONG  InputDataBytes,
  _Out_opt_ PLONG  OutputBufferBytes
);

Parameters

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.

Return value

Returns STATUS_SUCCESS if the requested count(s) have been retrieved. A nonsuccessful 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

Target platform

Universal

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

See also

KSPIN_DESCRIPTOR_EX
KsPinGetLeadingEdgeStreamPointer
KsPinGetTrailingEdgeStreamPointer
KSSTREAM_POINTER
KSPIN_DISPATCH
AVStrMiniPinProcess
KsFilterAcquireProcessingMutex
KsPinAcquireProcessingMutex
KsFilterReleaseProcessingMutex
KsPinReleaseProcessingMutex

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft