diff options
Diffstat (limited to 'thirdparties/win32/include/directshow/strmctl.h')
-rwxr-xr-x | thirdparties/win32/include/directshow/strmctl.h | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/thirdparties/win32/include/directshow/strmctl.h b/thirdparties/win32/include/directshow/strmctl.h index 4077e6c..b0a019b 100755 --- a/thirdparties/win32/include/directshow/strmctl.h +++ b/thirdparties/win32/include/directshow/strmctl.h @@ -14,15 +14,15 @@ class CBaseStreamControl : public IAMStreamControl { public: // Used by the implementation - enum StreamControlState - { STREAM_FLOWING = 0x1000, - STREAM_DISCARDING + enum StreamControlState { + STREAM_FLOWING = 0x1000, + STREAM_DISCARDING }; private: enum StreamControlState m_StreamState; // Current stream state enum StreamControlState m_StreamStateOnStop; // State after next stop - // (i.e.Blocking or Discarding) + // (i.e.Blocking or Discarding) REFERENCE_TIME m_tStartTime; // MAX_TIME implies none REFERENCE_TIME m_tStopTime; // MAX_TIME implies none @@ -51,14 +51,14 @@ private: // Your pin must also expose IAMStreamControl when QI'd for it! // IReferenceClock * m_pRefClock; // Need it to set advises - // Filter must tell us via - // SetSyncSource + // Filter must tell us via + // SetSyncSource IMediaEventSink * m_pSink; // Event sink - // Filter must tell us after it - // creates it in JoinFilterGraph() + // Filter must tell us after it + // creates it in JoinFilterGraph() FILTER_STATE m_FilterState; // Just need it! - // Filter must tell us via - // NotifyFilterState + // Filter must tell us via + // NotifyFilterState REFERENCE_TIME m_tRunStart; // Per the Run call to the filter // This guy will return one of the three StreamControlState's. Here's what @@ -72,7 +72,7 @@ private: // fires, call me back - I've changed my mind. // enum StreamControlState CheckSampleTimes( __in const REFERENCE_TIME * pSampleStart, - __in const REFERENCE_TIME * pSampleStop ); + __in const REFERENCE_TIME * pSampleStop ); public: // You don't have to tell us much when we're created, but there are other @@ -90,18 +90,21 @@ public: // We need a clock to see what time it is. This is for the // "discard in a timely fashion" logic. If we discard everything as // quick as possible, a whole 60 minute file could get discarded in the - // first 10 seconds, and if somebody wants to turn streaming on at 30 + // first 10 seconds, and if somebody wants to turn streaming on at 30 // minutes into the file, and they make the call more than a few seconds // after the graph is run, it may be too late! // So we hold every sample until it's time has gone, then we discard it. // The filter should call this when it gets a SetSyncSource // - void SetSyncSource( IReferenceClock * pRefClock ) - { - CAutoLock lck(&m_CritSec); - if (m_pRefClock) m_pRefClock->Release(); - m_pRefClock = pRefClock; - if (m_pRefClock) m_pRefClock->AddRef(); + void SetSyncSource( IReferenceClock * pRefClock ) { + CAutoLock lck(&m_CritSec); + if (m_pRefClock) { + m_pRefClock->Release(); + } + m_pRefClock = pRefClock; + if (m_pRefClock) { + m_pRefClock->AddRef(); + } } // Set event sink for notifications @@ -130,10 +133,10 @@ public: // muting and unmuting of the stream. STDMETHODIMP StopAt( const REFERENCE_TIME * ptStop = NULL, - BOOL bSendExtra = FALSE, - DWORD dwCookie = 0 ); + BOOL bSendExtra = FALSE, + DWORD dwCookie = 0 ); STDMETHODIMP StartAt( const REFERENCE_TIME * ptStart = NULL, - DWORD dwCookie = 0 ); + DWORD dwCookie = 0 ); STDMETHODIMP GetInfo( __out AM_STREAM_INFO *pInfo); // Helper function for pin's receive method. Call this with @@ -149,9 +152,15 @@ private: // These don't require locking, but we are relying on the fact that // m_StreamState can be retrieved with integrity, and is a snap shot that // may have just been, or may be just about to be, changed. - HANDLE GetStreamEventHandle() const { return m_StreamEvent; } - enum StreamControlState GetStreamState() const { return m_StreamState; } - BOOL IsStreaming() const { return m_StreamState == STREAM_FLOWING; } + HANDLE GetStreamEventHandle() const { + return m_StreamEvent; + } + enum StreamControlState GetStreamState() const { + return m_StreamState; + } + BOOL IsStreaming() const { + return m_StreamState == STREAM_FLOWING; + } }; #endif |