WebKit Bugzilla
Attachment 373426 Details for
Bug 199473
: [MSE] Add more debug and error logging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199473-20190703154712.patch (text/plain), 6.75 KB, created by
Eric Carlson
on 2019-07-03 15:47:12 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2019-07-03 15:47:12 PDT
Size:
6.75 KB
patch
obsolete
>Subversion Revision: 247005 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1fb5a9c54294f12ca63ebc28ff6539a358bb039e..a4193135f442f3bdc72dd3fd10234155878d9ee0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-07-03 Eric Carlson <eric.carlson@apple.com> >+ >+ [MSE] Add more debug and error logging >+ https://bugs.webkit.org/show_bug.cgi?id=199473 >+ <rdar://problem/52615882> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Modules/mediasource/SourceBuffer.cpp: >+ (WebCore::SourceBuffer::provideMediaData): Log if we don't enqueue every buffer. >+ >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: >+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Log if we return >+ without starting playback. >+ >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: >+ (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Log if >+ prerollDecodeWithCompletionHandler fails. >+ > 2019-07-01 Carlos Garcia Campos <cgarcia@igalia.com> > > Unreviewed. Fix GTK build with GSTREAMER_GL disabled after r246710 >diff --git a/Source/WebCore/Modules/mediasource/SourceBuffer.cpp b/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >index 0bfbb0ac9cb4695c3231e05f744ff971b58532fa..57a79169ada6f325a399d013c2e59ca39c040b2c 100644 >--- a/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >+++ b/Source/WebCore/Modules/mediasource/SourceBuffer.cpp >@@ -2017,6 +2017,7 @@ void SourceBuffer::provideMediaData(TrackBuffer& trackBuffer, const AtomString& > > while (!trackBuffer.decodeQueue.empty()) { > if (!m_private->isReadyForMoreSamples(trackID)) { >+ DEBUG_LOG(LOGIDENTIFIER, "bailing early, track id ", trackID, " is not ready for more data"); > m_private->notifyClientWhenReadyForMoreSamples(trackID); > break; > } >@@ -2036,8 +2037,11 @@ void SourceBuffer::provideMediaData(TrackBuffer& trackBuffer, const AtomString& > MediaTime oneSecond(1, 1); > if (trackBuffer.lastEnqueuedDecodeKey.first.isValid() > && trackBuffer.lastEnqueuedDecodeDuration.isValid() >- && sample->decodeTime() - trackBuffer.lastEnqueuedDecodeKey.first > oneSecond + trackBuffer.lastEnqueuedDecodeDuration) >+ && sample->decodeTime() - trackBuffer.lastEnqueuedDecodeKey.first > oneSecond + trackBuffer.lastEnqueuedDecodeDuration) { >+ >+ DEBUG_LOG(LOGIDENTIFIER, "bailing early because of unbuffered gap, new sample: ", sample->decodeTime(), ", last enqueued sample ends: ", trackBuffer.lastEnqueuedDecodeKey.first + trackBuffer.lastEnqueuedDecodeDuration); > break; >+ } > > // Remove the sample from the decode queue now. > trackBuffer.decodeQueue.erase(trackBuffer.decodeQueue.begin()); >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >index 78e6247251e3938e76edd2de5515c11d0ba3908b..949154e8fe3dea4a9cc4b52c83b49cebd8cc871a 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm >@@ -296,8 +296,10 @@ void MediaPlayerPrivateMediaSourceAVFObjC::play() > > void MediaPlayerPrivateMediaSourceAVFObjC::playInternal() > { >- if (currentMediaTime() >= m_mediaSourcePrivate->duration()) >+ if (currentMediaTime() >= m_mediaSourcePrivate->duration()) { >+ ALWAYS_LOG(LOGIDENTIFIER, "bailing, current time: ", currentMediaTime(), " greater than duration ", m_mediaSourcePrivate->duration()); > return; >+ } > > ALWAYS_LOG(LOGIDENTIFIER); > m_playing = true; >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >index 7d829f023edc1bc9047d9e97b89a49309fa587f1..7b58517d6aca5f078bee6215ca2c7c02485b71c0 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >@@ -1098,13 +1098,14 @@ void SourceBufferPrivateAVFObjC::enqueueSample(Ref<MediaSample>&& sample, const > if (platformSample.type != PlatformSample::CMSampleBufferType) > return; > >- DEBUG_LOG(LOGIDENTIFIER, "track ID = ", trackID, ", sample = ", sample.get()); >+ auto logSiteIdentifier = LOGIDENTIFIER; >+ DEBUG_LOG(logSiteIdentifier, "track ID = ", trackID, ", sample = ", sample.get()); > > if (trackID == m_enabledVideoTrackID) { > CMFormatDescriptionRef formatDescription = CMSampleBufferGetFormatDescription(platformSample.sample.cmSampleBuffer); > FloatSize formatSize = FloatSize(CMVideoFormatDescriptionGetPresentationDimensions(formatDescription, true, true)); > if (!m_cachedSize || formatSize != m_cachedSize.value()) { >- DEBUG_LOG(LOGIDENTIFIER, "size changed to ", formatSize); >+ DEBUG_LOG(logSiteIdentifier, "size changed to ", formatSize); > bool sizeWasNull = !m_cachedSize; > m_cachedSize = formatSize; > if (m_mediaSource) { >@@ -1122,7 +1123,7 @@ void SourceBufferPrivateAVFObjC::enqueueSample(Ref<MediaSample>&& sample, const > return; > > if (m_mediaSource && !m_mediaSource->player()->hasAvailableVideoFrame() && !sample->isNonDisplaying()) { >- DEBUG_LOG(LOGIDENTIFIER, "adding buffer attachment"); >+ DEBUG_LOG(logSiteIdentifier, "adding buffer attachment"); > > bool havePrerollDecodeWithCompletionHandler = [PAL::getAVSampleBufferDisplayLayerClass() instancesRespondToSelector:@selector(prerollDecodeWithCompletionHandler:)]; > >@@ -1136,10 +1137,16 @@ void SourceBufferPrivateAVFObjC::enqueueSample(Ref<MediaSample>&& sample, const > m_mediaSource->player()->setHasAvailableVideoFrame(true); > #endif > } else { >+ > [m_displayLayer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer]; >- [m_displayLayer prerollDecodeWithCompletionHandler:[weakThis = makeWeakPtr(*this)] (BOOL success) mutable { >- if (!success || !weakThis) >+ [m_displayLayer prerollDecodeWithCompletionHandler:[this, logSiteIdentifier, weakThis = makeWeakPtr(*this)] (BOOL success) mutable { >+ if (!weakThis) >+ return; >+ >+ if (!success) { >+ ERROR_LOG(logSiteIdentifier, "prerollDecodeWithCompletionHandler failed"); > return; >+ } > > callOnMainThread([weakThis = WTFMove(weakThis)] () mutable { > if (!weakThis)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199473
: 373426