WebKit Bugzilla
Attachment 360519 Details for
Bug 193995
: [MSE] add more source buffer logging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193995-20190129182319.patch (text/plain), 6.10 KB, created by
Eric Carlson
on 2019-01-29 16:23:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2019-01-29 16:23:20 PST
Size:
6.10 KB
patch
obsolete
>Subversion Revision: 240675 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f4cd4df1344061dc8d94857620c0afd3ebe69525..9a907aaae541ab73c54e83358afc2aaf94f0fbfd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-29 Eric Carlson <eric.carlson@apple.com> >+ >+ [MSE] add more source buffer logging >+ https://bugs.webkit.org/show_bug.cgi?id=193995 >+ <rdar://problem/47650399> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests, no functional change. >+ >+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: >+ (WebCore::SourceBufferPrivateAVFObjC::resetParserState): >+ (WebCore::SourceBufferPrivateAVFObjC::setReadyState): >+ (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): >+ (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): >+ (WebCore::SourceBufferPrivateAVFObjC::willSeek): >+ (WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): >+ > 2019-01-29 Justin Fan <justin_fan@apple.com> > > [WebGPU] Fix and add validation to WebGPURenderPipeline and MTLVertexDescriptor >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >index 3831c7ecafc9f8eacfe9d3d2940d4cbeea598bbd..e400f5071b011cc9f95313e5081d39562506ca78 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm >@@ -756,6 +756,7 @@ void SourceBufferPrivateAVFObjC::abort() > > void SourceBufferPrivateAVFObjC::resetParserState() > { >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::resetParserState(%p)", this); > m_parserStateWasReset = true; > m_discardSamplesUntilNextInitializationSegment = true; > } >@@ -816,6 +817,8 @@ MediaPlayer::ReadyState SourceBufferPrivateAVFObjC::readyState() const > > void SourceBufferPrivateAVFObjC::setReadyState(MediaPlayer::ReadyState readyState) > { >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::setReadyState(%p) - readyState = %i", this, (int)readyState); >+ > if (m_mediaSource) > m_mediaSource->player()->setReadyState(readyState); > } >@@ -838,6 +841,9 @@ bool SourceBufferPrivateAVFObjC::hasAudio() const > void SourceBufferPrivateAVFObjC::trackDidChangeEnabled(VideoTrackPrivateMediaSourceAVFObjC* track) > { > int trackID = track->trackID(); >+ >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::trackDidChangeEnabled(%p) - video trackID = %i, selected = %s", this, trackID, track->selected() ? "true" : "false"); >+ > if (!track->selected() && m_enabledVideoTrackID == trackID) { > m_enabledVideoTrackID = -1; > [m_parser setShouldProvideMediaData:NO forTrackID:trackID]; >@@ -862,6 +868,8 @@ void SourceBufferPrivateAVFObjC::trackDidChangeEnabled(AudioTrackPrivateMediaSou > { > int trackID = track->trackID(); > >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::trackDidChangeEnabled(%p) - audio trackID = %i, enabled = %s", this, trackID, track->enabled() ? "true" : "false"); >+ > if (!track->enabled()) { > ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN > RetainPtr<AVSampleBufferAudioRenderer> renderer = m_audioRenderers.get(trackID); >@@ -1104,16 +1112,23 @@ void SourceBufferPrivateAVFObjC::enqueueSample(Ref<MediaSample>&& sample, const > if (m_decompressionSession) > m_decompressionSession->enqueueSample(platformSample.sample.cmSampleBuffer); > >- if (m_displayLayer) { >- if (m_mediaSource && !m_mediaSource->player()->hasAvailableVideoFrame() && !sample->isNonDisplaying()) { >- CMSampleBufferRef rawSampleCopy; >- CMSampleBufferCreateCopy(kCFAllocatorDefault, platformSample.sample.cmSampleBuffer, &rawSampleCopy); >- auto sampleCopy = adoptCF(rawSampleCopy); >- CMSetAttachment(sampleCopy.get(), kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed, (__bridge CFDictionaryRef)@{ (__bridge NSString *)kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed : @(YES) }, kCMAttachmentMode_ShouldNotPropagate); >- [m_displayLayer enqueueSampleBuffer:sampleCopy.get()]; >- } else >- [m_displayLayer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer]; >- } >+ if (!m_displayLayer) >+ return; >+ >+ if (m_mediaSource && !m_mediaSource->player()->hasAvailableVideoFrame() && !sample->isNonDisplaying()) { >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset(%p) - adding buffer attachment", this); >+ >+ CMSampleBufferRef rawSampleCopy; >+ CMSampleBufferCreateCopy(kCFAllocatorDefault, platformSample.sample.cmSampleBuffer, &rawSampleCopy); >+ auto sampleCopy = adoptCF(rawSampleCopy); >+ CMSetAttachment(sampleCopy.get(), kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed, (__bridge CFDictionaryRef)@{ (__bridge NSString *)kCMSampleBufferAttachmentKey_PostNotificationWhenConsumed : @(YES) }, kCMAttachmentMode_ShouldNotPropagate); >+ [m_displayLayer enqueueSampleBuffer:sampleCopy.get()]; >+#if PLATFORM(IOS_FAMILY) >+ m_mediaSource->player()->setHasAvailableVideoFrame(true); >+#endif >+ } else >+ [m_displayLayer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer]; >+ > } else { > auto renderer = m_audioRenderers.get(trackID); > [renderer enqueueSampleBuffer:platformSample.sample.cmSampleBuffer]; >@@ -1161,6 +1176,7 @@ MediaTime SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime(const MediaTime& > > void SourceBufferPrivateAVFObjC::willSeek() > { >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::willSeek(%p)", this); > flush(); > } > >@@ -1250,6 +1266,8 @@ void SourceBufferPrivateAVFObjC::setDecompressionSession(WebCoreDecompressionSes > if (m_decompressionSession == decompressionSession) > return; > >+ LOG(MediaSource, "SourceBufferPrivateAVFObjC::setDecompressionSession(%p)", this); >+ > if (m_decompressionSession) { > m_decompressionSession->stopRequestingMediaData(); > m_decompressionSession->invalidate();
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 193995
: 360519