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

#include <data_track_frame.h>

Public Member Functions

 DataTrackFrame (const DataTrackFrame &)=default
 
 DataTrackFrame (DataTrackFrame &&) noexcept=default
 
DataTrackFrameoperator= (const DataTrackFrame &)=default
 
DataTrackFrameoperator= (DataTrackFrame &&) noexcept=default
 
 DataTrackFrame (std::vector< std::uint8_t > &&p, std::optional< std::uint64_t > ts=std::nullopt) noexcept
 

Static Public Member Functions

static DataTrackFrame fromOwnedInfo (const proto::DataTrackFrame &owned)
 This is a private method used by the SDK to create a DataTrackFrame from a proto::DataTrackFrame.
 

Public Attributes

std::vector< std::uint8_t > payload
 
std::optional< std::uint64_t > user_timestamp
 

Detailed Description

A single frame of data published or received on a data track.

Carries an arbitrary binary payload and an optional user-specified timestamp. The unit is application-defined; the SDK examples use microseconds since the Unix epoch (system_clock).

Member Function Documentation

◆ fromOwnedInfo()

static DataTrackFrame livekit::DataTrackFrame::fromOwnedInfo ( const proto::DataTrackFrame &  owned)
static

This is a private method used by the SDK to create a DataTrackFrame from a proto::DataTrackFrame.

Parameters
ownedThe proto::DataTrackFrame to create a DataTrackFrame from.
Returns
The created DataTrackFrame.

Member Data Documentation

◆ payload

std::vector<std::uint8_t> livekit::DataTrackFrame::payload

Arbitrary binary payload (the frame contents).

◆ user_timestamp

std::optional<std::uint64_t> livekit::DataTrackFrame::user_timestamp

Optional application-defined timestamp.

The proto field is a bare uint64 with no prescribed unit. By convention the SDK examples use microseconds since the Unix epoch.


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