void SourceBuffer::AppendDataCompletedWithSuccess(bool aHasActiveTracks) { mPendingAppend.Complete(); if (!mUpdating) { // The buffer append algorithm has been interrupted by abort(). return; } if (aHasActiveTracks) { if (!mActive) { mActive = true; mMediaSource->SourceBufferIsActive(this); mMediaSource->QueueInitializationEvent(); if (mIsUsingFormatReader) { mMediaSource->GetDecoder()->NotifyWaitingForResourcesStatusChanged(); } } } if (mActive && mIsUsingFormatReader) { // Tell our parent decoder that we have received new data. // The information provided do not matter much so long as it is monotonically // increasing. mMediaSource->GetDecoder()->NotifyDataArrived(1, mReportedOffset++, /* aThrottleUpdates = */ false); // Send progress event. mMediaSource->GetDecoder()->NotifyBytesDownloaded(); } CheckEndTime(); StopUpdating(); }
void SourceBuffer::AppendDataCompletedWithSuccess(SourceBufferTask::AppendBufferResult aResult) { MOZ_ASSERT(mUpdating); mPendingAppend.Complete(); if (aResult.first()) { if (!mActive) { mActive = true; mMediaSource->SourceBufferIsActive(this); } } if (mActive) { // Tell our parent decoder that we have received new data. mMediaSource->GetDecoder()->NotifyDataArrived(); // Send progress event. mMediaSource->GetDecoder()->NotifyBytesDownloaded(); } mCurrentAttributes = aResult.second(); CheckEndTime(); StopUpdating(); }
void SourceBuffer::AppendDataCompletedWithSuccess(bool aHasActiveTracks) { mPendingAppend.Complete(); if (!mUpdating) { // The buffer append algorithm has been interrupted by abort(). return; } if (aHasActiveTracks) { if (!mActive) { mActive = true; mMediaSource->SourceBufferIsActive(this); } } if (mActive) { // Tell our parent decoder that we have received new data. mMediaSource->GetDecoder()->NotifyDataArrived(); // Send progress event. mMediaSource->GetDecoder()->NotifyBytesDownloaded(); } CheckEndTime(); StopUpdating(); }
void SourceBuffer::AppendDataCompletedWithSuccess(bool aGotMedia) { mPendingAppend.Complete(); if (!mUpdating) { // The buffer append algorithm has been interrupted by abort(). return; } if (mTrackBuffer->HasInitSegment()) { if (!mActive) { mActive = true; mMediaSource->SourceBufferIsActive(this); mMediaSource->QueueInitializationEvent(); } } if (aGotMedia) { CheckEndTime(); } StopUpdating(); }