Commit ca31573
fix(subtitles): a landing line has to stand on ground somebody read (#416)
A PGS display set has no end of its own, so the reconstruction pass at a seek
landing decides which set is still on screen by the store holding nothing
between it and the playhead. Over a stretch nobody read, that silence proves
nothing. A run re-aimed just after it harvested a set leaves that set's own
clear on the far side of the skipped ground: the set decodes at the landing
looking unclosed, becomes the landing's active line, and takes its end from the
next stored packet, which is the far side of the authored silence rather than
its own successor. The reporter's asset shows a two-second sound-effect caption
standing over a scene ten seconds later, on an Apple TV 4K and on a Mac.
#362 round 2 established that the packets alone cannot show this and named the
ledger as the precise signal: a reader restarted BEHIND leaves a descending
harvest sequence at the boundary, but one re-anchored FORWARD hangs its packets
in ascending order behind the stretch it skipped, so the pair is
indistinguishable from an authored silence. It was left unbuilt for want of a
reproducible defect. This is that defect.
So the readers state what they read. `SubtitleHarvestCoverage` keeps one span
per run in the packet store, anchored where a reader positioned and extended as
it goes: the forward prefetcher reports its own read position and every
re-anchor, the pump's run begins where the producer opens or restarts (both
paths) and reaches at least the playhead, since playback is rendering there. A
set whose ground up to the playhead is not covered cannot be the landing's
active line, and the same rule closes the #100 hold's door onto the same claim.
A store nobody reports to answers every span with yes, so a harvest path without
notes behaves exactly as before.
The cost is the landing line in the case where a set really is still up and the
proof is missing, which takes an authored dwell long enough to span the whole
unread stretch; the alternative was paying it for every normally authored set
that ends inside one. A refusal says so as `landingWithheld=` on the delivery
line, beside `endsWithheld=`.
Measured with `aetherctl play` on a 500 s H.264 + PGS fixture whose sets are
scheduled (set at 184, authored clear at 190, then silence to 240), over a
loopback origin, seeking from 100 to 197 so the initial run's park edge falls
between the set and its clear and the restarted pump opens at 192, above it:
before, 5 of 5 runs published `CUE 184.00-240.00` at the landing; after, 0 of 5,
with `landingWithheld=1` on the runs that met the condition and the authored set
at 240 published in every run. Controls unchanged in both arms: a far seek into
fresh ground landing inside an authored dwell still publishes its line
(292.00-295.50), and a plain playthrough delivers the same four cues.
2053 tests green, tvOS + iOS Simulator builds green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbWZLwBVLGM1xUVXa9NeJ11 parent 079f6c6 commit ca31573
11 files changed
Lines changed: 487 additions & 8 deletions
File tree
- Sources/AetherEngine
- Diagnostics
- Subtitles
- Video
- Tests/AetherEngineTests
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
273 | 279 | | |
274 | 280 | | |
275 | 281 | | |
| |||
425 | 431 | | |
426 | 432 | | |
427 | 433 | | |
| 434 | + | |
428 | 435 | | |
429 | 436 | | |
430 | 437 | | |
| |||
788 | 795 | | |
789 | 796 | | |
790 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
791 | 802 | | |
792 | 803 | | |
793 | 804 | | |
| |||
963 | 974 | | |
964 | 975 | | |
965 | 976 | | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
966 | 988 | | |
967 | 989 | | |
968 | | - | |
| 990 | + | |
| 991 | + | |
969 | 992 | | |
970 | 993 | | |
971 | 994 | | |
| |||
983 | 1006 | | |
984 | 1007 | | |
985 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
986 | 1025 | | |
987 | 1026 | | |
988 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3863 | 3863 | | |
3864 | 3864 | | |
3865 | 3865 | | |
| 3866 | + | |
3866 | 3867 | | |
3867 | 3868 | | |
3868 | 3869 | | |
| |||
3924 | 3925 | | |
3925 | 3926 | | |
3926 | 3927 | | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
3927 | 3933 | | |
3928 | 3934 | | |
3929 | 3935 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
134 | 143 | | |
135 | 144 | | |
136 | 145 | | |
| |||
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
| |||
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
85 | | - | |
| 94 | + | |
| 95 | + | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
| |||
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
107 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
111 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
112 | 135 | | |
113 | 136 | | |
114 | 137 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
228 | 233 | | |
229 | 234 | | |
230 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
| |||
287 | 296 | | |
288 | 297 | | |
289 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
290 | 305 | | |
291 | 306 | | |
292 | 307 | | |
| |||
354 | 369 | | |
355 | 370 | | |
356 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
357 | 378 | | |
358 | 379 | | |
359 | 380 | | |
| |||
0 commit comments