CAMThread.ThreadProc method

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The ThreadProc method is the thread procedure.

Syntax

virtual DWORD ThreadProc() = 0;

Parameters

This method has no parameters.

Return value

Returns a DWORD value whose meaning is defined by the derived class.

Remarks

This is a pure virtual method. Implement this method in your derived class to supply a thread procedure. When the CAMThread::Create method creates a thread, it gives the address of the CAMThread::InitialThreadProc method, which in turn calls your ThreadProc method.

Typically, your ThreadProc method will enter a loop that retrieves requests (by calling the CAMThread::GetRequest or CAMThread::CheckRequest methods) and processes data.

When this method returns, the thread exits.

Requirements

Requirement Value
Header
Wxutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CAMThread Class