mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1536766 - Remove unused MediaStream::HasCurrentData. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D27266 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
fc3f15c331
commit
39580a0cf7
@ -1846,7 +1846,6 @@ MediaStream::MediaStream()
|
||||
mSuspendedCount(0),
|
||||
mFinished(false),
|
||||
mNotifiedFinished(false),
|
||||
mHasCurrentData(false),
|
||||
mMainThreadCurrentTime(0),
|
||||
mMainThreadFinished(false),
|
||||
mFinishedNotificationSent(false),
|
||||
@ -2656,10 +2655,6 @@ void SourceMediaStream::ExtractPendingInput(GraphTime aCurrentTime,
|
||||
}
|
||||
}
|
||||
|
||||
if (mTracks.GetEarliestTrackEnd() > 0) {
|
||||
mHasCurrentData = true;
|
||||
}
|
||||
|
||||
if (finished) {
|
||||
FinishOnGraphThread();
|
||||
}
|
||||
|
@ -490,8 +490,6 @@ class MediaStream : public mozilla::LinkedListElement<MediaStream> {
|
||||
bool IsFinishedOnGraphThread() const { return mFinished; }
|
||||
virtual void FinishOnGraphThread();
|
||||
|
||||
bool HasCurrentData() const { return mHasCurrentData; }
|
||||
|
||||
/**
|
||||
* Find track by track id.
|
||||
*/
|
||||
@ -610,13 +608,6 @@ class MediaStream : public mozilla::LinkedListElement<MediaStream> {
|
||||
* and fired NotifyFinished notifications.
|
||||
*/
|
||||
bool mNotifiedFinished;
|
||||
/**
|
||||
* True if some data can be present by this stream if/when it's unblocked.
|
||||
* Set by the stream itself on the MediaStreamGraph thread. Only changes
|
||||
* from false to true once a stream has data, since we won't
|
||||
* unblock it until there's more data.
|
||||
*/
|
||||
bool mHasCurrentData;
|
||||
|
||||
// Main-thread views of state
|
||||
StreamTime mMainThreadCurrentTime;
|
||||
|
@ -81,7 +81,6 @@ void TrackUnionStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
inputs.AppendElements(mSuspendedInputs);
|
||||
|
||||
bool allFinished = !inputs.IsEmpty();
|
||||
bool allHaveCurrentData = !inputs.IsEmpty();
|
||||
for (uint32_t i = 0; i < inputs.Length(); ++i) {
|
||||
MediaStream* stream = inputs[i]->GetSource();
|
||||
if (!stream->IsFinishedOnGraphThread()) {
|
||||
@ -90,9 +89,6 @@ void TrackUnionStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
// runs out.
|
||||
allFinished = false;
|
||||
}
|
||||
if (!stream->HasCurrentData()) {
|
||||
allHaveCurrentData = false;
|
||||
}
|
||||
for (StreamTracks::TrackIter tracks(stream->GetStreamTracks());
|
||||
!tracks.IsEnded(); tracks.Next()) {
|
||||
bool found = false;
|
||||
@ -144,10 +140,6 @@ void TrackUnionStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
// so we're finished now.
|
||||
FinishOnGraphThread();
|
||||
}
|
||||
if (allHaveCurrentData) {
|
||||
// We can make progress if we're not blocked
|
||||
mHasCurrentData = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t TrackUnionStream::AddTrack(MediaInputPort* aPort,
|
||||
|
@ -43,8 +43,6 @@ AudioNodeStream::AudioNodeStream(AudioNodeEngine* aEngine, Flags aFlags,
|
||||
mSuspendedCount = !(mIsActive || mFlags & EXTERNAL_OUTPUT);
|
||||
mChannelCountMode = ChannelCountMode::Max;
|
||||
mChannelInterpretation = ChannelInterpretation::Speakers;
|
||||
// AudioNodes are always producing data
|
||||
mHasCurrentData = true;
|
||||
mLastChunks.SetLength(std::max(uint16_t(1), mEngine->OutputCount()));
|
||||
MOZ_COUNT_CTOR(AudioNodeStream);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user