|
LiveKit C++ SDK
Real-time audio/video SDK for C++
|
#include <video_source.h>
Public Member Functions | |
| VideoSource (int width, int height) | |
| VideoSource (const VideoSource &)=delete | |
| VideoSource & | operator= (const VideoSource &)=delete |
| VideoSource (VideoSource &&) noexcept=default | |
| VideoSource & | operator= (VideoSource &&) noexcept=default |
| int | width () const noexcept |
| Source resolution as declared at construction. | |
| int | height () const noexcept |
| std::uint64_t | ffi_handle_id () const noexcept |
| Underlying FFI handle ID (0 if invalid). | |
| void | captureFrame (const VideoFrame &frame, std::int64_t timestamp_us=0, VideoRotation rotation=VideoRotation::VIDEO_ROTATION_0) |
Represents a real-time video source that can accept frames from the application and feed them into the LiveKit core.
| livekit::VideoSource::VideoSource | ( | int | width, |
| int | height | ||
| ) |
Create a new native video source with a fixed resolution.
| width | Width in pixels. |
| height | Height in pixels. |
Throws std::runtime_error if the FFI call fails or the response does not contain the expected new_video_source field.
| void livekit::VideoSource::captureFrame | ( | const VideoFrame & | frame, |
| std::int64_t | timestamp_us = 0, |
||
| VideoRotation | rotation = VideoRotation::VIDEO_ROTATION_0 |
||
| ) |
Push a VideoFrame into the FFI video source.
| frame | Video frame to send. |
| timestamp_us | Optional timestamp in microseconds. |
| rotation | Video rotation enum. |
| timeout_ms | Controls waiting behavior: |
Notes: