74 encoding.custom_ = std::move(identifier);
81 bool isCustom()
const {
return !custom_.empty(); }
100inline bool operator==(
const DataTrackSchemaEncoding& a,
const DataTrackSchemaEncoding& b) {
101 if (a.isCustom() || b.isCustom()) {
102 return a.customIdentifier() == b.customIdentifier();
104 return a.wellKnown() == b.wellKnown();
106inline bool operator!=(
const DataTrackSchemaEncoding& a,
const DataTrackSchemaEncoding& b) {
return !(a == b); }
158 encoding.custom_ = std::move(identifier);
184inline bool operator==(
const DataTrackFrameEncoding& a,
const DataTrackFrameEncoding& b) {
185 if (a.isCustom() || b.isCustom()) {
186 return a.customIdentifier() == b.customIdentifier();
188 return a.wellKnown() == b.wellKnown();
190inline bool operator!=(
const DataTrackFrameEncoding& a,
const DataTrackFrameEncoding& b) {
return !(a == b); }
208inline bool operator!=(
const DataTrackSchemaId& a,
const DataTrackSchemaId& b) {
return !(a == b); }
Encoding used for frames sent on a data track.
Definition data_track_schema.h:120
WellKnown wellKnown() const
Get the well-known encoding.
Definition data_track_schema.h:170
WellKnown
Well-known frame encodings.
Definition data_track_schema.h:123
@ Cdr
CDR, described by a Ros2Msg, Ros2Idl, or OmgIdl schema.
Definition data_track_schema.h:127
@ Other
Another well-known encoding not known to this client version.
Definition data_track_schema.h:139
@ Json
JSON, self-describing or described by a JsonSchema schema.
Definition data_track_schema.h:137
@ Cbor
CBOR, self-describing.
Definition data_track_schema.h:133
@ Ros1
ROS 1, described by a Ros1Msg schema.
Definition data_track_schema.h:125
@ Msgpack
MessagePack, self-describing.
Definition data_track_schema.h:135
@ Protobuf
Protocol Buffer, described by a Protobuf schema.
Definition data_track_schema.h:129
@ Flatbuffer
FlatBuffer, described by a Flatbuffer schema.
Definition data_track_schema.h:131
DataTrackFrameEncoding(WellKnown well_known)
Construct a well-known encoding.
Definition data_track_schema.h:147
const std::string & customIdentifier() const
Get the custom identifier.
Definition data_track_schema.h:175
bool isCustom() const
Check whether this is a custom encoding.
Definition data_track_schema.h:165
static DataTrackFrameEncoding custom(std::string identifier)
Construct a custom, application-defined encoding.
Definition data_track_schema.h:156
Encoding used to interpret a data track schema definition.
Definition data_track_schema.h:36
WellKnown
Well-known schema encodings.
Definition data_track_schema.h:39
@ Protobuf
Protocol Buffer IDL.
Definition data_track_schema.h:41
@ Other
Another well-known encoding not known to this client version.
Definition data_track_schema.h:55
@ Ros2Msg
ROS 2 Message.
Definition data_track_schema.h:47
@ OmgIdl
OMG IDL.
Definition data_track_schema.h:51
@ JsonSchema
JSON Schema.
Definition data_track_schema.h:53
@ Ros1Msg
ROS 1 Message.
Definition data_track_schema.h:45
@ Flatbuffer
FlatBuffer IDL.
Definition data_track_schema.h:43
@ Ros2Idl
ROS 2 IDL.
Definition data_track_schema.h:49
const std::string & customIdentifier() const
Get the custom identifier.
Definition data_track_schema.h:91
DataTrackSchemaEncoding(WellKnown well_known)
Construct a well-known encoding.
Definition data_track_schema.h:63
bool isCustom() const
Check whether this is a custom encoding.
Definition data_track_schema.h:81
WellKnown wellKnown() const
Get the well-known encoding.
Definition data_track_schema.h:86
static DataTrackSchemaEncoding custom(std::string identifier)
Construct a custom, application-defined encoding.
Definition data_track_schema.h:72
Public API for the LiveKit C++ Client SDK.
Definition audio_frame.h:25
Uniquely identifies a data track schema.
Definition data_track_schema.h:197
DataTrackSchemaEncoding encoding
Encoding of the schema definition.
Definition data_track_schema.h:202
std::string name
Name component of the schema identifier.
Definition data_track_schema.h:199