Skip to content

pre-encoded ingest - #260

Merged
stephen-derosa merged 3 commits into
mainfrom
sderosa/pre-encoded-ingest
Sep 11, 2026
Merged

pre-encoded ingest#260
stephen-derosa merged 3 commits into
mainfrom
sderosa/pre-encoded-ingest

Conversation

@stephen-derosa

Copy link
Copy Markdown
Collaborator

Overview

Pre-Encoded Ingestion

Copilot AI lite review requested due to automatic review settings September 9, 2026 17:51
devin-ai-integration[bot]

This comment was marked as resolved.

Copilot AI 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.

🔵 Needs a closer look

It adds new public API surface and new/updated FFI message usage that requires careful cross-language contract validation beyond what can be fully confirmed from the C++ diffs alone.

Pull request overview

Adds pre-encoded video ingestion support to the C++ SDK by introducing a new EncodedVideoSource that submits already-encoded access units via the Rust FFI layer, plus the associated publish options, tests, and documentation.

Changes:

  • Introduces livekit::EncodedVideoSource (public API) for publishing encoded access units and polling encoder feedback.
  • Extends TrackPublishOptions with VideoEncoderBackend (including PreEncoded) and wires it through proto conversion.
  • Adds unit/integration/stress coverage and updates Doxygen + docs to document the new workflow.
File summaries
File Description
src/video_source.cpp Adds an internal SourceType path so VideoSource can create encoded-capable sources via FFI.
src/encoded_video_source.cpp Implements synchronous submission of encoded frames + feedback polling over FFI.
src/room_proto_converter.cpp Serializes/deserializes the new TrackPublishOptions::video_encoder field.
include/livekit/video_source.h Adds private SourceType and constructor for encoded sources; friends EncodedVideoSource.
include/livekit/encoded_video_source.h New public header defining the encoded ingestion API and data types.
include/livekit/room_event_types.h Defines VideoCodec and adds VideoEncoderBackend + video_encoder publish option.
include/livekit/livekit.h Exposes the new public header via the umbrella include.
src/tests/unit/test_video_frame_metadata.cpp Adds round-trip unit test coverage for VideoEncoderBackend.
src/tests/unit/test_encoded_video_source.cpp New unit tests for EncodedVideoSource construction, validation, feedback, and capture.
src/tests/stress/test_encoded_video_ingestion_stress.cpp New stress test measuring sustained encoded frame submission throughput.
src/tests/integration/test_encoded_video_ingestion.cpp New integration test publishing pre-encoded H.264 and verifying decoded reception.
docs/pre-encoded-video.md New user-facing documentation for pre-encoded publishing and feedback handling.
docs/README.md Adds a link to the new pre-encoded video documentation.
docs/doxygen/Doxyfile Adds the new markdown doc to the Doxygen input set.
scripts/generate-docs.sh Ensures the generated Doxygen config includes the new doc page.
CMakeLists.txt Adds src/encoded_video_source.cpp to the shared library build.
Review details
  • Files reviewed: 17/17 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from 4d41d21 to 127f263 Compare September 9, 2026 18:03

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 1 new potential issue.

🐛 1 issue in files not directly in the diff

🐛 Documentation generation always fails

Deleting the guide leaves generate-docs.sh referencing it as a Doxygen input. Doxygen treats the missing file as fatal, blocking documentation CI and releases.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from 127f263 to e6545df Compare September 9, 2026 18:12
devin-ai-integration[bot]

This comment was marked as resolved.

@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from c41e525 to 8a04866 Compare September 9, 2026 19:55
@stephen-derosa
stephen-derosa marked this pull request as draft September 9, 2026 20:38
@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from 8a04866 to a9c340f Compare September 9, 2026 21:01
@ladvoc
ladvoc self-requested a review September 10, 2026 17:10
@ladvoc
ladvoc marked this pull request as ready for review September 10, 2026 17:10
devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread include/livekit/encoded_video_source.h Outdated
Comment thread include/livekit/video_source.h
Comment thread include/livekit/room_event_types.h Outdated
Comment thread include/livekit/encoded_video_source.h
Comment thread src/encoded_video_source.cpp
@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from 942bd89 to 7d37f44 Compare September 11, 2026 00:12
@stephen-derosa
stephen-derosa force-pushed the sderosa/pre-encoded-ingest branch from e78f450 to 7fdf748 Compare September 11, 2026 16:43
@stephen-derosa
stephen-derosa merged commit df8319d into main Sep 11, 2026
25 checks passed
@stephen-derosa
stephen-derosa deleted the sderosa/pre-encoded-ingest branch September 11, 2026 17:17
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.

3 participants