WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235954
SampleBufferDiplayLayer should not need to create IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=235954
Summary
SampleBufferDiplayLayer should not need to create IOSurfaces
youenn fablet
Reported
2022-02-01 08:15:46 PST
SampleBufferDiplayLayer should not need to create IOSurfaces
Attachments
Patch
(8.43 KB, patch)
2022-02-01 08:21 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2022-02-01 08:21:34 PST
Created
attachment 450531
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2022-02-01 08:40:24 PST
<
rdar://problem/88329675
>
Eric Carlson
Comment 3
2022-02-02 09:08:18 PST
Comment on
attachment 450531
[details]
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.
youenn fablet
Comment 4
2022-02-03 01:53:40 PST
(In reply to Eric Carlson from
comment #3
)
> Comment on
attachment 450531
[details]
> 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.
I filed
https://bugs.webkit.org/show_bug.cgi?id=236067
.
> > 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.
I can at least make setSharedMemory take a IPCHandle to centralise more code. I filed
https://bugs.webkit.org/show_bug.cgi?id=236068
.
EWS
Comment 5
2022-02-03 02:14:54 PST
Committed
r289038
(
246745@main
): <
https://commits.webkit.org/246745@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 450531
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug