Repository navigation
libass 7a: embedded text subtitle tracks render through libass - #730
Merged
Merged
Conversation
Pins libunibreak 8.0 and enables ASS_FEATURE_WRAP_UNICODE support; patches libass 0.17.5 so one font holds more than ten faces (apply_patches under GIT_CEILING_DIRECTORIES with a post-apply hash assertion, pinned in ci/libass-dependencies.json); facade ABI 3 adds features, cache limits, line spacing, replace_track (used by the windowed-slide branch) and stats; the ass_set_fonts scan runs once per renderer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-failed-replace guard, source-change doc) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… second load refuses Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ication ELF Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s-6a-source-origin
…ne branch and published alignment classes (libass text subs, PR 6a) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le carried by Origin::Text, aligns beside the published frame by serial, bounded alive_at (libass text subs, PR 6a) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…PR 6a) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts their bottom regions with the HUD (libass text subs, PR 6) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nknown classes never lift a top cue, separate line regions rise together, allocation-free draw (libass text subs, PR 6 review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps Origin::Text, the restyle branch and the alignment classes alongside PR 4's configure(), replace_track and facade ABI 3. set_wrap_unicode and set_line_spacing lose their cfg(test): the restyle branch calls them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…bass-6-screens-text-origin
…-origin # Conflicts: # docs/ass-subtitles.md # rust-modules/media/src/player/ass/tests.rs
… cues, newest-wins view, lazy restyle) SubKind::Plain/MovText become SubKind::Text(TextDialect); begin_ass_sources (and so the side reader) registers every text track with its dialect. SubCue::Text goes to ass_source::push_text instead of the bespoke caption store: the cue is converted by text_ass, deduplicated on its raw key, given a never-reused ReadOrder, and the track's events become the newest-wins view of its raw cues. Raw cues survive retain_for_reload + a same-file begin, so a held cue the reopened demuxer does not resend stays up. A changed size/position pick re-synthesizes the selected track's header once (revision bump, same id). The `sub cue [a..bms] len=N` line stays. make_ass_stress.py also builds SubRip, mov_text and WebVTT fixtures and sets the default subtitle disposition on every generated track. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…d on arrival, delete push_subtitle_cue, fix docs, duration-less packet test Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cess-invalid-pointer) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ull pointer Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Plan PR 7a (
libass-text-subs, §7 row 7a): embedded text tracks (SubRip, WebVTT, mov_text, SAMI, ...) render through libass instead of the bespoke caption draw.ff.rs/ff_subs.rs:SubKind::Text(TextDialect)replacesPlain/MovText;begin_ass_sourcesregisters a text track asTrackHeader::Text(dialect)(§0 D1, §1.5).ass_source::push_textconverts each cue (text_ass::convert), keeps it as a raw cue and derives the track's events as a newest-wins view (D10). ReadOrder only increases; raw cues survive seek and same-file reopen (§1.5). Restyle is lazy and only for a selected track (§2.5).SHARED.sub_cuesany more, so a text cue is never drawn twice.push_subtitle_cueis deleted (its last caller went).docs/ass-subtitles.md,player/CLAUDE.md,tests/README.md,transcoder.rscomment.Review findings fixed here
(start, end, packet_identity): a 64-bit hash of the packet bytes BEFORE the charset step. The old text key could differ after the stateful detector locked or after a reopen (a worse guess could replace correct text), and it held a second copy of every cue's text outside the byte budget.sub cue.sub_cuesis described as dead until PR 10;transcoder.rscomment namesTextDialect::Plain.check-ffmpegtest: durationless packets (default end start + 4 s) go through the realdecodeintopush_textand the first cue is clipped to the second's start (the fixture's packets havedurationzeroed after the demuxer reads them, since ffmpeg always writes BlockDuration).Not changed / notes
floor_mstoStore::push_text, not the public fn'ssubtitle_floor_ns()): accepted, same as the authored path.make_ass_stress.pynow gives the ASS stress fixtures the default disposition, so the player selects the track without a menu pick. Compare againstmeasurements.mdbaselines with that in mind.Gates (committed tree,
git status --shortempty before and after)make check: exit 0; last linestest result: ok. 1324 passed; 0 failed; 0 ignoredandtest result: ok. 1736 passed; 0 failed; 47 ignoredcargo +nightly check --lib --no-default-features: Finished, no warningsmake check-ass:test result: ok. 45 passed; 0 failedmake check-ffmpeg:test result: ok. 9 passed; 0 failedTV (webOS 4.5 dev set,
ARM_PROFILE=release, mock guest, panel off, muted)Fixtures: SRT/WebVTT in MKV and mov_text in MP4 over a 1080p24 clip, with the subtitle track set as default.
<i>,<b>and<font color>work.{\an8}puts a sign at the top while dialogue stays at the bottom. A top sign that outlasts four bottom cues stays up the whole time.jobs=0+N,ahead_hit=N), p95 9.2-11.3 ms. This is off the UI thread.assupover 482 uploads: p50 0.7 ms, p95 1.2 ms, max 4.3 ms.clearx2), or back-buffer waits with assup ≤ 4.3 ms inside (total 15.7-18.5 ms,clear8.9-14.1 ms).assupmax > 3 ms triggers PR 7c/7d (bucketedglTexSubImage2Dupload, plan §4.5). They follow this PR.Not covered on this pass: the size, position and tone rungs and the subtitle offset (these need the player menu), and HUD up/down. The app binary disappeared from the worktree before the HUD run. They move to the PR 7b/7d TV gate.
Closes #478
🤖 Generated with Claude Code