Skip to content

gstreamer: add VP8 and VP9 codec support#1632

Merged
kixelated merged 1 commit into
mainfrom
claude/suspicious-hellman-aa6849
Jun 5, 2026
Merged

gstreamer: add VP8 and VP9 codec support#1632
kixelated merged 1 commit into
mainfrom
claude/suspicious-hellman-aa6849

Conversation

@kixelated
Copy link
Copy Markdown
Collaborator

Summary

Adds VP8 and VP9 support to the GStreamer plugin (moqsink / moqsrc). H.264, H.265, AV1, AAC, and Opus were already wired up, and the VP8/VP9 importers already exist in moq-mux, so this is purely plumbing the GStreamer caps through to them.

Changes

  • moqsink (publish) — accept video/x-vp8 and video/x-vp9 sink pads and map them to FramedFormat::Vp8 / Vp9. Like AV1, they initialize with an empty buffer since VP8/VP9 carry no out-of-band config; the track is created lazily from the first keyframe's inline dimensions.
  • moqsrc (subscribe) — emit video/x-vp8 / video/x-vp9 caps for VP8/VP9 catalog entries. No codec_data is attached since the decoders parse profile/bit-depth from the bitstream itself.
  • docs — added VP8/VP9 rows to the supported-codecs table in doc/bin/gstreamer.md (per the Cross-Package Sync rule).

Reviewer notes

  • VP8 and VP9 were the only video codecs missing; all audio codecs (AAC, Opus) were already present.
  • On the source side I attach no codec_data for VP9, so the catalog's vpcC config record isn't propagated into the GStreamer caps. vp9dec / decodebin3 parse the needed config from the bitstream, so this works in practice. If strict caps negotiation is later desired, we could translate vpcC → the profile / bit-depth caps fields.

Test plan

  • cargo build -p moq-gst — clean
  • cargo clippy -p moq-gst (via nix to match CI toolchain) — clean, no warnings
  • End-to-end VP8/VP9 publish → subscribe round-trip with a real GStreamer pipeline

(Written by Claude)

H.264, H.265, AV1, AAC, and Opus were already wired into the GStreamer
plugin, but VP8 and VP9 were missing even though moq-mux already has the
importers. This plumbs the GStreamer caps through to them.

moqsink: accept video/x-vp8 and video/x-vp9 pads and map them to
FramedFormat::Vp8 / Vp9. Like AV1, they initialize with an empty buffer
since VP8/VP9 carry no out-of-band config; the track is created lazily
from the first keyframe's inline dimensions.

moqsrc: emit video/x-vp8 / video/x-vp9 caps for VP8/VP9 catalog entries.
No codec_data is attached since the decoders read configuration inline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de7b791d-212b-4164-b050-56c94b714c87

📥 Commits

Reviewing files that changed from the base of the PR and between cec6fc4 and b0369d2.

📒 Files selected for processing (3)
  • doc/bin/gstreamer.md
  • rs/moq-gst/src/sink/imp.rs
  • rs/moq-gst/src/source/imp.rs

Walkthrough

This PR adds VP8 and VP9 video codec support to the moq-gst GStreamer elements. The sink element's capability template was extended to advertise video/x-vp8 and video/x-vp9, with corresponding handler logic that allocates frame buffers and instantiates the appropriate moq_mux::import::FramedFormat decoders. The source element's video_caps function now generates matching VP8/VP9 capabilities. Documentation of supported moqsink codecs was updated to reflect these additions.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding VP8 and VP9 codec support to GStreamer plugin, which is the central objective across all file modifications.
Description check ✅ Passed The description comprehensively explains the changeset, detailing VP8/VP9 additions to moqsink, moqsrc, and documentation, with context on related codecs and design rationale.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/suspicious-hellman-aa6849

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kixelated kixelated enabled auto-merge (squash) June 5, 2026 03:54
@kixelated kixelated merged commit f809b8f into main Jun 5, 2026
1 check passed
@kixelated kixelated deleted the claude/suspicious-hellman-aa6849 branch June 5, 2026 03:59
@moq-bot moq-bot Bot mentioned this pull request Jun 5, 2026
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