Repository navigation
Conversation
Quest-Claim: c6628cdb9a6e3656
…rity decode::Options gains priority, defaulting to hang's PRIORITY.video and PRIORITY.audio, and decode::Consumer::set_priority moves it in place through the subscription's Control, even while a read holds the reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
moq_video::decode::Consumerandmoq_audio::decode::Consumersubscribed at hang's fixedPRIORITY.videoandPRIORITY.audio, so a player showing several sources (the studio's viewer priorities,moq playcomposing layers) could not fetch a less important one behind a more important one under congestion.Approach
decode::Optionsgainspriority: i8in both crates, defaulting to hang'sPRIORITY.video(60) andPRIORITY.audio(80). The first subscription carries it. Named afterSubscription::priorityand the JS player'spriorityinput in moq-dev/moq#9088.decode::Consumer::set_priority(priority)in both crates moves it while running. It updates the existing subscription in place through itsmoq_net::track::Control, so nothing is resubscribed, re-fetched, or dropped. The video consumer moves its reader into a future while a read is in flight, so aControl(cloneable, needs no borrow of the cursor) is what reaches it. Audio uses the same mechanism for symmetry; its laterset_max_delayreads the current subscription, so the priority survives it.rs/moq-video/README.mdmentions the new knob.quest/m1/decode-priority.md, which this finishes.Impact
moq-video:decode::Options::priority,decode::Consumer::set_priority.decode::Optionsno longer derivesDefault; it implements it by hand with the same values plus the priority. Additive: the struct is#[non_exhaustive], so outside callers already build it throughnew()/default().moq-audio:decode::Options::priority,decode::Consumer::set_priority. Additive.moq-ffi, libmoq) are untouched: no binding user needs it yet.Choices made unattended (open to review)
priority(an absolutei8, matchingSubscription::priorityand moq-dev/moq#9088) rather than a relative rank.set_priority(&mut self, ..)rather than&self, mirroring audio'sset_max_delay; it could take&selfsinceControl::updatedoes.Control::updatein the decode crates, not a newmoq_mux::container::Consumer::set_priority: that would add moq-mux API and still not reach the video reader while a read holds it.Validation
cargo test -p moq-video --lib decode::consumer: 17 pass, including the newpriority_reaches_the_subscription_and_moves_in_place, which reads the priority off the publisher's aggregate subscription (track::Producer::subscription) at the default, after a change, and after a change made while a read is parked on the reader, then shows that parked read still returns the next picture (same subscription, not a new one).set_priority's update replaced by a no-op, that test fails at the aggregate assertion.cargo test -p moq-audio --lib priority: the new audio test passes; it checks the default, a change, and that a laterset_max_delaykeeps the priority.just check: clean.Follow-ups
None.
Models
Size: S
Implementer: Claude, claude-opus-5-5, medium effort (arm A)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.Head: 3b40265, named in full once no reviewer reports a finding
Base: origin/main at 3728b96
Risk: medium,
Configurable audio and video subscription priorities change congestion scheduling for playback consumers, but preserve existing defaults and API compatibility, and a revert fully undoes the change.Classified: medium by Codex, gpt-6.1-sol, low effort, session
01a1fc06-69df-7ea3-bc4e-9446d12e54abReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1fc06-7ed6-7e11-8d2e-b8bc86423e6f, round 1Score: 7/10,
The priority updates are straightforward, but failed audio and video readers must release subscription demand before landing.Rounds: 1; first round 1 (medium 1); findings 1 (medium 1): fixed 0, refuted 0, open 1
Findings, open until the next round settles them:
rs/moq-video/src/decode/consumer.rs:129:Avoid retaining subscription demand after the container fails