mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 1189506. Remove MediaStream::mBlockInThisPhase. r=karlt
--HG-- extra : commitid : HnnHdwAwJZ0 extra : rebase_source : 403dd9e309f56f0aa84467f0652ac5b6a98c242d
This commit is contained in:
parent
4de38847f5
commit
49907deeb0
@ -734,21 +734,13 @@ MediaStreamGraphImpl::RecomputeBlocking(GraphTime aEndBlockingDecisions)
|
||||
mStateComputedTime = aEndBlockingDecisions;
|
||||
}
|
||||
|
||||
void
|
||||
MediaStreamGraphImpl::MarkStreamBlocking(MediaStream* aStream)
|
||||
{
|
||||
if (aStream->mBlockInThisPhase)
|
||||
return;
|
||||
aStream->mBlockInThisPhase = true;
|
||||
}
|
||||
|
||||
void
|
||||
MediaStreamGraphImpl::RecomputeBlockingAt(MediaStream* aStream,
|
||||
GraphTime aTime,
|
||||
GraphTime aEndBlockingDecisions,
|
||||
GraphTime* aEnd)
|
||||
{
|
||||
aStream->mBlockInThisPhase = false;
|
||||
bool block = false;
|
||||
|
||||
do {
|
||||
if (aStream->mFinished) {
|
||||
@ -757,7 +749,7 @@ MediaStreamGraphImpl::RecomputeBlockingAt(MediaStream* aStream,
|
||||
if (endTime <= aTime) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is blocked due to being finished", aStream));
|
||||
// We'll block indefinitely
|
||||
MarkStreamBlocking(aStream);
|
||||
block = true;
|
||||
*aEnd = std::min(*aEnd, aEndBlockingDecisions);
|
||||
continue;
|
||||
} else {
|
||||
@ -773,20 +765,20 @@ MediaStreamGraphImpl::RecomputeBlockingAt(MediaStream* aStream,
|
||||
*aEnd = std::min(*aEnd, end);
|
||||
if (explicitBlock) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is blocked due to explicit blocker", aStream));
|
||||
MarkStreamBlocking(aStream);
|
||||
block = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (aStream->IsSuspended()) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is blocked due to being suspended", aStream));
|
||||
MarkStreamBlocking(aStream);
|
||||
block = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
bool underrun = WillUnderrun(aStream, aTime, aEndBlockingDecisions, aEnd);
|
||||
if (underrun) {
|
||||
// We'll block indefinitely
|
||||
MarkStreamBlocking(aStream);
|
||||
block = true;
|
||||
*aEnd = std::min(*aEnd, aEndBlockingDecisions);
|
||||
continue;
|
||||
}
|
||||
@ -794,7 +786,7 @@ MediaStreamGraphImpl::RecomputeBlockingAt(MediaStream* aStream,
|
||||
|
||||
NS_ASSERTION(*aEnd > aTime, "Failed to advance!");
|
||||
|
||||
aStream->mBlocked.SetAtAndAfter(aTime, aStream->mBlockInThisPhase);
|
||||
aStream->mBlocked.SetAtAndAfter(aTime, block);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -717,8 +717,6 @@ protected:
|
||||
// True if the stream is being consumed (i.e. has track data being played,
|
||||
// or is feeding into some stream that is being consumed).
|
||||
bool mIsConsumed;
|
||||
// True if this stream should be blocked in this phase.
|
||||
bool mBlockInThisPhase;
|
||||
|
||||
// This state is only used on the main thread.
|
||||
DOMMediaStream* mWrapper;
|
||||
|
@ -304,12 +304,6 @@ public:
|
||||
*/
|
||||
void RecomputeBlocking(GraphTime aEndBlockingDecisions);
|
||||
|
||||
/**
|
||||
* Mark a stream blocked at time aTime. If this results in decisions that need
|
||||
* to be revisited at some point in the future, *aEnd will be reduced to the
|
||||
* first time in the future to recompute those decisions.
|
||||
*/
|
||||
void MarkStreamBlocking(MediaStream* aStream);
|
||||
/**
|
||||
* Recompute blocking for the streams in aStreams for the interval starting at aTime.
|
||||
* If this results in decisions that need to be revisited at some point
|
||||
|
Loading…
Reference in New Issue
Block a user