moq-gst: fix plugin license + broadcast-aligned timestamps#1808
Conversation
GStreamer's registry only loads plugins whose license string is in its
recognised set. "Apache 2.0" is not in that set, so the moq plugin
(moqsink/moqsrc) was silently refused at registry load. The crate is
MIT OR Apache-2.0, so declare the MIT side ("MIT/X11"), which is valid.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ebase The sink rebased each pad to its own first PTS, zeroing every pad's timeline independently. That destroys A/V alignment: audio and video both start at ~0 regardless of their real offset in the pipeline. Forward the SEGMENT event to the worker and map each buffer's PTS to GStreamer running time, which is the broadcast-aligned timeline shared by every pad. Fall back to the raw PTS only when no TIME segment is known. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
Resolutions: - sink/imp.rs: kept the GstAggregator rewrite. main's #1808 (broadcast-aligned timestamps) targeted the old sink and is superseded by the shared running-time timeline this rewrite already uses. - rs/justfile: took main's cargo-based CI. Its `cargo nextest run --workspace` covers moq-gst, so ArielM's separate `test-moq-gst` recipe is redundant. - lib.rs: kept main's plugin-license comment wording (code identical). Adopts main's edition 2024 bump for moq-gst (reformatted accordingly). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Two small, independent
moqsinkfixes cherry-picked from the larger rewrite in #1771, without the FLUSH/seek handling or the per-pad/session generation machinery from that PR.1. Plugin license so the plugin actually loads
GStreamer's registry only loads plugins whose license string is in its recognised set. The
plugin_define!license was"Apache 2.0", which is not in that set, so themoqplugin (moqsink/moqsrc) is silently refused at registry load. The crate isMIT OR Apache-2.0, so this declares the MIT side ("MIT/X11"), which is valid.This commit is self-contained and can be cherry-picked on its own if you want it in faster.
2. Broadcast-aligned timestamps instead of per-pad PTS rebasing
The sink rebased each pad to its own first PTS (
reference_pts), zeroing every pad's timeline independently. That breaks A/V alignment: audio and video both start at ~0 regardless of their real offset.Now the sink forwards the
SEGMENTevent to the worker and maps each buffer's PTS to GStreamer running time, the broadcast-aligned timeline shared by every pad in the pipeline. It falls back to the raw PTS only when no TIME segment is known (e.g. a BYTES segment).What this deliberately leaves out (vs #1771)
send_or_flush, re-anchoring).moqsinkis a live-publish sink; the flush path adds significant concurrency surface for a case it doesn't exercise.Testing
cargo build -p moq-gst,cargo clippy -p moq-gst --all-targets -- -D warnings,cargo fmt --check,cargo test -p moq-gstall pass (via the nix dev shell).(Written by Claude)