bug 1406830 remove unused GraphDriver::Resume() r?padenot
MozReview-Commit-ID: IPpyxOHESLW
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -233,22 +233,16 @@ ThreadedDriver::Start()
if (NS_SUCCEEDED(rv)) {
rv = mThread->EventTarget()->Dispatch(event.forget(), NS_DISPATCH_NORMAL);
mScheduled = NS_SUCCEEDED(rv);
}
}
}
void
-ThreadedDriver::Resume()
-{
- Start();
-}
-
-void
ThreadedDriver::Revive()
{
// Note: only called on MainThread, without monitor
// We know were weren't in a running state
LOG(LogLevel::Debug, ("AudioCallbackDriver reviving."));
// If we were switching, switch now. Otherwise, tell thread to run the main
// loop again.
MonitorAutoLock mon(mGraphImpl->GetMonitor());
@@ -768,26 +762,16 @@ void
AudioCallbackDriver::Destroy()
{
LOG(LogLevel::Debug, ("AudioCallbackDriver destroyed."));
mAudioInput = nullptr;
mAudioStream.reset();
}
void
-AudioCallbackDriver::Resume()
-{
- LOG(LogLevel::Debug,
- ("Resuming audio threads for MediaStreamGraph %p", mGraphImpl));
- if (cubeb_stream_start(mAudioStream) != CUBEB_OK) {
- NS_WARNING("Could not start cubeb stream for MSG.");
- }
-}
-
-void
AudioCallbackDriver::Start()
{
if (mPreviousDriver) {
if (mPreviousDriver->AsAudioCallbackDriver()) {
LOG(LogLevel::Debug, ("Releasing audio driver off main thread."));
RefPtr<AsyncCubebTask> releaseEvent =
new AsyncCubebTask(mPreviousDriver->AsAudioCallbackDriver(),
AsyncCubebOperation::SHUTDOWN);
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -119,18 +119,16 @@ public:
virtual void WaitForNextIteration() = 0;
/* Wakes up the graph if it is waiting. */
virtual void WakeUp() = 0;
virtual void Destroy() {}
/* Start the graph, init the driver, start the thread. */
virtual void Start() = 0;
/* Stop the graph, shutting down the thread. */
virtual void Stop() = 0;
- /* Resume after a stop */
- virtual void Resume() = 0;
/* Revive this driver, as more messages just arrived. */
virtual void Revive() = 0;
/* Remove Mixer callbacks when switching */
virtual void RemoveCallback() = 0;
/* Shutdown GraphDriver (synchronously) */
void Shutdown();
/* Rate at which the GraphDriver runs, in ms. This can either be user
* controlled (because we are using a {System,Offline}ClockDriver, and decide
@@ -270,17 +268,16 @@ class MediaStreamGraphInitThreadRunnable
*/
class ThreadedDriver : public GraphDriver
{
public:
explicit ThreadedDriver(MediaStreamGraphImpl* aGraphImpl);
virtual ~ThreadedDriver();
void Start() override;
void Stop() override;
- void Resume() override;
void Revive() override;
void RemoveCallback() override;
/**
* Runs main control loop on the graph thread. Normally a single invocation
* of this runs for the entire lifetime of the graph thread.
*/
void RunThread();
friend class MediaStreamGraphInitThreadRunnable;
@@ -392,17 +389,16 @@ class AudioCallbackDriver : public Graph
{
public:
explicit AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl);
virtual ~AudioCallbackDriver();
void Destroy() override;
void Start() override;
void Stop() override;
- void Resume() override;
void Revive() override;
void RemoveCallback() override;
void WaitForNextIteration() override;
void WakeUp() override;
#if defined(XP_WIN)
void ResetDefaultDevice() override;
#endif