Skip to content

feat(ffi)!: fold the container stream importer into ContainerProducer - #5919

Merged
kixelated merged 5 commits into
mainfrom
quest/m1/ffi-shape/stream-producer-name
Oct 19, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m1/ffi-shape/stream-producer-name

Conversation

@kixelated

@kixelated kixelated commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

MoqMediaContainerStreamProducer (media.ContainerStreamProducer in the wrappers) is a 5-word generated name, the shape the maintainer called terrible on #5356. The quest asked whether to rename it by role.

Looking at what it does, it does not need a name at all. A container recovers its own framing, so moq_mux::import::Container and ContainerStream both use the same ContainerImpl, and moq-mux says a whole chunk and a stream chunk decode the same way. The stream importer is MoqMediaContainerProducer with empty leading bytes and without cut/seek.

Approach

Delete MoqMediaContainerStreamProducer and MoqContainerStreamInit from moq-ffi and every wrapper. To feed a raw byte stream, construct media.ContainerProducer with empty data and write chunks split anywhere. Its docs now say that.

This was the last child of the ffi-shape epic, and the epic's own work (layer namespaces, the layers docs page, the rs/moq-ffi/AGENTS.md pattern) has landed. So this PR deletes the epic and its references. That unblocks m1/c/package, m1/auth/bindings, and m1/auth/token-in-band.

Decisions

Settled by the maintainer: delete the stream importer and use media.ContainerProducer with empty data.

  • The two types run the same decoder, so the second type only added API surface. ContainerProducer is a superset because it also has cut and seek.
  • media.TrackStreamProducer stays because it really is different: a codec stream infers frame boundaries, while TrackProducer takes timestamped frames.
  • Rejected: renaming it to media.StreamProducer, or keeping media.ContainerStreamProducer.

Also approved: delete the ffi-shape epic now that its last child lands.

Public API impact

Breaking binding API. None of it has shipped: release still has BroadcastProducer.publish_container_stream. No wire change.

  • rs/moq-ffi: removed MoqMediaContainerStreamProducer and MoqContainerStreamInit. MoqMediaContainerProducer docs say chunks may split anywhere.
  • py/moq-rs: removed moq.media.ContainerStreamProducer and ContainerStreamInit.
  • go/wrapper: removed media.NewContainerStreamProducer, ContainerStreamProducer, and ContainerStreamInit.
  • swift: removed Media.ContainerStreamProducer and Media.ContainerStreamInit.
  • kt, dart: removed the ContainerStreamProducer and ContainerStreamInit aliases. dart/moq_ffi is regenerated.
  • cpp: removed moq::MediaContainerStreamProducer and moq::ContainerStreamInit. cpp/obs never used them.
  • rs/moq-c, doc/lib/c, doc/bin/obs.md: unchanged. moq-c never had a stream importer; its container takes whole chunks.
  • rs/moq-mux: unchanged. import::ContainerStream is now unused in the repo (see follow-ups).
  • MIGRATE.md (moq-ffi, py, go, swift, kt, dart, cpp): the unreleased "byte-stream importers take an init record" entry is replaced by "byte streams use the container producer", with an example.
  • Docs: doc/lib/{py,go,swift,kt,dart,cpp}, doc/lib/layers.md, py/moq-rs/README.md, py/moq-rs/docs/index.md, go/wrapper/README.md.

Validation

  • just check passes on the branch.
  • just test interop --all: all checks passed.
  • Swift was not built locally (no toolchain); CI covers it.
  • The moq-ffi timebase tests that paired a chunk importer with a stream importer now pair two ContainerProducers. moq-mux's a_split_stream_publishes_its_tracks already shows that a container decodes from chunks split mid-header.

Follow-ups

  • Delete moq_mux::import::ContainerStream. It has no users left, and Container with empty ContainerInit::data does the same thing. It is a breaking change to moq-mux, so it is not in this PR.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 4 commits October 18, 2026 22:14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A container recovers its own framing, so MoqMediaContainerProducer already
takes chunks split anywhere. MoqMediaContainerStreamProducer and
MoqContainerStreamInit were the same importer minus cut/seek and the leading
bytes; delete them from moq-ffi and every wrapper.

