Skip to content

Let the media receiver send delivery timeouts in its subscribe - #70

Open
gwendalsimon wants to merge 3 commits into
mainfrom
feat/receiver-delivery-timeout
Open

gwendalsimon wants to merge 3 commits into
mainfrom
feat/receiver-delivery-timeout

Conversation

@gwendalsimon

@gwendalsimon gwendalsimon commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

I added object_delivery_timeout_ms and subgroup_delivery_timeout_ms to moq_media_receiver_track_subscribe_cfg_t, after fill. 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 returns MOQ_ERR_INVAL if one value is zero or the two values differ.

The second commit corrects the moq_sub_track_cfg_t comment, 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_options cover drafts 16, 18, and 22. I ran them and the Rust snapshot tests locally in November 2026.


This change is Reviewable

gwendalsimon and others added 3 commits November 19, 2026 11:50
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant