|
LiveKit C++ Client SDK v1.9.0
Real-time audio/video/data SDK for C++
|
Encoding used for frames sent on a data track. More...
#include <data_track_schema.h>
Public Types | |
| enum | WellKnown { Ros1 , Cdr , Protobuf , Flatbuffer , Cbor , Msgpack , Json , Other } |
| Well-known frame encodings. More... | |
Public Member Functions | |
| DataTrackFrameEncoding (WellKnown well_known) | |
| Construct a well-known encoding. | |
| bool | isCustom () const |
| Check whether this is a custom encoding. | |
| WellKnown | wellKnown () const |
| Get the well-known encoding. | |
| const std::string & | customIdentifier () const |
| Get the custom identifier. | |
Static Public Member Functions | |
| static DataTrackFrameEncoding | custom (std::string identifier) |
| Construct a custom, application-defined encoding. | |
Encoding used for frames sent on a data track.
The serialization format of the frame bytes (for example, DataTrackFrameEncoding::Protobuf); the structure of those bytes is described by a schema (see DataTrackSchemaEncoding).
Almost all tracks use a well-known encoding, which converts implicitly:
For the uncommon case of an encoding outside the well-known set, use DataTrackFrameEncoding::custom.
Well-known frame encodings.
|
inline |
Construct a well-known encoding.
The constructor is intentionally implicit for the common well-known case.
| well_known | Well-known frame encoding. |
|
inlinestatic |
Construct a custom, application-defined encoding.
Prefer a well-known encoding wherever one applies. The identifier must be non-empty and no longer than 25 characters.
| identifier | Custom encoding identifier. |
|
inline |
Get the custom identifier.
|
inline |
Check whether this is a custom encoding.
|
inline |
Get the well-known encoding.