Completes the ffi-shape epic, whose last child settled this name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest outcome (background agent, so the open decisions have not been put to the maintainer yet):

  • I implemented the recommended option and deleted media.ContainerStreamProducer. It runs the same moq-mux decoder as media.ContainerProducer, so a raw byte stream goes through ContainerProducer with empty data.
  • Open: the maintainer picks delete (recommended), a rename to media.StreamProducer, or keeping the name. This PR stays a draft until that is settled.
  • Open: deleting the ffi-shape epic now that its last child lands. That unblocks m1/c/package, m1/auth/bindings, and m1/auth/token-in-band.
  • just check and just test interop --all pass locally. Swift was not built locally.
  • Suggested follow-up: delete the now-unused moq_mux::import::ContainerStream.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision: delete MoqMediaContainerStreamProducer and use MoqMediaContainerProducer (media.ContainerProducer) with empty data for raw byte streams, as this PR does. Deleting the finished ffi-shape epic here is also approved.

I re-checked the rs/moq-ffi Cross-Package Sync list: rs/moq-c and doc/lib/c never had a stream importer (moq-c's container takes whole chunks through its own import::Container), and cpp/obs/src and doc/bin/obs.md never used it. Every other wrapper and doc is updated in this PR. Merged origin/main in.

(Written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review October 19, 2026 15:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T18:11:03.649704Z ad2e223 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0d85705-ede8-4e30-9d57-af4cd04fd11f
📥 Commits

Reviewing files that changed from the base of the PR and between 1dd9b83 and 71c5863.

📒 Files selected for processing: 40
  • cpp/moq/MIGRATE.md
  • cpp/moq/test/probe.cpp
  • dart/moq/MIGRATE.md
  • dart/moq/lib/media.dart
  • dart/moq/test/moq_test.dart
  • dart/moq_ffi/lib/src/moq.dart
  • doc/lib/cpp/index.md
  • doc/lib/dart/index.md
  • doc/lib/go/index.md
  • doc/lib/kt/index.md
  • doc/lib/layers.md
  • doc/lib/py/index.md
  • doc/lib/swift/index.md
  • go/wrapper/MIGRATE.md
  • go/wrapper/README.md
  • go/wrapper/media/media.go
  • go/wrapper/media/media_test.go
  • kt/moq/MIGRATE.md
  • kt/moq/src/jvmAndAndroidMain/kotlin/dev/moq/media/Media.kt
  • kt/moq/src/jvmAndAndroidTest/kotlin/dev/moq/SmokeTest.kt
  • py/moq-rs/MIGRATE.md
  • py/moq-rs/README.md
  • py/moq-rs/docs/index.md
  • py/moq-rs/moq/media.py
  • py/moq-rs/tests/test_local.py
  • quest/m1/README.md
  • quest/m1/auth/bindings.md
  • quest/m1/auth/token-in-band.md
  • quest/m1/c/README.md
  • quest/m1/c/package.md
  • quest/m1/compress/migrate.md
  • quest/m1/ffi-shape/README.md
  • quest/m1/ffi-shape/stream-producer-name.md
  • quest/m2/uniffi-namespaces.md
  • rs/moq-ffi/MIGRATE.md
  • rs/moq-ffi/src/media.rs
  • rs/moq-ffi/src/origin.rs
  • swift/MIGRATE.md
  • swift/Sources/Moq/Media.swift
  • swift/Tests/MoqTests/SmokeTests.swift
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad2e223324

ℹ️ 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".

Comment thread rs/moq-ffi/MIGRATE.md
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging. Summary:

  • Deletes MoqMediaContainerStreamProducer / MoqContainerStreamInit from moq-ffi and every wrapper (py, go, swift, kt, dart, cpp); raw container byte streams use ContainerProducer with empty data. Docs and MIGRATE.md updated in each package; moq-c, doc/lib/c, and OBS never had a stream importer.
  • Deletes the finished ffi-shape epic, unblocking m1/c/package, m1/auth/bindings, and m1/auth/token-in-band.
  • Decisions: both confirmed by the maintainer (see above).
  • Review: Codex reviewed ad2e223; its one finding (MIGRATE naming) is answered inline, since the entries name the released symbol. CodeRabbit was rate limited.
  • CI: all required checks pass on ad2e223. just check passed locally after merging origin/main.

Follow-up: delete the now-unused moq_mux::import::ContainerStream (breaking for moq-mux).

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ad2e223324

ℹ️ 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".

@kixelated
kixelated added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit a3b4b8b Oct 19, 2026
28 checks passed
@kixelated
kixelated deleted the quest/m1/ffi-shape/stream-producer-name branch October 19, 2026 20:45
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