[webkit-reviews] review granted: [Bug 235954] SampleBufferDiplayLayer should not need to create IOSurfaces : [Attachment 450531] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 2 09:08:18 PST 2022
Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 235954: SampleBufferDiplayLayer should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235954
Attachment 450531: Patch
https://bugs.webkit.org/attachment.cgi?id=450531&action=review
--- Comment #3 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 450531
--> https://bugs.webkit.org/attachment.cgi?id=450531
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=450531&action=review
> Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:125
> + sample = MediaSampleAVFObjC::createImageSample(WTFMove(pixelBuffer),
remoteSample.rotation(), remoteSample.mirrored());
> + sample->setTimestamps(remoteSample.time(), MediaTime { });
As a followup, it would be nice if createImageSample that took optional
timestamps.
> Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:172
> +void
RemoteSampleBufferDisplayLayer::setSharedVideoFrameSemaphore(IPC::Semaphore&&
semaphore)
> +{
> + m_sharedVideoFrameReader.setSemaphore(WTFMove(semaphore));
> +}
> +
> +void RemoteSampleBufferDisplayLayer::setSharedVideoFrameMemory(const
SharedMemory::IPCHandle& ipcHandle)
> +{
> + auto memory = SharedMemory::map(ipcHandle.handle,
SharedMemory::Protection::ReadOnly);
> + if (!memory)
> + return;
> +
> + m_sharedVideoFrameReader.setSharedMemory(memory.releaseNonNull());
> +}
And it would be nice to put these into a "mixin" class with a pure virtual
`SharedVideoFrameReader` getter others can derive from instead of duplicating
in all of the classes that need them.
More information about the webkit-reviews
mailing list