[webkit-reviews] review granted: [Bug 237027] Optimize black frame sending in MediaRecorderPrivate : [Attachment 452971] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 23 10:44:27 PST 2022
Kimmo Kinnunen <kkinnunen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 237027: Optimize black frame sending in MediaRecorderPrivate
https://bugs.webkit.org/show_bug.cgi?id=237027
Attachment 452971: Patch
https://bugs.webkit.org/attachment.cgi?id=452971&action=review
--- Comment #4 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Comment on attachment 452971
--> https://bugs.webkit.org/attachment.cgi?id=452971
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=452971&action=review
with some suggestions
> Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:103
> + SharedVideoFrame sharedVideoFrame { sample.presentationTime(),
sample.videoMirrored(), sample.videoRotation(), *m_blackFrameSize };
>From this part it would seem you can just remove m_blackFrameSize and keep
sending the real sample size?
> Source/WebKit/WebProcess/GPU/webrtc/SharedVideoFrame.cpp:190
> + }, [](IntSize size) -> RetainPtr<CVPixelBufferRef> {
I think for this use-case, you could;
- cache the last black frame
- update the last black frame only if the size differs
- set the ownership to the caller (so black frames don't consume GPUP memory)
More information about the webkit-reviews
mailing list