|
LiveKit C++ Client SDK v1.1.0
Real-time audio/video/data SDK for C++
|
Represents a pull-based stream of decoded video frames coming from a remote (or local) LiveKit track. More...
#include <video_stream.h>
Classes | |
| struct | Options |
| Options for creating a decoded video frame stream. More... | |
Public Member Functions | |
| VideoStream (const VideoStream &)=delete | |
| VideoStream & | operator= (const VideoStream &)=delete |
| VideoStream (VideoStream &&) noexcept | |
| VideoStream & | operator= (VideoStream &&) noexcept |
| bool | read (VideoFrameEvent &out) |
| Blocking read: waits until a VideoFrameEvent is available in the internal queue, or the stream reaches EOS / is closed. | |
| void | close () |
| Signal that we are no longer interested in video frames. | |
Static Public Member Functions | |
| static std::shared_ptr< VideoStream > | fromTrack (const std::shared_ptr< Track > &track, const Options &options) |
| Factory: create a VideoStream bound to a specific Track. | |
| static std::shared_ptr< VideoStream > | fromParticipant (Participant &participant, TrackSource track_source, const Options &options) |
| Factory: create a VideoStream from a Participant + TrackSource. | |
Represents a pull-based stream of decoded video frames coming from a remote (or local) LiveKit track.
Similar to AudioStream, but for video.
Typical usage:
VideoStream::Options opts; auto stream = VideoStream::fromTrack(remoteVideoTrack, opts);
VideoFrameEvent ev; while (stream->read(ev)) { // ev.frame contains the decoded video buffer }
stream->close(); // optional, called automatically in destructor
| void livekit::VideoStream::close | ( | ) |
| 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.
| out | On success, filled with the next video frame event. |