Bug 1059389 - Unbreak --disable-webrtc. r=jesup

--HG--
extra : rebase_source : 4ef5373b44a889c0641b0e829e3feae2a0116f5e
This commit is contained in:
Paul Adenot 2014-09-09 18:23:01 +02:00
Родитель ee916d4351
Коммит 6bf737fc9a
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -509,7 +509,9 @@ MediaStreamGraphImpl::MarkConsumed(MediaStream* aStream)
void
MediaStreamGraphImpl::UpdateStreamOrder()
{
#ifdef MOZ_WEBRTC
bool shouldAEC = false;
#endif
bool audioTrackPresent = false;
// Value of mCycleMarker for unvisited streams in cycle detection.
const uint32_t NOT_VISITED = UINT32_MAX;
@ -520,10 +522,12 @@ MediaStreamGraphImpl::UpdateStreamOrder()
MediaStream* stream = mStreams[i];
stream->mIsConsumed = false;
stream->mInBlockingSet = false;
#ifdef MOZ_WEBRTC
if (stream->AsSourceStream() &&
stream->AsSourceStream()->NeedsMixing()) {
shouldAEC = true;
}
#endif
// If this is a AudioNodeStream, force a AudioCallbackDriver.
if (stream->AsAudioNodeStream()) {
audioTrackPresent = true;
@ -550,6 +554,7 @@ MediaStreamGraphImpl::UpdateStreamOrder()
}
}
#ifdef MOZ_WEBRTC
if (shouldAEC && !mFarendObserverRef && gFarendObserver) {
mFarendObserverRef = gFarendObserver;
mMixer.AddCallback(mFarendObserverRef);
@ -559,6 +564,7 @@ MediaStreamGraphImpl::UpdateStreamOrder()
mFarendObserverRef = nullptr;
}
}
#endif
// The algorithm for finding cycles is based on Tim Leslie's iterative
// implementation [1][2] of Pearce's variant [3] of Tarjan's strongly
@ -2708,7 +2714,9 @@ MediaStreamGraphImpl::MediaStreamGraphImpl(bool aRealtime,
, mNonRealtimeProcessing(false)
, mStreamOrderDirty(false)
, mLatencyLog(AsyncLatencyLogger::Get())
#ifdef MOZ_WEBRTCj
, mFarendObserverRef(nullptr)
#endif
, mMemoryReportMonitor("MSGIMemory")
, mSelfRef(MOZ_THIS_IN_INITIALIZER_LIST())
, mAudioStreamSizes()

Просмотреть файл

@ -22,7 +22,9 @@ namespace mozilla {
template <typename T>
class LinkedList;
#ifdef MOZ_WEBRTC
class AudioOutputObserver;
#endif
/**
* A per-stream update message passed from the media graph thread to the
@ -611,7 +613,9 @@ public:
*/
nsRefPtr<AsyncLatencyLogger> mLatencyLog;
AudioMixer mMixer;
#ifdef MOZ_WEBRTC
nsRefPtr<AudioOutputObserver> mFarendObserverRef;
#endif
private:
virtual ~MediaStreamGraphImpl();