Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ ranked just below deterministic TS legs, which it requires.
- [Drop announce="never"](/quest/m2/publish-announce-never.md) - `@moq/publish` offers only announce modes a watcher can reach
- [Deterministic H.265 TS legs](/quest/m2/ts-hitless-h265.md) - H.265's buffering period gets the same group anchor as H.264
- [TS over RTP legs](/quest/m2/ts-rtp-egress.md) - two legs send identical RTP packets, headers included, so an ST 2022-7 receiver can merge them
- [Old tail across a restart](/quest/m2/ts-sync-restart-tail.md) - both `--sync` legs send the old timeline's tail up to a restart, so an ST 2022-7 merge has no hole there
- [moqsrc A/V sync](/quest/m2/moqsrc-av-sync.md) - a nightly test measures A/V skew from `moqsrc` through clock-synced sinks
- [MP4 export](/quest/m2/mp4-export.md) - `moq export mp4 --output` records crash-safe fragments, then finishes a regular MP4 with moov at the end
- [fMP4 edit lists](/quest/m2/fmp4-edit-lists.md) - the fMP4 importer applies edit lists to frame timestamps
Expand Down
33 changes: 33 additions & 0 deletions quest/m2/ts-sync-restart-tail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# [M] Keep the old tail on both 2022-7 legs across a restart

## Goal

Two `moq export ts --sync` legs that see a timeline restart (a marker or
source restart that opens a new generation) both send the old timeline's
tail up to the restart, so an ST 2022-7 receiver merging them has no hole
there. Ordinary skips already cost nothing, because the other leg's copies
fill in.

## Plan

Found in [moq-dev/moq#6304](https://github.com/moq-dev/moq/pull/6304)
(RTP egress), which this builds on. Each leg's lane forgets the positions it
already holds: `Lane::reset` and `Lane::jump` in
`rs/moq-mux/src/container/ts/lane.rs` clear `from` when the restart is read.
The old tail is laid about one delay later, so all of it is marked unsure and
withheld, costing roughly 0.5 to 1 s of output on both legs at a video and
audio restart.

- Old-timeline lane knowledge stays valid until the rewind that adopts the
new generation.
- Keeping `[from, end)` known across a skip jump or a partial group is sound.
A restart is not obviously sound: `reset()` sets `end` to 0, and
new-timeline positions can land inside the old range when a restart opens
no new generation. Settle that first: either every restart opens a
generation, or lane knowledge is kept per timeline.
- Reproduce with a mocked-time two-leg test of a video and audio restart that
asserts the merged legs cover the old tail. Extend
`an_rtp_leg_sends_its_paced_tail_before_a_restart` in
`export_timing_test.rs` from that PR if it has merged.

Public API: none.
Loading