Skip to content

Add data tracks schema metadata#1553

Open
ladvoc wants to merge 8 commits into
mainfrom
ladvoc/schema-metadata
Open

Add data tracks schema metadata#1553
ladvoc wants to merge 8 commits into
mainfrom
ladvoc/schema-metadata

Conversation

@ladvoc
Copy link
Copy Markdown
Contributor

@ladvoc ladvoc commented May 12, 2026

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

⚠️ No Changeset found

Latest commit: 6444b0d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ladvoc ladvoc requested a review from boks1971 May 12, 2026 19:36
@ladvoc ladvoc marked this pull request as ready for review May 12, 2026 19:36
@ladvoc ladvoc requested a review from biglittlebigben May 12, 2026 19:36
Comment thread protobufs/livekit_models.proto Outdated
bytes definition = 2;
}

enum DataTrackSchemaFormat {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of these at least should have comments/links to specs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added. Taking another look at the MCAP spec, I realized it isn't a good idea to conflate the concept of message (frame in data track terminology) and schema encoding, so I have separated them here accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not immediately clear to me what a schema encoding is (vs a frame encoding). Are both needed, and if so can we provide some info in the proto file?

Comment thread protobufs/livekit_rtc.proto Outdated
@ladvoc ladvoc force-pushed the ladvoc/schema-metadata branch from f1a3f86 to b16bce9 Compare May 12, 2026 23:57
@ladvoc ladvoc force-pushed the ladvoc/schema-metadata branch from 897ebab to 61116ab Compare May 13, 2026 00:00
Copy link
Copy Markdown
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably hold this till we have some form of implementation?

Should AddDataTrack request fail if there is an existing schema id, but the definition bytes do not match? If so, need to add another error reason for this case.

Should schemas be per publisher? If that is the case, GetSchema should include participant.

If not per publisher, (i. e. per room), becomes trickier to coordinate in a distributed room, so would be good to avoid that.

Encryption.Type encryption = 4;

// Type information for this track. If unset, the track is untyped and frame payloads
// are treated as opaque bytes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, there is no treatment in our system, right? Probably stop at the track is untyped?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can one of frame_encoding/schema_encoding be set and the other unset? Not sure if we want to elaborate the comment to say the typical encoding combinations and also maybe mention if some combination is prohibited. Maybe, a better place to add those might be AddDataTrack which is more user facing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you have

optional DataTrackSchemaId schema = 2;

Should that be optional or should it just be default unspecified?

INVALID_NAME = 8;
DUPLICATE_HANDLE = 9;
DUPLICATE_NAME = 10;
INVALID_SCHEMA = 11;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe UNKNOWN_SCHEMA, there is no validation of schema in our system, so INVALID technically is not quite right. UNKNOWN feels better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants