-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Cocoa] Adopt VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler to decode stereo images #47186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
EWS run on previous version of this PR (hash 5e4a146) |
Safer C++ Build #41549 (5e4a146)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
5e4a146
to
6eb05b2
Compare
EWS run on previous version of this PR (hash 6eb05b2) |
6eb05b2
to
701b299
Compare
EWS run on previous version of this PR (hash 701b299) |
701b299
to
16bafbc
Compare
EWS run on previous version of this PR (hash 16bafbc) |
16bafbc
to
c655439
Compare
EWS run on previous version of this PR (hash c655439) |
Safer C++ Build #41610 (6eb05b2)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nit
#if PLATFORM(VISION) | ||
m_stereoViewMap.clear(); | ||
RetainPtr<CFMutableArrayRef> layersArray = nullptr; | ||
// Get the tag collection array | ||
CFArrayRef rawTagCollectionArray = nullptr; | ||
if (auto status = PAL::CMVideoFormatDescriptionCopyTagCollectionArray(videoFormatDescription, &rawTagCollectionArray); status == noErr && rawTagCollectionArray) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this is a pretty deep nested if/for/if/if
section. Consider refactoring to use continue
or early return
to flatten and make the resulting code more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a draft still.
c655439
to
ca45962
Compare
EWS run on previous version of this PR (hash ca45962) |
ca45962
to
7f5d9c5
Compare
EWS run on previous version of this PR (hash 7f5d9c5) |
7f5d9c5
to
460473b
Compare
EWS run on previous version of this PR (hash 460473b) |
460473b
to
7bc6408
Compare
EWS run on previous version of this PR (hash 7bc6408) |
7bc6408
to
a350070
Compare
EWS run on previous version of this PR (hash a350070) |
EWS run on previous version of this PR (hash 132092b) |
132092b
to
4a997dd
Compare
EWS run on previous version of this PR (hash 4a997dd) |
4a997dd
to
35e3261
Compare
EWS run on previous version of this PR (hash 35e3261) |
35e3261
to
96af1f0
Compare
EWS run on current version of this PR (hash 96af1f0) |
…utputHandler to decode stereo images https://bugs.webkit.org/show_bug.cgi?id=295143 rdar://154516073 Reviewed by Jer Noble. In 296748@main we fixed a regression caused by 295444@main. The change was a simple temporary workaround to disable MediaSourcePrefersDecompressionSession for spatial or immersive videos as WebCoreDecompressionSession didn't decode stereo images. We now use the VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler method instead which can handle both images in CMSampleBuffer to decode. We add support for decoding multi-images (stereo) samples and readback of such images. As such, we can revert 296748@main which is no longer needed. We make WebCoreDecompression's WorkQueue a singleton. It simplifies the code a bit and this workqueue carries very little load as all the object it uses already use their own workqueues. Spatial portal manually tested on visionOS. Added test to verify decoding and readback when playing a spatial video in stereo mode. * LayoutTests/media/media-source/content/test-spatial-manifest.json: Added. * LayoutTests/media/media-source/content/test-spatial.mp4: Added. * LayoutTests/media/media-source/media-source-paint-stereo-to-canvas-expected.txt: Added. * LayoutTests/media/media-source/media-source-paint-stereo-to-canvas.html: Added. * Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp: Adding dynamically linked methods * Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h: * Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp: Adding dynamically linked methods * Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h: * Source/WebCore/platform/graphics/avfoundation/FormatDescriptionUtilities.cpp: (WebCore::spatialVideoMetadataFromFormatDescription): Remove canLoad method for symbols that will always be found. * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm: (WebCore::VideoMediaSampleRenderer::enqueueSample): Revert 296748@main as it's no longer needed. (WebCore::VideoMediaSampleRenderer::decodeNextSampleIfNeeded): (WebCore::VideoMediaSampleRenderer::imageForSample const): Handle multi-images sample (WebCore::VideoMediaSampleRenderer::assignResourceOwner): Amend to assign all multi-images sample's IOSurfaces Canonical link: https://commits.webkit.org/296854@main
96af1f0
to
c0688ab
Compare
Committed 296854@main (c0688ab): https://commits.webkit.org/296854@main Reviewed commits have been landed. Closing PR #47186 and removing active labels. |
c0688ab
96af1f0
🛠 wpe🛠 win🧪 wpe-wk2🧪 win-tests🧪 api-wpe🛠 gtk🧪 gtk-wk2🧪 api-gtk