Repository navigation
fix: catalog readers follow a moved rendition - #6650
Conversation
Quest-Claim: 14ff300ba470cb36
The WebRTC egress keyed its serving rendition by catalog ID and `moq play` only re-picked once a track ended, so a catalog update moving a rendition to another track (or sibling broadcast) left both on the old one. The egress now compares the resolved track and switches like any other pick; `moq play` retires the moved rendition (audio plays out its sink's tail) and picks again. moqsrc already restarted a reshaped rendition on its pad; a test now covers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Landing head 137e238 with maintainer approval.
(Written by Claude Opus 5.5) |
Problem
moq-dev/moq#6276 made the exporters follow a rendition that a catalog update moves to another track or sibling broadcast. Other catalog readers resolved the track once. This PR finishes the quest
quest/m1/rendition-move-follow.mdand deletes it.Audit
moq-rtcegress (server subscribe,client publish,export rtc)moq playmoq-gstsource)Shapeholds the track, broadcast and epoch, so a reshape hands the pad to a new reader, and a move to a sibling moves the rendition between followers on the same pad.MoqAudioConsumer/MoqVideoConsumermoq-transcodealready rebuilds when a rendition's track changes (pipeline.rs), so I left it alone.Tests
One move test for each reader, each with the old track still sending after the move:
moq-rtc:a_moved_rendition_follows_its_new_trackmoves within the broadcast, then to a sibling, and checks pacing, the keyframe switch, and that nothing from the old track is served afterwards.moq play:a_moved_audio_rendition_plays_its_new_trackmoves a -> b -> a. The test checks there is no gap at either move, each retired tail plays in full, and nothing the old track sent after a move is heard. The move back proves a retired track is not counted as finished.a_moved_rendition_plays_on_the_same_padmoves within the broadcast, then to a sibling. Playback stays on one pad with no EOS, and nothing from the old track reaches the pad after the move.I confirmed the egress and play tests fail without the fix.
Decisions made without asking
moq playaudio retires instead of cutting. A disable still cuts at once. A move ends the old track as if it finished, so the switch costs no silence, the same as a finished-track switch (#3966).moq playvideo stops at once on a move. It keeps no tail beyond the window's frame queue.moq playignores a change of epoch alone. ItsTrackis still (resolved path, track name).Source::resolvepins a sibling's first instance, so following an epoch-only change would hitEpochMismatchand could end the player. Following instances is Readers follow restarts. The egressTargetdoes include the epoch, matchingExportSource: if the new epoch fails to resolve, the subscribe fails with a warning and the line stays on its current track.Targettype inmoq-mux. Each reader keeps its own small identity type (ExportSource's privateTarget, moqsrc'sShape, play'sTrack, the egressTarget). A public type would add API surface just to remove three short structs.Impact
moq playswitch to a moved rendition's new track.Coordination
This PR does not touch the moq-cli or moq-gst reader loops covered by Readers follow restarts. The moqsrc change is a test, plus a
Publisher::framehelper in its test module. Inmoq playit changes rendition selection insideplay_broadcast, not the instance follow loop.Checks
just checkpassed locally after merging the latestmain. It ran all 522 tests, theplayfeature tests included.just test interop --allwas not run: no wire, moq-ffi, or gateway change.Follow-ups
moq playretires a moved rendition before it subscribes to the new one, so video can freeze until the new track's first keyframe decodes. Serving the old track until the new one is ready, as the egress does, would remove that freeze.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code