Bug 256092

Summary: [MSE] Evict content earlier to source buffer reduce memory usage.
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Jean-Yves Avenard [:jya] 2023-04-28 07:00:49 PDT
We only starts to evict content when the source buffer size reach a given threshold.
However the source buffer size is calculated by looking at the size of each media sample contained in the track buffers.
But this only account for the media content itself.

A MediaSampleAVFObjC wraps a CMSampleBuffer, which itself is over 590 bytes.
So regardless of the size of the actual media segment, we store at least 590 bytes.

We should account for the size of the sample container itself, which would make the source buffer more accurately determine when eviction should occur and do so earlier.
Comment 1 Radar WebKit Bug Importer 2023-04-28 07:01:17 PDT
<rdar://problem/108658434>
Comment 2 Jer Noble 2023-05-02 11:50:06 PDT
Dup of bug # 256113

*** This bug has been marked as a duplicate of bug 256113 ***