Add MOQ5 as an opt-in publishing backend - #16
Merged
Conversation
Route the batch, live stdin/SRT, and live-object publish paths through the moq5 service tier when -DOPENMOQ_USE_LIBMOQ_PUBLISHER=ON, alongside the existing picoquic transport. A compile-time gate keeps the default path unchanged while the integration matures; an injected TransportFactory always forces the legacy path regardless of the gate. The moq5 path translates moqxr publish plans into media-sender objects with demand-aware subscription gating, bounded WOULD_BLOCK backpressure handling, CMSF SAP metadata propagation, and a graceful transport drain (moq_endpoint_drain) that flushes queued stream bytes before teardown so a slow or in-flight object is not truncated. Package coalesced progressive-MP4 media as bounded, keyframe-aligned CMAF objects: one group per track with a per-GOP object, long GOPs split into capped continuation objects, rather than a single whole-track payload -- keeping each fragment's sample table within the receiver's CMAF validation limits while preserving group-start SAP types. CMake gains sibling moq5/picoquic/picotls detection, OpenSSL pinning for the picotls build, and WebTransport adapter enablement. Adds translation and packaging tests and documents the backend selection in docs/build.md and the README.
mondain
reviewed
Jun 30, 2026
mondain
left a comment
Collaborator
There was a problem hiding this comment.
Let me know your thoughts here; also for support of forward == 1, no subscriber is required for media to flow to a relay, which is a valid use-case when a relay implementation supports non-moq subscription or recording.
mondain
approved these changes
Jul 25, 2026
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.
Route the batch, live stdin/SRT, and live-object publish paths through the moq5 service tier when -DOPENMOQ_USE_LIBMOQ_PUBLISHER=ON, alongside the existing picoquic transport. A compile-time gate keeps the default path unchanged while the integration matures; an injected TransportFactory always forces the legacy path regardless of the gate.
The moq5 path translates moqxr publish plans into media-sender objects with demand-aware subscription gating, bounded WOULD_BLOCK backpressure handling, CMSF SAP metadata propagation, and a graceful transport drain (moq_endpoint_drain) that flushes queued stream bytes before teardown so a slow or in-flight object is not truncated.
Package coalesced progressive-MP4 media as bounded, keyframe-aligned CMAF objects: one group per track with a per-GOP object, long GOPs split into capped continuation objects, rather than a single whole-track payload -- keeping each fragment's sample table within the receiver's CMAF validation limits while preserving group-start SAP types.
CMake gains sibling moq5/picoquic/picotls detection, OpenSSL pinning for the picotls build, and WebTransport adapter enablement. Adds translation and packaging tests and documents the backend selection in docs/build.md and the README.