Video source for publishing pre-encoded access units without re-encoding.
More...
#include <encoded_video_source.h>
|
| struct | Feedback |
| | Pending feedback from the pre-encoded passthrough encoder. More...
|
| |
| struct | Frame |
| | One complete pre-encoded video access unit. More...
|
| |
| struct | RateControl |
| | Latest encoder rate-control target requested by the publishing pipeline. More...
|
| |
Video source for publishing pre-encoded access units without re-encoding.
Capture calls are synchronous and copy the payload before returning. This type is not safe for concurrent capture calls. Feedback polling can run on another application thread.
◆ EncodedVideoSource()
| livekit::EncodedVideoSource::EncodedVideoSource |
( |
VideoCodec |
codec, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Create a pre-encoded source for one codec and initial resolution.
- Parameters
-
| codec | Codec carried by every frame submitted to this source. This must match TrackPublishOptions::video_codec. |
| width | Initial source width in pixels. Must be in [1, 65535]. |
| height | Initial source height in pixels. Must be in [1, 65535]. |
- Exceptions
-
| std::invalid_argument | if either dimension is outside [1, 65535]. |
| std::runtime_error | if source creation fails. |
◆ captureFrame()
| bool livekit::EncodedVideoSource::captureFrame |
( |
const Frame & |
frame | ) |
const |
Submit one complete encoded access unit.
- Parameters
-
| frame | Encoded frame. Its payload is copied during this call. |
- Returns
- True if the frame was accepted.
- Exceptions
-
| std::invalid_argument | if the frame is empty, too large, has only one zero dimension, or has a dimension above 65535. |
| std::runtime_error | if the FFI request fails. |
◆ takeFeedback()
| Feedback livekit::EncodedVideoSource::takeFeedback |
( |
| ) |
const |
Consume pending keyframe and rate-control feedback.
- Returns
- Feedback accumulated since the previous call. Rate-control updates use latest-value-wins semantics.
- Exceptions
-
| std::runtime_error | if the FFI request fails. |
The documentation for this class was generated from the following file: