зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881959 - Tell the MediaStreamGraph when changes to the graph occur. r=roc
--HG-- extra : rebase_source : f5c0021e35fa0b66cc45434b5d23742ff3cc3019
This commit is contained in:
Родитель
71dddda23b
Коммит
7763e90cd9
|
@ -2317,6 +2317,7 @@ MediaStreamGraphImpl::MediaStreamGraphImpl(bool aRealtime)
|
|||
, mPostedRunInStableState(false)
|
||||
, mRealtime(aRealtime)
|
||||
, mNonRealtimeProcessing(false)
|
||||
, mStreamOrderDirty(false)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaStreamGraphLog) {
|
||||
|
@ -2470,4 +2471,11 @@ MediaStreamGraph::StartNonRealtimeProcessing(uint32_t aTicksToProcess)
|
|||
graph->EnsureRunInStableState();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessedMediaStream::AddInput(MediaInputPort* aPort)
|
||||
{
|
||||
mInputs.AppendElement(aPort);
|
||||
GraphImpl()->SetStreamOrderDirty();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -917,10 +917,7 @@ public:
|
|||
friend class MediaStreamGraphImpl;
|
||||
|
||||
// Do not call these from outside MediaStreamGraph.cpp!
|
||||
virtual void AddInput(MediaInputPort* aPort)
|
||||
{
|
||||
mInputs.AppendElement(aPort);
|
||||
}
|
||||
virtual void AddInput(MediaInputPort* aPort);
|
||||
virtual void RemoveInput(MediaInputPort* aPort)
|
||||
{
|
||||
mInputs.RemoveElement(aPort);
|
||||
|
|
|
@ -365,6 +365,13 @@ public:
|
|||
* Remove aPort from the graph and release it.
|
||||
*/
|
||||
void DestroyPort(MediaInputPort* aPort);
|
||||
/**
|
||||
* Mark the media stream order as dirty.
|
||||
*/
|
||||
void SetStreamOrderDirty()
|
||||
{
|
||||
mStreamOrderDirty = true;
|
||||
}
|
||||
|
||||
// Data members
|
||||
|
||||
|
@ -554,6 +561,11 @@ public:
|
|||
* value is only accessed on the main thread.
|
||||
*/
|
||||
bool mNonRealtimeProcessing;
|
||||
/**
|
||||
* True when a change has happened which requires us to recompute the stream
|
||||
* blocking order.
|
||||
*/
|
||||
bool mStreamOrderDirty;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче