LiveKit C++ SDK
Real-time audio/video SDK for C++
Loading...
Searching...
No Matches
livekit::VideoStream Class Reference

Classes

struct  Options
 

Public Member Functions

 VideoStream (const VideoStream &)=delete
 
VideoStreamoperator= (const VideoStream &)=delete
 
 VideoStream (VideoStream &&) noexcept
 
VideoStreamoperator= (VideoStream &&) noexcept
 
bool read (VideoFrameEvent &out)
 
void close ()
 

Static Public Member Functions

static std::shared_ptr< VideoStreamfromTrack (const std::shared_ptr< Track > &track, const Options &options)
 
static std::shared_ptr< VideoStreamfromParticipant (Participant &participant, TrackSource track_source, const Options &options)
 

Member Function Documentation

◆ close()

void livekit::VideoStream::close ( )

Signal that we are no longer interested in video frames.

This disposes the underlying FFI video stream, unregisters the listener from FfiClient, marks the stream as closed, and wakes any blocking read(). After calling close(), further calls to read() will return false.

◆ read()

bool livekit::VideoStream::read ( VideoFrameEvent out)

Blocking read: waits until a VideoFrameEvent is available in the internal queue, or the stream reaches EOS / is closed.

Parameters
outOn success, filled with the next video frame event.
Returns
true if a frame was delivered; false if the stream ended (end-of-stream or close()) and no more data is available.

The documentation for this class was generated from the following file: