Microsoft DirectX 9.0

CSourceStream::DoBufferProcessingLoop

The DoBufferProcessingLoop method generates media data and delivers it to the downstream input pin.

Syntax

virtual HRESULT DoBufferProcessingLoop(void);

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

Value Description
S_FALSE Thread received a stop request.
S_OK Stream ended, or downstream filter is not accepting samples.

Remarks

This method implements the main loop that processes data and delivers it downstream. Each time through the loop, the method retrieves an empty media sample from the allocator. It passes the sample to the CSourceStream::FillBuffer method. The FillBuffer method, which the derived class must implement, generates media data and places it in the sample buffer.

The loop ends when any of the following occurs:

The DoBufferProcessingLoop method handles the end-of-stream notification. If an error occurs, it sends an EC_ERRORABORT event to the filter graph manager.

See Also