mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804387. Part 10: Add a mechanism for ensuring that we don't attempt to allocate an input port if the input node is not hooked up to MSG yet. r=roc
This commit is contained in:
parent
41a1e70799
commit
147214ed9d
@ -28,6 +28,10 @@ public:
|
||||
}
|
||||
AudioSourceNode::DestroyMediaStream();
|
||||
}
|
||||
virtual bool SupportsMediaStreams() const MOZ_OVERRIDE
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioBufferSourceNode, AudioSourceNode)
|
||||
|
@ -165,12 +165,14 @@ AudioNode::Connect(AudioNode& aDestination, uint32_t aOutput,
|
||||
input->mInputNode = this;
|
||||
input->mInputPort = aInput;
|
||||
input->mOutputPort = aOutput;
|
||||
// Connect streams in the MediaStreamGraph
|
||||
MOZ_ASSERT(aDestination.mStream->AsProcessedStream());
|
||||
ProcessedMediaStream* ps =
|
||||
static_cast<ProcessedMediaStream*>(aDestination.mStream.get());
|
||||
input->mStreamPort =
|
||||
ps->AllocateInputPort(mStream, MediaInputPort::FLAG_BLOCK_OUTPUT);
|
||||
if (SupportsMediaStreams() && aDestination.mStream) {
|
||||
// Connect streams in the MediaStreamGraph
|
||||
MOZ_ASSERT(aDestination.mStream->AsProcessedStream());
|
||||
ProcessedMediaStream* ps =
|
||||
static_cast<ProcessedMediaStream*>(aDestination.mStream.get());
|
||||
input->mStreamPort =
|
||||
ps->AllocateInputPort(mStream, MediaInputPort::FLAG_BLOCK_OUTPUT);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -60,6 +60,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// This method should be overridden to return true in nodes
|
||||
// which support being hooked up to the Media Stream graph.
|
||||
virtual bool SupportsMediaStreams() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(AudioNode)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user