[Webkit-unassigned] [Bug 265718] New: [GPUP] Remove TrackPrivateRemoteIdentifier, fix memory leak
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Dec 2 04:57:05 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=265718
Bug ID: 265718
Summary: [GPUP] Remove TrackPrivateRemoteIdentifier, fix memory
leak
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: jean-yves.avenard at apple.com
following bug 254099; we are no longer using AtomString as track identifier and as such we no longer need the `TrackPrivateRemoteIdentifier` to bridge the TrackPrivate living in the GPU Process to those in the web content process, instead simply using their TrackID (an uint64_t).
While in the process of performing this task, I identify a leak in the `MediaPlayerPrivateRemote` code, which was only partially fixed in bug 242925
Whenever a new init segment is parsed by a sourceBuffer in the GPU Process (through the SourceBufferParser); a new TrackPrivate is created and stored in the `InitializationSegment`
When the SourceBufferPrivate call the SourceBufferPrivateClient, the `RemoteSourceBufferProxy` will create a new `RemoteVideoTrackProxy` [1]
This is done by `RemoteMediaPlayerProxy::addRemote[Video|Audio|Text]TrackProxy`, which will check of the track id is already existing, and if so will overwrite it with the new TrackPrivate [2]
But regardless of the preview tack id, a `Remote[Video|Audio|Text]TrackProxy` will be created, with a new, unique TrackPrivateRemoteIdentifier [3] which will then create the RemoteVideoTrack/RemoteAudioTrack/RemoteTextTrack in the content process [4]
The code there ensure that the existing RemoteTrack with this unique TrackPrivateRemoteIdentifier doesn't exist and will create a new one.
This RemoteTrack will never be deleted, it just becomes unused as the corresponding TrackPrivate in the GPU Process got deleted.
[1] https://searchfox.org/wubkat/rev/02b2f8b7a253140d82f59e38a68257431139d2e7/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp#88,97,106
[2] https://searchfox.org/wubkat/rev/02b2f8b7a253140d82f59e38a68257431139d2e7/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp#637-643
[3] https://searchfox.org/wubkat/rev/02b2f8b7a253140d82f59e38a68257431139d2e7/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp#645-647
[4] https://searchfox.org/wubkat/rev/02b2f8b7a253140d82f59e38a68257431139d2e7/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp#762-764
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231202/1f9b0e32/attachment.htm>
More information about the webkit-unassigned
mailing list