Muokkaa

Jaa


CBaseFilter::m_pLock member

[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.]

Pointer to a critical section that is used to serialize state changes.

Syntax

CCritSec *m_pLock;

Remarks

This variable is initialized in the class constructor; see CBaseFilter::CBaseFilter.

Hold this critical section during state transitions, or when a method accesses the state over several operations. The base class holds the critical section in the following methods:

Do not hold this critical section during streaming operations (that is, when delivering samples to a downstream filter). Serialize streaming operations using a different critical section. Otherwise, it can cause deadlock.

Requirements

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

See also

CBaseFilter Class

Threads and Critical Sections