-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Captured video frames are leaked if Web process media player is destroyed before message is received #33453
Open
kkinnunen-apple
wants to merge
1
commit into
WebKit:main
Choose a base branch
from
kkinnunen-apple:client-side-videoframe-ids-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Captured video frames are leaked if Web process media player is destroyed before message is received #33453
kkinnunen-apple
wants to merge
1
commit into
WebKit:main
from
kkinnunen-apple:client-side-videoframe-ids-1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
EWS run on previous version of this PR (hash 33243e6) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 11, 2024
youennf
reviewed
Sep 11, 2024
kkinnunen-apple
removed
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 11, 2024
kkinnunen-apple
force-pushed
the
client-side-videoframe-ids-1
branch
from
September 11, 2024 12:27
33243e6
to
d8e3b53
Compare
EWS run on previous version of this PR (hash d8e3b53) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 11, 2024
kkinnunen-apple
removed
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 11, 2024
kkinnunen-apple
force-pushed
the
client-side-videoframe-ids-1
branch
from
September 11, 2024 14:47
d8e3b53
to
67b8a9a
Compare
EWS run on previous version of this PR (hash 67b8a9a) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 11, 2024
youennf
reviewed
Sep 12, 2024
youennf
approved these changes
Sep 12, 2024
kkinnunen-apple
removed
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 13, 2024
kkinnunen-apple
changed the title
VideoFrames cannot be created asynchronously in WebContent process
WebXROpaqueFramebuffer doesn't use WebGLFramebuffer correctly. Just use the plain GL object. Also fixes one relase nullptr deref.
Sep 13, 2024
kkinnunen-apple
force-pushed
the
client-side-videoframe-ids-1
branch
from
September 13, 2024 12:55
67b8a9a
to
592859d
Compare
EWS run on previous version of this PR (hash 592859d) |
…oyed before message is received https://bugs.webkit.org/show_bug.cgi?id=279671 rdar://problem/135948989 Reviewed by NOBODY (OOPS!). GPU process would put the captured VideoFrame to the video frame heap and send the reference to the WebContent process media player. If the MediaPlayerPrivateRemote was destroyed while the message was in transit, the message would be ignored and the video frame would leak in the heap. Make the GPUP -> WCP video frame offer messages asynchronous with replies. Since asynchronous message replies are always delivered, this fixes the memory leak. Remove the video frame from the heap if the frame was not adopted. This concerns following video frame offer messages: Messages::MediaPlayerPriveteRemote::PushVideoFrameMetadata Messages::LibWebRTCCodecs::CompletedDecoding Messages::RemoteCaptureSampleManager::videoFrameAvailable * Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: (WebKit::RemoteVideoFrameObjectHeap::addWithCompletion): (WebKit::RemoteVideoFrameObjectHeap::add): * Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.h: * Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::mediaPlayerOnNewVideoFrameMetadata): * Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: (WebKit::LibWebRTCCodecsProxy::createDecoderCallback): * Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::videoFrameForCurrentTime): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: (WebKit::RemoteVideoFrameProxy::properties): (WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy): (WebKit::releaseRemoteVideoFrameProxy): Deleted. (WebKit::RemoteVideoFrameProxy::releaseUnused): Deleted. * Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxy.h: * Source/WebKit/WebProcess/GPU/media/RemoteVideoFrameProxyProperties.h: * Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm: (WebKit::MediaPlayerPrivateRemote::pushVideoFrameMetadata): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::LibWebRTCCodecs::completedDecoding): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h: * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: * Source/WebKit/WebProcess/cocoa/RemoteCaptureSampleManager.cpp: (WebKit::RemoteCaptureSampleManager::videoFrameAvailable): * Source/WebKit/WebProcess/cocoa/RemoteCaptureSampleManager.h: * Source/WebKit/WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
kkinnunen-apple
changed the title
WebXROpaqueFramebuffer doesn't use WebGLFramebuffer correctly. Just use the plain GL object. Also fixes one relase nullptr deref.
Captured video frames are leaked if Web process media player is destroyed before message is received
Sep 13, 2024
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 13, 2024
kkinnunen-apple
force-pushed
the
client-side-videoframe-ids-1
branch
from
September 13, 2024 13:26
592859d
to
3da3dca
Compare
EWS run on current version of this PR (hash 3da3dca) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Media
Bugs related to the HTML 5 Media elements.
merging-blocked
Applied to prevent a change from being merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3da3dca
3da3dca