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();
|
AudioSourceNode::DestroyMediaStream();
|
||||||
}
|
}
|
||||||
|
virtual bool SupportsMediaStreams() const MOZ_OVERRIDE
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioBufferSourceNode, AudioSourceNode)
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AudioBufferSourceNode, AudioSourceNode)
|
||||||
|
@ -165,12 +165,14 @@ AudioNode::Connect(AudioNode& aDestination, uint32_t aOutput,
|
|||||||
input->mInputNode = this;
|
input->mInputNode = this;
|
||||||
input->mInputPort = aInput;
|
input->mInputPort = aInput;
|
||||||
input->mOutputPort = aOutput;
|
input->mOutputPort = aOutput;
|
||||||
// Connect streams in the MediaStreamGraph
|
if (SupportsMediaStreams() && aDestination.mStream) {
|
||||||
MOZ_ASSERT(aDestination.mStream->AsProcessedStream());
|
// Connect streams in the MediaStreamGraph
|
||||||
ProcessedMediaStream* ps =
|
MOZ_ASSERT(aDestination.mStream->AsProcessedStream());
|
||||||
static_cast<ProcessedMediaStream*>(aDestination.mStream.get());
|
ProcessedMediaStream* ps =
|
||||||
input->mStreamPort =
|
static_cast<ProcessedMediaStream*>(aDestination.mStream.get());
|
||||||
ps->AllocateInputPort(mStream, MediaInputPort::FLAG_BLOCK_OUTPUT);
|
input->mStreamPort =
|
||||||
|
ps->AllocateInputPort(mStream, MediaInputPort::FLAG_BLOCK_OUTPUT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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_COLLECTING_ISUPPORTS
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS(AudioNode)
|
NS_DECL_CYCLE_COLLECTION_CLASS(AudioNode)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user