Conversation
Co-Authored-By: GPT-6 Astra <codex@openai.com>
Co-Authored-By: GPT-6 Astra <codex@openai.com>
Keep catalog jitter monotonic and serialize text jitter with ceiling precision. Browser encoders report measured flush delay instead of fixed frame hints. Co-Authored-By: GPT-6 Astra <codex@openai.com>
Expose explicit flush observations to native encoders and language bindings, and report OBS encoder handoffs. Keep generic imports clock-free and defer GStreamer provenance to a follow-up quest. Co-Authored-By: GPT-6 Astra <codex@openai.com>
kixelated
force-pushed
the
quest/main/jitter-flush-clock
branch
from
September 23, 2026 04:20
e5856ce to
3cadf3b
Compare
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
Catalog jitter used presentation timestamp spacing as a provisional floor, which could permanently overstate a reordered stream. Browser encoders advertised fixed frame duration hints instead of measuring when encoded frames reached the transport. A slower rendition also needs to be compared with its broadcast peers.
Approach
flush(timestamp, now)observations to the Rust estimator, container producer, and codec importers. The native audio and video encoders call them after successful writes.moq_publish_media_flushto libmoq andMoqMediaProducer.flushto UniFFI. SampleInstant::now()inside Rust for C and language bindings, then expose the call through Python, Swift, Go, and the Kotlin and Dart FFI objects. OBS calls it for encoded audio and video packets; generic file, pipe, and network imports remain clock-free.Impact
Estimator::flush(timestamp: Timestamp, now: Instant),container::Producer::flush(timestamp, now), codec/importer forwarding methods, andmoq_mux::Error::JitterDecreased. Existing rendition updates now refuse decreasing jitter, which violates the catalog rule.moq_publish_media_flush(media, timestamp_us)andMediaProducer.flush(timestamp_us)in the affected bindings. The timestamp is a PTS on the broadcast media clock; invalid handles and unrepresentable timestamps return errors.Alternatives
flush.Follow-ups
quest/next/gst-encoder-jitter-provenance.mdscopes opt-in GStreamer encoder observations. Generic GStreamer imports remain clock-free.Validation:
just check,just test(1,992 Rust tests, 68 Python tests, and affected JS suites),just obs test, andjust test smoke --all. The local Nix shell has no Swift toolchain, so the Swift check was skipped locally.The first full smoke run marked GStreamer unavailable after its plugin probe. Direct
gst-inspect, isolatedrust -> gst, and a second full run with all 32 pairs passed without source changes.After rebasing onto the new release on
origin/main,just checkis blocked by an unchanged upstreammoq-relaydead-code lint atrs/moq-relay/src/relay.rs:698(serveis never used). The earlier full check passed before that release merge;cargo check -p moq-mux -p moq-video -p moq-audio -p moq-ffi -p libmoqpasses on the rebased branch.(written by GPT-6 Astra)