-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
VP8 WebCoreDecompressionSession should attribute its IOSurfaces to the media player resource owner #26032
Conversation
EWS run on previous version of this PR (hash 3bafd19) |
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.
this WebCoreDecompressionSession is only used if we are painting on a canvas ; and the buffer allocation is already handled in updateLastPixelBuffer()
The WebCoreDecompressionSession that needs change is the one managed by VideoMediaSampleRenderer
3bafd19
to
f6f9b6a
Compare
EWS run on previous version of this PR (hash f6f9b6a) |
f6f9b6a
to
0b966ec
Compare
EWS run on previous version of this PR (hash 0b966ec) |
0b966ec
to
0984310
Compare
EWS run on current version of this PR (hash 0984310) |
gtk test failure unrelated. |
β¦e media player resource owner https://bugs.webkit.org/show_bug.cgi?id=271144 rdar://123795173 Reviewed by Jean-Yves Avenard. When WebCoreDecompressionSession uses a VideoDecoder to do its decoding, it uses an IOSurface pixel buffer pool. We then need to attribute these buffers to the corresponding resource owner. To do so, we are setting a resourceOwner in WebCoreDecompressionSession from VideoMediaSampleRenderer, which gets it from MediaPlayerPrivateWebM. The WebCoreDecompressionSession is creating a VideoDecoder that is given the resourceOwner so that, everytime we have a pixel buffer coming from the buffer pool, we then do the attribution. We also do this for MediaPlayerPrivateMediaSourceAVFObjC's session. This means piping the resource owner to MediaSourcePrivate -> SourceBufferPrivate. * Source/WebCore/platform/VideoDecoder.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession): * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::setVideoRenderer): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::ensureLayer): (WebCore::MediaPlayerPrivateWebM::ensureDecompressionSession): * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h: (WebCore::VideoMediaSampleRenderer::setResourceOwner): * Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm: (WebCore::VideoMediaSampleRenderer::initializeDecompressionSession): * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::initializeVideoDecoder): * Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp: (WebCore::LibWebRTCVPXInternalVideoDecoder::LibWebRTCVPXInternalVideoDecoder): (WebCore::LibWebRTCVPXInternalVideoDecoder::Decoded): Canonical link: https://commits.webkit.org/276270@main
0984310
to
fa9c6d7
Compare
Committed 276270@main (fa9c6d7): https://commits.webkit.org/276270@main Reviewed commits have been landed. Closing PR #26032 and removing active labels. |
fa9c6d7
0984310
π§ͺ wpe-wk2π§ͺ api-gtk