// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.media.defs package placestream import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" comatproto "stream.place/streamplace/pkg/comatproto" ) // MediaDefs_MuxlTrack is a "muxlTrack" in the place.stream.media.defs schema. // // A track backed by a MUXL container type MediaDefs_MuxlTrack struct { LexiconTypeID string `json:"$type,omitempty"` // blob: BLAKE-3 content hash (BDASL CID) of the source video segment. Blob string `json:"blob"` // language: Language of the track, if applicable. Language *string `json:"language,omitempty"` // mediaType: Type of the track: video, audio, or text. MediaType string `json:"mediaType"` // signingKey: did:key of the ephemeral key that C2PA-signed this track's segments. The private key is discarded once the track is produced, so it can only ever have signed this content. SigningKey *string `json:"signingKey,omitempty"` // size: Size in bytes of the source video segment. Size *int64 `json:"size,omitempty"` // trackId: ID of the track within the MUXL container. 1-indexed for MP4 reasons. TrackId string `json:"trackId"` } // RecordTypeID implements glex.Record. func (t *MediaDefs_MuxlTrack) RecordTypeID() string { return "place.stream.media.defs#muxlTrack" } func (t *MediaDefs_MuxlTrack) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.media.defs#muxlTrack" return glex.MarshalCBOR(w, &cp) } func (t *MediaDefs_MuxlTrack) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // MediaDefs_SourceClip is a "sourceClip" in the place.stream.media.defs schema. // // An object representing that this video's source is a clip from another video. type MediaDefs_SourceClip struct { LexiconTypeID string `json:"$type,omitempty"` // end: End time of the clip in milliseconds. End int64 `json:"end"` // start: Start time of the clip in milliseconds. Start int64 `json:"start"` // video: AT URI of the video we're clipping. Video string `json:"video"` } // RecordTypeID implements glex.Record. func (t *MediaDefs_SourceClip) RecordTypeID() string { return "place.stream.media.defs#sourceClip" } func (t *MediaDefs_SourceClip) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.media.defs#sourceClip" return glex.MarshalCBOR(w, &cp) } func (t *MediaDefs_SourceClip) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // MediaDefs_SourceTracks is a "sourceTracks" in the place.stream.media.defs schema. // // A collection of tracks representing the canonical source of a video. type MediaDefs_SourceTracks struct { LexiconTypeID string `json:"$type,omitempty"` // tracks: The canonical list of tracks specifying the source of a video. Tracks []comatproto.RepoStrongRef `json:"tracks"` } // RecordTypeID implements glex.Record. func (t *MediaDefs_SourceTracks) RecordTypeID() string { return "place.stream.media.defs#sourceTracks" } func (t *MediaDefs_SourceTracks) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "place.stream.media.defs#sourceTracks" return glex.MarshalCBOR(w, &cp) } func (t *MediaDefs_SourceTracks) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }