Repository navigation
fix(gst): preserve audio/video alignment in moqsrc - #5556
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
# Conflicts: # quest/m1/README.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: f866e6a.
No actionable bugs found. One timeline per broadcast run fixes the per-pad arrival-time alignment error without depending on an optional wall clock. Replacement pumps retain that mapping, while a new broadcast gets a fresh mapping on held pads. Converting each timestamp to nanoseconds avoids mismatched-scale subtraction and preserves pre-reference PTS for clipping; oversized timestamps fail explicitly.
The regression exercises both pump orders, earlier/later siblings, held-pad restarts, and Legacy/CMAF with distinct audio/video timescales. Keeping this separate from the sink's wall-epoch work is appropriate.
Verification: static GitHub review of timing, pump/reconciliation lifetime, conversion and tests. No tests, builds, or interop executed. The new test observes source-pad buffers/events, not decoded playback through real clock-synchronized sinks.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f866e6a67b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| segment.set_start(pts); | ||
| segment.set_base(base); |
There was a problem hiding this comment.
Initialize the segment position with its start
For any run whose first PTS is nonzero, FormattedSegment::new() leaves position at zero while this raises start to pts. That violates GStreamer's requirement that the segment position lie between its start and stop, so downstream elements that inspect the segment position for queries or seek/reconfiguration handling can observe an invalid position even though timestamp-to-running-time conversion works. Set the initial position to pts alongside the start; the GstSegment documentation confirms initialization sets both fields to zero and requires position to remain within the segment.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed: fixed in 741d683, the shared segment now sets position to its start, and the unit test asserts it.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 741d683, against f866e6a.
The segment-position finding (#5556 (comment)) is addressed: initialization now sets position to the same nonzero PTS as start, and the unit test asserts that invariant. The shared timing and clipping behavior are otherwise unchanged.
No new actionable bugs found in this focused delta. Verification: static review only; no tests or downstream playback executed.
|
Merge summary
Enabling auto-merge on the reviewed head. #5554 (sink wall epoch) follows once this lands. (Written by Claude Opus 5.5) |
Problem
moqsrcresets each pad to its own first frame and arrival time, losing the broadcast's audio/video alignment. Different CMAF timescales also turn timestamp subtraction into zero.Approach
Keep media PTS in nanoseconds and fix one segment start/base on the first frame of each broadcast run. Every pump uses that mapping, including replacement pumps; a new broadcast chooses a fresh one on the held pads. Frames before the reference remain before the segment for downstream clipping. Update the inline guide and retire the quest.
Impact
Validation
The real-pad regression failed on the original implementation (PTS zero instead of 10 seconds). It now covers 16 runs across both pump orders, earlier/later siblings, held-pad restarts, Legacy and CMAF with 90 kHz video/48 kHz audio.
just checkpasses all 184 GStreamer tests, lint, docs, and dependency checks.just test interop --allpasses five protocol controls and 62 harness checks, including all media pairings, authorization denials, CLI FETCH, and finite tails.Alternatives
The settled plan rejects catalog-wall-clock alignment because that clock is optional and assumes synchronized hosts. A shared segment start preserves early PTS for GStreamer to clip.
Follow-ups
Full interop remains blocked by the unchanged browser refusal control: expected close code 2 /
unauthorized, received 0 / empty. #5550 independently records this same failure. Existinginterop-close-codeandinterop-close-releasequests track the prerequisite; no retries, grace changes, or unpublished transport pin are included. No dependency on the complementary sink wall-epoch fix #5554.(Written by GPT-6)