Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
committertetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
commita9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch)
tree2dab453d94d5e003379a6cc895eceb84c80e23ec /src/filters/BaseClasses/strmctl.h
parentaafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff)
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren http://astyle.sourceforge.net/ git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/BaseClasses/strmctl.h')
-rw-r--r--src/filters/BaseClasses/strmctl.h71
1 files changed, 41 insertions, 30 deletions
diff --git a/src/filters/BaseClasses/strmctl.h b/src/filters/BaseClasses/strmctl.h
index cb2adf308..5caabaaee 100644
--- a/src/filters/BaseClasses/strmctl.h
+++ b/src/filters/BaseClasses/strmctl.h
@@ -15,14 +15,15 @@ class CBaseStreamControl : public IAMStreamControl
public:
// Used by the implementation
enum StreamControlState
- { STREAM_FLOWING = 0x1000,
- STREAM_DISCARDING
+ {
+ 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 +52,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
@@ -71,8 +72,8 @@ private:
// expires, throw the sample away. If the event
// fires, call me back - I've changed my mind.
//
- enum StreamControlState CheckSampleTimes( __in const REFERENCE_TIME * pSampleStart,
- __in const REFERENCE_TIME * pSampleStop );
+ enum StreamControlState CheckSampleTimes(__in const REFERENCE_TIME * pSampleStart,
+ __in const REFERENCE_TIME * pSampleStop);
public:
// You don't have to tell us much when we're created, but there are other
@@ -90,25 +91,26 @@ 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 )
+ void SetSyncSource(IReferenceClock * pRefClock)
{
- CAutoLock lck(&m_CritSec);
- if (m_pRefClock) m_pRefClock->Release();
- m_pRefClock = pRefClock;
- if (m_pRefClock) m_pRefClock->AddRef();
+ CAutoLock lck(&m_CritSec);
+ if(m_pRefClock) m_pRefClock->Release();
+ m_pRefClock = pRefClock;
+ if(m_pRefClock) m_pRefClock->AddRef();
}
// Set event sink for notifications
// The filter should call this in its JoinFilterGraph after it creates the
// IMediaEventSink
//
- void SetFilterGraph( IMediaEventSink *pSink ) {
+ void SetFilterGraph(IMediaEventSink *pSink)
+ {
m_pSink = pSink;
}
@@ -116,12 +118,12 @@ public:
// state of our owning filter.
// The app should call this ever state change
//
- void NotifyFilterState( FILTER_STATE new_state, REFERENCE_TIME tStart = 0 );
+ void NotifyFilterState(FILTER_STATE new_state, REFERENCE_TIME tStart = 0);
// Filter should call Flushing(TRUE) in BeginFlush,
// and Flushing(FALSE) in EndFlush.
//
- void Flushing( BOOL bInProgress );
+ void Flushing(BOOL bInProgress);
// The two main methods of IAMStreamControl
@@ -129,12 +131,12 @@ public:
// Class adds default values suitable for immediate
// muting and unmuting of the stream.
- STDMETHODIMP StopAt( const REFERENCE_TIME * ptStop = NULL,
- BOOL bSendExtra = FALSE,
- DWORD dwCookie = 0 );
- STDMETHODIMP StartAt( const REFERENCE_TIME * ptStart = NULL,
- DWORD dwCookie = 0 );
- STDMETHODIMP GetInfo( __out AM_STREAM_INFO *pInfo);
+ STDMETHODIMP StopAt(const REFERENCE_TIME * ptStop = NULL,
+ BOOL bSendExtra = FALSE,
+ DWORD dwCookie = 0);
+ STDMETHODIMP StartAt(const REFERENCE_TIME * ptStart = NULL,
+ DWORD dwCookie = 0);
+ STDMETHODIMP GetInfo(__out AM_STREAM_INFO *pInfo);
// Helper function for pin's receive method. Call this with
// the sample and we'll tell you what to do with it. We'll do a
@@ -143,15 +145,24 @@ public:
// caller to either flow it or discard it.
// If pSample is NULL we evaluate based on the current state
// settings
- enum StreamControlState CheckStreamState( IMediaSample * pSample );
+ enum StreamControlState CheckStreamState(IMediaSample * pSample);
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