зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646719 - P1: Add more debugging logs r=gerald
Add some logs that can help us to check how many cache-streams are suspended and the working status in `MediaCache::Update` Differential Revision: https://phabricator.services.mozilla.com/D92124
This commit is contained in:
Родитель
6d61924d28
Коммит
9d1970b6ea
|
@ -5637,6 +5637,8 @@ void HTMLMediaElement::SeekAborted() {
|
|||
}
|
||||
|
||||
void HTMLMediaElement::NotifySuspendedByCache(bool aSuspendedByCache) {
|
||||
LOG(LogLevel::Debug,
|
||||
("%p, mDownloadSuspendedByCache=%d", this, aSuspendedByCache));
|
||||
mDownloadSuspendedByCache = aSuspendedByCache;
|
||||
}
|
||||
|
||||
|
|
|
@ -1511,6 +1511,14 @@ void MediaCache::Update() {
|
|||
} else if (!enableReading && !stream->mCacheSuspended) {
|
||||
actions[i].mTag = StreamAction::SUSPEND;
|
||||
}
|
||||
LOG("Stream %p, mCacheSuspended=%d, enableReading=%d, action=%s", stream,
|
||||
stream->mCacheSuspended, enableReading,
|
||||
actions[i].mTag == StreamAction::SEEK
|
||||
? "SEEK"
|
||||
: actions[i].mTag == StreamAction::RESUME
|
||||
? "RESUME"
|
||||
: actions[i].mTag == StreamAction::SUSPEND ? "SUSPEND"
|
||||
: "NONE");
|
||||
}
|
||||
#ifdef DEBUG
|
||||
mInUpdate = false;
|
||||
|
@ -1751,7 +1759,10 @@ void MediaCache::AllocateAndWriteBlock(AutoLock& aLock,
|
|||
|
||||
void MediaCache::OpenStream(AutoLock& aLock, MediaCacheStream* aStream,
|
||||
bool aIsClone) {
|
||||
LOG("Stream %p opened", aStream);
|
||||
LOG("Stream %p opened, aIsClone=%d, mCacheSuspended=%d, "
|
||||
"mDidNotifyDataEnded=%d",
|
||||
aStream, aIsClone, aStream->mCacheSuspended,
|
||||
aStream->mDidNotifyDataEnded);
|
||||
mStreams.AppendElement(aStream);
|
||||
|
||||
// A cloned stream should've got the ID from its original.
|
||||
|
@ -2707,6 +2718,8 @@ void MediaCacheStream::InitAsClone(MediaCacheStream* aOriginal) {
|
|||
void MediaCacheStream::InitAsCloneInternal(MediaCacheStream* aOriginal) {
|
||||
MOZ_ASSERT(OwnerThread()->IsOnCurrentThread());
|
||||
AutoLock lock(mMediaCache->Monitor());
|
||||
LOG("MediaCacheStream::InitAsCloneInternal(this=%p, original=%p)", this,
|
||||
aOriginal);
|
||||
|
||||
// Download data and notify events if necessary. Note the order is important
|
||||
// in order to mimic the behavior of data being downloaded from the channel.
|
||||
|
|
Загрузка…
Ссылка в новой задаче