Bug 224489 - Allow text tracks to purge cues outside of the buffered range
Summary: Allow text tracks to purge cues outside of the buffered range
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-13 09:56 PDT by Eric Carlson
Modified: 2021-04-14 10:59 PDT (History)
11 users (show)

See Also:


Attachments
Patch (9.71 KB, patch)
2021-04-13 10:30 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (9.75 KB, patch)
2021-04-13 12:15 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (9.79 KB, patch)
2021-04-13 15:02 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (9.78 KB, patch)
2021-04-14 08:20 PDT, Eric Carlson
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2021-04-13 09:56:38 PDT
TextTrackCues associated in-band tracks live "forever" - until the video element is deleted or reloaded. This is fine for relatively short files, but not so good for long lived files (eg. a very long live stream), or for timed metadata where the "cue" size can be much larger than a text sample. 

Allow text tracks to opt in to purging cues who's time range does not intersect with the `buffered` range, where audio and video data is also not available. Only AVFoundation backed in-band tracks opt in at this time, because AVFoundation will redeliver cues if a time range is played again.
Comment 1 Eric Carlson 2021-04-13 10:30:26 PDT
Created attachment 425882 [details]
Patch
Comment 2 Eric Carlson 2021-04-13 10:31:18 PDT
rdar://14913419
Comment 3 Jer Noble 2021-04-13 11:03:20 PDT
Comment on attachment 425882 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425882&action=review

r=me with nit:

> Source/WebCore/html/track/InbandDataTextTrack.h:48
> +    bool purgesCuesFromUnbufferedRanges() const final { return true; }

Nit: This confused me on initial reading, which I parsed as "purge cues from unbuffered ranges". Maybe "shouldPurgeCuesFromUnbufferedRanges()"?
Comment 4 Eric Carlson 2021-04-13 12:15:29 PDT
Created attachment 425895 [details]
Patch for landing
Comment 5 Eric Carlson 2021-04-13 15:02:57 PDT
Created attachment 425921 [details]
Patch for landing
Comment 6 Eric Carlson 2021-04-14 08:20:08 PDT
Created attachment 425982 [details]
Patch for landing
Comment 7 EWS 2021-04-14 09:53:35 PDT
Committed r275949 (236509@main): <https://commits.webkit.org/236509@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425982 [details].