bug 1217625 remove ADD_STREAM_SUSPENDED r=padenot

Sometimes we'll need an initial suspended count of 2, which is not supported
by this API, but this is not necessary anyway.

--HG--
extra : rebase_source : 56ecca7c14025ea7e18ba9a20e0b7725a610b429
This commit is contained in:
Karl Tomlinson 2015-10-22 22:14:46 +13:00
parent e6e2a0f9e8
commit 3c93b81fd5
4 changed files with 6 additions and 12 deletions

View File

@ -2856,14 +2856,11 @@ MediaStreamGraph::CreateAudioCaptureStream(DOMMediaStream* aWrapper,
}
void
MediaStreamGraph::AddStream(MediaStream* aStream, uint32_t aFlags)
MediaStreamGraph::AddStream(MediaStream* aStream)
{
NS_ADDREF(aStream);
MediaStreamGraphImpl* graph = static_cast<MediaStreamGraphImpl*>(this);
aStream->SetGraphImpl(graph);
if (aFlags & ADD_STREAM_SUSPENDED) {
aStream->IncrementSuspendCount();
}
graph->AppendMessage(new CreateMessage(aStream));
}

View File

@ -1202,13 +1202,10 @@ public:
ProcessedMediaStream* CreateAudioCaptureStream(DOMMediaStream* aWrapper,
TrackID aTrackId);
enum {
ADD_STREAM_SUSPENDED = 0x01
};
/**
* Add a new stream to the graph. Main thread.
*/
void AddStream(MediaStream* aStream, uint32_t aFlags = 0);
void AddStream(MediaStream* aStream);
/* From the main thread, ask the MSG to send back an event when the graph
* thread is running, and audio is being processed. */

View File

@ -33,8 +33,8 @@ AudioNodeExternalInputStream::Create(MediaStreamGraph* aGraph,
RefPtr<AudioNodeExternalInputStream> stream =
new AudioNodeExternalInputStream(aEngine, aGraph->GraphRate());
aGraph->AddStream(stream,
ctx->ShouldSuspendNewStream() ? MediaStreamGraph::ADD_STREAM_SUSPENDED : 0);
stream->mSuspendedCount += ctx->ShouldSuspendNewStream();
aGraph->AddStream(stream);
return stream.forget();
}

View File

@ -77,13 +77,13 @@ AudioNodeStream::Create(AudioContext* aCtx, AudioNodeEngine* aEngine,
RefPtr<AudioNodeStream> stream =
new AudioNodeStream(aEngine, aFlags, graph->GraphRate());
stream->mSuspendedCount += aCtx->ShouldSuspendNewStream();
if (node) {
stream->SetChannelMixingParametersImpl(node->ChannelCount(),
node->ChannelCountModeValue(),
node->ChannelInterpretationValue());
}
graph->AddStream(stream,
aCtx->ShouldSuspendNewStream() ? MediaStreamGraph::ADD_STREAM_SUSPENDED : 0);
graph->AddStream(stream);
return stream.forget();
}