зеркало из https://github.com/mozilla/gecko-dev.git
bug 1382366 move declaration of mWaitState to SystemClockDriver f=pehrsons r=padenot
MozReview-Commit-ID: IBqJRjL2Ruk --HG-- extra : histedit_source : bf467862aa715292c446fa037958338993096441
This commit is contained in:
Родитель
7c98745089
Коммит
ef7235b44f
|
@ -30,7 +30,6 @@ GraphDriver::GraphDriver(MediaStreamGraphImpl* aGraphImpl)
|
|||
: mIterationStart(0),
|
||||
mIterationEnd(0),
|
||||
mGraphImpl(aGraphImpl),
|
||||
mWaitState(WAITSTATE_RUNNING),
|
||||
mCurrentTimeStamp(TimeStamp::Now()),
|
||||
mPreviousDriver(nullptr),
|
||||
mNextDriver(nullptr),
|
||||
|
@ -263,6 +262,7 @@ SystemClockDriver::SystemClockDriver(MediaStreamGraphImpl* aGraphImpl)
|
|||
: ThreadedDriver(aGraphImpl),
|
||||
mInitialTimeStamp(TimeStamp::Now()),
|
||||
mLastTimeStamp(TimeStamp::Now()),
|
||||
mWaitState(WAITSTATE_RUNNING),
|
||||
mIsFallback(false)
|
||||
{}
|
||||
|
||||
|
@ -771,7 +771,6 @@ AudioCallbackDriver::StartStream()
|
|||
{
|
||||
MonitorAutoLock mon(mGraphImpl->GetMonitor());
|
||||
mStarted = true;
|
||||
mWaitState = WAITSTATE_RUNNING;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -217,22 +217,6 @@ protected:
|
|||
// monitor.
|
||||
MediaStreamGraphImpl* mGraphImpl;
|
||||
|
||||
// This enum specifies the wait state of the driver.
|
||||
enum WaitState {
|
||||
// RunThread() is running normally
|
||||
WAITSTATE_RUNNING,
|
||||
// RunThread() is paused waiting for its next iteration, which will
|
||||
// happen soon
|
||||
WAITSTATE_WAITING_FOR_NEXT_ITERATION,
|
||||
// RunThread() is paused indefinitely waiting for something to change
|
||||
WAITSTATE_WAITING_INDEFINITELY,
|
||||
// Something has signaled RunThread() to wake up immediately,
|
||||
// but it hasn't done so yet
|
||||
WAITSTATE_WAKING_UP
|
||||
};
|
||||
// This must be access with the monitor.
|
||||
WaitState mWaitState;
|
||||
|
||||
// This is used on the main thread (during initialization), and the graph
|
||||
// thread. No monitor needed because we know the graph thread does not run
|
||||
// during the initialization.
|
||||
|
@ -316,6 +300,23 @@ private:
|
|||
// graph thread does not run during the initialization.
|
||||
TimeStamp mInitialTimeStamp;
|
||||
TimeStamp mLastTimeStamp;
|
||||
|
||||
// This enum specifies the wait state of the driver.
|
||||
enum WaitState {
|
||||
// RunThread() is running normally
|
||||
WAITSTATE_RUNNING,
|
||||
// RunThread() is paused waiting for its next iteration, which will
|
||||
// happen soon
|
||||
WAITSTATE_WAITING_FOR_NEXT_ITERATION,
|
||||
// RunThread() is paused indefinitely waiting for something to change
|
||||
WAITSTATE_WAITING_INDEFINITELY,
|
||||
// Something has signaled RunThread() to wake up immediately,
|
||||
// but it hasn't done so yet
|
||||
WAITSTATE_WAKING_UP
|
||||
};
|
||||
// This must be access with the monitor.
|
||||
WaitState mWaitState;
|
||||
|
||||
// This is true if this SystemClockDriver runs the graph because we could not
|
||||
// open an audio stream.
|
||||
bool mIsFallback;
|
||||
|
|
Загрузка…
Ссылка в новой задаче