Repository navigation
Let the media receiver send delivery timeouts in its subscribe - #70
Open
gwendalsimon wants to merge 3 commits into
Open
gwendalsimon wants to merge 3 commits into
gwendalsimon wants to merge 3 commits into
Conversation
An application on the media receiver could not ask the publisher to time out stale Objects: the per-track subscribe options had no delivery timeout, although the core subscriber already sends OBJECT_DELIVERY_TIMEOUT and SUBGROUP_DELIVERY_TIMEOUT in SUBSCRIBE. * moq_media_receiver_track_subscribe_cfg_t gains object_delivery_timeout_ms and subgroup_delivery_timeout_ms, appended after fill. NULL leaves one absent; the values are copied before the call returns and ride every SUBSCRIBE the receiver sends for the track. * On draft 16, which carries one shared value, subscribe_track refuses a zero, a value above the varint range, or two different values with MOQ_ERR_INVAL, as moq_session_subscribe would later. The refusal leaves the desired state unchanged, so it no longer surfaces as a receiver-fatal setup failure. * Tests: both values reach moq_sub_subscribe as copies and the peer's SUBSCRIBE on drafts 16, 18 and 22; the draft-16 refusals; partial struct_size tails that do not cover a field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment on moq_sub_track_cfg_t said that draft 18 does not send OBJECT_DELIVERY_TIMEOUT and SUBGROUP_DELIVERY_TIMEOUT yet and that a selection is refused. Drafts 18 and 22 send both, and draft 16 sends one shared value, refusing only a zero or two different values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The media receiver's subscribe config gained two delivery timeout fields and the core subscriber's comment changed, so the docs.rs snapshots no longer matched a fresh generation. * bindings_service.rs: object_delivery_timeout_ms and subgroup_delivery_timeout_ms in moq_media_receiver_track_subscribe_cfg, its size from 32 to 48 bytes, and their offsets (32, 40). * bindings_core.rs: the moq_sub_track_cfg delivery timeout comment. * Both headers now record x86_64-unknown-linux-gnu with libclang 18.1.1, found by the clang-sys search (no path recorded), instead of aarch64-apple-darwin with libclang 22.1.4. The core header's SDK line names only libmoq-service.pc, since the generating SDK had no sim tier. * The snapshot test passes on that host with the service feature (core, media and service) and without it. The unchanged media snapshot still matches this generation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
I added
object_delivery_timeout_msandsubgroup_delivery_timeout_mstomoq_media_receiver_track_subscribe_cfg_t, afterfill. Every SUBSCRIBE the receiver sends for the track then carries them, as the core subscriber already allows. A receiver can thus ask the relay to drop Objects that would arrive too late to play. Draft 16 has a single delivery timeout, so on draft 16 the call returnsMOQ_ERR_INVALif one value is zero or the two values differ.The second commit corrects the
moq_sub_track_cfg_tcomment, which still said that draft 18 does not send the timeouts. The third regenerates the core and service Rust snapshots. Apart from the provenance headers, their diff is the two fields and that comment. I generated them on Linux x86_64 with libclang 18.1.1, which the moq5-sys README lists as unrun.New checks in
test_media_receiver_track_optionscover drafts 16, 18, and 22. I ran them and the Rust snapshot tests locally in November 2026.This change is