@stinkycomputing/sesame-api-client 1.6.0 → 1.9.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,11 @@ export declare const FrameHeader: typeof sesame.v1.wire.FrameHeader;
12
12
  export type IMediaCodecData = sesame.v1.wire.IMediaCodecData;
13
13
  export declare const MediaCodecData: typeof sesame.v1.wire.MediaCodecData;
14
14
  export declare const CodecType: typeof sesame.v1.common.CodecType;
15
+ export type ISideData = sesame.v1.sidedata.ISideData;
16
+ export type ISideDataSet = sesame.v1.sidedata.ISideDataSet;
17
+ export type IAtlasLayout = sesame.v1.sidedata.IAtlasLayout;
18
+ export type IAtlasEntry = sesame.v1.sidedata.IAtlasEntry;
19
+ export declare const SideData: typeof sesame.v1.sidedata.SideData;
15
20
  export interface ParsedFrame {
16
21
  valid: boolean;
17
22
  header: sesame.v1.wire.FrameHeader | null;
@@ -59,6 +64,35 @@ export type ParsedDataFrame = {
59
64
  * ```
60
65
  */
61
66
  export declare function parseDataFrame(frame: ParsedFrame): ParsedDataFrame | null;
67
+ /**
68
+ * Side data carried by a media frame, or `null` when the frame carries none,
69
+ * meaning the set is unchanged since the last frame that carried one. An empty
70
+ * array means every entry was removed. The set is present on key frames and on
71
+ * the frame where it changes, so a receiver that starts at a key frame is
72
+ * always complete.
73
+ */
74
+ export declare function getSideData(frame: ParsedFrame): ISideData[] | null;
75
+ /**
76
+ * Tracks the side data set in effect across a media stream.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const tracker = new SideDataTracker();
81
+ * client.onMediaPacket = (id, frame) => {
82
+ * if (tracker.update(frame)) {
83
+ * const atlas = tracker.get('sesame.atlas.v1')?.atlas;
84
+ * // atlas.entries: [{ sourceId, x, y, width, height }, ...] in atlas.width x atlas.height space
85
+ * }
86
+ * };
87
+ * ```
88
+ */
89
+ export declare class SideDataTracker {
90
+ private entries;
91
+ /** Feed every media frame in order; returns true when the set changed. */
92
+ update(frame: ParsedFrame): boolean;
93
+ get(id: string): ISideData | undefined;
94
+ all(): ISideData[];
95
+ }
62
96
  /**
63
97
  * Build a ready-to-send wire frame carrying an `AudioControlRequest`.
64
98
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sesame-wire-protocol.d.ts","sourceRoot":"","sources":["../src/sesame-wire-protocol.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,eAAO,MAAM,SAAS,iCAA2B,CAAC;AAClD,eAAO,MAAM,QAAQ,gCAA0B,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;AACvD,eAAO,MAAM,WAAW,mCAA6B,CAAC;AACtD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;AAC7D,eAAO,MAAM,cAAc,sCAAgC,CAAC;AAC5D,eAAO,MAAM,SAAS,mCAA6B,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1C,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B;AAMD,+EAA+E;AAC/E,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAe,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GACpE;IAAE,QAAQ,EAAE,kBAAkB,CAAC;IAAG,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAA;CAAE,GAC7F;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAQ,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,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;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,wBAAwB,GAClD,UAAU,CAOZ;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,UAAU,GAClB,UAAU,CAMZ;AAID,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU;IAqB9F;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW;CAqB5C"}
@@ -23,6 +23,7 @@ import { sesame } from '@stinkycomputing/sesame-api-client';
23
23
  - [sesame/v1/recorder/recorder.proto](#sesame_v1_recorder_recorder-proto)
24
24
  - [sesame/v1/rpc/rpc.proto](#sesame_v1_rpc_rpc-proto)
25
25
  - [sesame/v1/rpc/service.proto](#sesame_v1_rpc_service-proto)
26
+ - [sesame/v1/sidedata/side_data.proto](#sesame_v1_sidedata_side_data-proto)
26
27
  - [sesame/v1/sources/source.proto](#sesame_v1_sources_source-proto)
27
28
  - [sesame/v1/status/statistics.proto](#sesame_v1_status_statistics-proto)
28
29
  - [sesame/v1/status/status.proto](#sesame_v1_status_status-proto)
@@ -369,6 +370,9 @@ Each item represents a single command to execute at a specific time offset.
369
370
  | `update_encoder` | sesame.v1.outputs.EncoderUpdateRequest | |
370
371
  | `remove_encoder` | sesame.v1.outputs.EncoderRemoveRequest | |
371
372
  | `take_playlist` | sesame.v1.sources.TakePlaylistRequest | Recorder direct take commands |
373
+ | `output_control` | sesame.v1.outputs.OutputControlRequest | Runtime output stream control (manual SRT outputs) |
374
+ | `set_side_data` | sesame.v1.compositor.SideDataSetRequest | Compositor side data (per-frame metadata on encoded outputs) |
375
+ | `remove_side_data` | sesame.v1.compositor.SideDataRemoveRequest | |
372
376
  | `transaction_id` | optional uint32 | Transaction ID for grouping |
373
377
  | `transaction_deps` | repeated uint32 | Transaction dependencies |
374
378
 
@@ -453,6 +457,7 @@ Used by source/output status models across the API.
453
457
  | 4 | `CONNECTION_STATE_DEGRADED` | Running with reduced health |
454
458
  | 5 | `CONNECTION_STATE_OFFLINE` | Stopped or unavailable |
455
459
  | 6 | `CONNECTION_STATE_ERROR` | Failed with error |
460
+ | 7 | `CONNECTION_STATE_DISABLED` | Intentionally stopped (by config or operator); not an error |
456
461
 
457
462
 
458
463
  ### EventTopic
@@ -706,6 +711,30 @@ Request to set a property value.
706
711
  | `value` | sesame.v1.common.PropValue | Property value |
707
712
 
708
713
 
714
+ ### SideDataRemoveRequest
715
+
716
+ Request to remove one side data entry from a compositor.
717
+
718
+
719
+ | Field | Type | Description |
720
+ |-------|------|-------------|
721
+ | `compositor_id` | string | Compositor ID |
722
+ | `id` | string | Side data entry ID |
723
+
724
+
725
+ ### SideDataSetRequest
726
+
727
+ Request to attach side data to a compositor's frames.
728
+ Replaces the entry with the same id. Takes effect on the frame the command
729
+ executes on, so batching it with node changes keeps both in sync.
730
+
731
+
732
+ | Field | Type | Description |
733
+ |-------|------|-------------|
734
+ | `compositor_id` | string | Compositor ID |
735
+ | `side_data` | sesame.v1.sidedata.SideData | Entry to attach |
736
+
737
+
709
738
  ---
710
739
 
711
740
 
@@ -920,16 +949,61 @@ Timing information for clips.
920
949
 
921
950
 
922
951
 
923
- ### EncoderPreset
952
+ ### EncoderChromaFormat
924
953
 
925
- Encoder preset.
954
+ Encoder chroma subsampling.
926
955
 
927
956
  | Value | Name | Description |
928
957
  |-------|------|-------------|
929
- | 0 | `ENCODER_PRESET_UNSPECIFIED` | Unspecified (invalid) |
930
- | 1 | `ENCODER_PRESET_LOW_LATENCY` | Low-latency tune |
931
- | 2 | `ENCODER_PRESET_LOW_LATENCY_IDR_ONLY` | Low-latency with IDR-only GOP |
932
- | 3 | `ENCODER_PRESET_HIGH_QUALITY` | High-quality tune |
958
+ | 0 | `ENCODER_CHROMA_FORMAT_420` | 4:2:0 (default) |
959
+ | 1 | `ENCODER_CHROMA_FORMAT_444` | 4:4:4 (H264/HEVC only) |
960
+
961
+
962
+ ### EncoderMultipass
963
+
964
+ Encoder multipass mode.
965
+
966
+ | Value | Name | Description |
967
+ |-------|------|-------------|
968
+ | 0 | `ENCODER_MULTIPASS_DISABLED` | Single pass |
969
+ | 1 | `ENCODER_MULTIPASS_QUARTER_RESOLUTION` | First pass at quarter resolution |
970
+ | 2 | `ENCODER_MULTIPASS_FULL_RESOLUTION` | First pass at full resolution |
971
+
972
+
973
+ ### EncoderProfile
974
+
975
+ Encoder profile. Codec-specific; invalid combinations fall back to the codec default.
976
+
977
+ | Value | Name | Description |
978
+ |-------|------|-------------|
979
+ | 0 | `ENCODER_PROFILE_AUTO` | Codec default (H264/AV1: baseline/main, HEVC: main) |
980
+ | 1 | `ENCODER_PROFILE_BASELINE` | H264 baseline |
981
+ | 2 | `ENCODER_PROFILE_MAIN` | Main profile |
982
+ | 3 | `ENCODER_PROFILE_MAIN10` | HEVC main10 |
983
+ | 4 | `ENCODER_PROFILE_HIGH` | H264 high |
984
+
985
+
986
+ ### EncoderRateControl
987
+
988
+ Encoder rate control mode.
989
+
990
+ | Value | Name | Description |
991
+ |-------|------|-------------|
992
+ | 0 | `ENCODER_RATE_CONTROL_UNSPECIFIED` | Unspecified: treated as CBR |
993
+ | 1 | `ENCODER_RATE_CONTROL_CBR` | Constant bitrate |
994
+ | 2 | `ENCODER_RATE_CONTROL_VBR` | Variable bitrate |
995
+
996
+
997
+ ### EncoderTuning
998
+
999
+ Encoder tuning (NVENC tuning info).
1000
+
1001
+ | Value | Name | Description |
1002
+ |-------|------|-------------|
1003
+ | 0 | `ENCODER_TUNING_UNSPECIFIED` | Unspecified: treated as ultra low latency |
1004
+ | 1 | `ENCODER_TUNING_ULTRA_LOW_LATENCY` | Ultra low latency tune |
1005
+ | 2 | `ENCODER_TUNING_LOW_LATENCY` | Low latency tune |
1006
+ | 3 | `ENCODER_TUNING_HIGH_QUALITY` | High quality tune |
933
1007
 
934
1008
 
935
1009
  ### EncoderType
@@ -942,6 +1016,17 @@ Type of encoder resource.
942
1016
  | 1 | `ENCODER_TYPE_VIDEO` | Video encoder |
943
1017
 
944
1018
 
1019
+ ### OutputControlAction
1020
+
1021
+ Runtime start/stop action for a manually controlled output stream.
1022
+
1023
+ | Value | Name | Description |
1024
+ |-------|------|-------------|
1025
+ | 0 | `OUTPUT_CONTROL_ACTION_UNSPECIFIED` | Unspecified (invalid) |
1026
+ | 1 | `OUTPUT_CONTROL_ACTION_START` | Start sending |
1027
+ | 2 | `OUTPUT_CONTROL_ACTION_STOP` | Stop sending |
1028
+
1029
+
945
1030
  ### OutputType
946
1031
 
947
1032
  Type of output.
@@ -969,6 +1054,28 @@ Recorder type.
969
1054
  | 2 | `RECORDER_TYPE_CLIPS` | Clip recorder; not continuously recording, only ingested frames are persisted |
970
1055
 
971
1056
 
1057
+ ### SrtStreamControl
1058
+
1059
+ Who starts and stops an SRT output stream.
1060
+
1061
+ | Value | Name | Description |
1062
+ |-------|------|-------------|
1063
+ | 0 | `SRT_STREAM_CONTROL_UNSPECIFIED` | Treated as STARTED |
1064
+ | 1 | `SRT_STREAM_CONTROL_STARTED` | Streams whenever the engine runs; enforced on every config apply |
1065
+ | 2 | `SRT_STREAM_CONTROL_MANUAL` | Operator start/stop via OutputControlRequest; stopped after engine start |
1066
+
1067
+
1068
+ ### TimecodeMode
1069
+
1070
+ Timecode embedding mode for encoded streams (SEI/metadata OBU).
1071
+
1072
+ | Value | Name | Description |
1073
+ |-------|------|-------------|
1074
+ | 0 | `TIMECODE_MODE_UNSPECIFIED` | No timecode embedded |
1075
+ | 1 | `TIMECODE_MODE_WALLCLOCK` | Composite-time wallclock (identical across outputs of the same frame) |
1076
+ | 2 | `TIMECODE_MODE_SOURCE` | Timecode published by the source in timecode_source_id (e.g. Decklink RP188 or SDI ingress wallclock) |
1077
+
1078
+
972
1079
  ### DecklinkOutputConfig
973
1080
 
974
1081
  Decklink output configuration.
@@ -979,6 +1086,8 @@ Decklink output configuration.
979
1086
  | `device_index` | uint32 | Decklink device index |
980
1087
  | `video_format` | sesame.v1.common.VideoFormat | Video format |
981
1088
  | `key_and_fill` | bool | Key and fill mode |
1089
+ | `timecode_mode` | TimecodeMode | RP188 timecode embedding mode for SDI output |
1090
+ | `timecode_source_id` | string | Source ID providing timecode when timecode_mode == SOURCE |
982
1091
 
983
1092
 
984
1093
  ### EncodedMoqOutputConfig
@@ -1018,6 +1127,7 @@ Decklink output configuration.
1018
1127
  |-------|------|-------------|
1019
1128
  | `url` | string | SRT URL |
1020
1129
  | `encoder_id` | string | Shared encoder ID |
1130
+ | `control` | SrtStreamControl | Stream control mode (unset = STARTED) |
1021
1131
 
1022
1132
 
1023
1133
  ### EncodedSuperSlowMoRecorderOutputConfig
@@ -1070,12 +1180,14 @@ Encoded output configuration (WebSocket, SRT, MoQ).
1070
1180
  | Field | Type | Description |
1071
1181
  |-------|------|-------------|
1072
1182
  | `codec` | sesame.v1.common.CodecType | Encoder codec |
1073
- | `preset` | EncoderPreset | Encoder preset |
1074
1183
  | `bitrate_kbps` | uint32 | Bitrate in kbps |
1075
1184
  | `keyframe_interval` | uint32 | GOP length in frames (0 = codec/preset default) |
1076
1185
  | `width` | uint32 | Video width |
1077
1186
  | `height` | uint32 | Video height |
1078
1187
  | `fps` | float | Video framerate |
1188
+ | `timecode_mode` | TimecodeMode | Timecode embedding mode |
1189
+ | `timecode_source_id` | string | Source ID providing timecode when timecode_mode == SOURCE |
1190
+ | `settings` | EncoderSettings | Explicit encoder settings |
1079
1191
 
1080
1192
 
1081
1193
  ### EncoderRemoveRequest
@@ -1088,6 +1200,31 @@ Request to remove a shared encoder resource.
1088
1200
  | `id` | string | Encoder ID to remove |
1089
1201
 
1090
1202
 
1203
+ ### EncoderSettings
1204
+
1205
+ Explicit encoder settings. The client always sends the full set; named presets
1206
+ exist only client-side as bundles of these values.
1207
+
1208
+
1209
+ | Field | Type | Description |
1210
+ |-------|------|-------------|
1211
+ | `tuning` | EncoderTuning | NVENC tuning info |
1212
+ | `effort` | uint32 | Speed/quality effort 1-7 (1 = fastest, 7 = best quality, 0 = 4); maps to NVENC presets P1-P7 |
1213
+ | `rate_control` | EncoderRateControl | Rate control mode |
1214
+ | `max_bitrate_kbps` | uint32 | Max bitrate in kbps (0 = auto: bitrate for CBR, 2x bitrate for VBR) |
1215
+ | `profile` | EncoderProfile | Codec profile |
1216
+ | `bframes` | uint32 | Consecutive B frames between references (0 = none) |
1217
+ | `idr_only` | bool | Encode every frame as an IDR (overrides GOP and bframes) |
1218
+ | `spatial_aq` | bool | Spatial adaptive quantization |
1219
+ | `multipass` | EncoderMultipass | Multipass encoding mode |
1220
+ | `lookahead_depth` | uint32 | Rate-control lookahead in frames (0 = off, adds latency) |
1221
+ | `zero_reorder_delay` | bool | Emit frames in encode order (no reordering delay) |
1222
+ | `bit_depth` | uint32 | Output bit depth: 0 or 8 = 8-bit, 10 = 10-bit (HEVC/AV1 only) |
1223
+ | `chroma_format` | EncoderChromaFormat | Chroma subsampling |
1224
+ | `output_aud` | bool | Emit access unit delimiters (H264/HEVC) |
1225
+ | `level` | string | Codec level as "major.minor" (empty or "auto" = codec default, e.g. "5.1") |
1226
+
1227
+
1091
1228
  ### EncoderStatus
1092
1229
 
1093
1230
  Encoder status information.
@@ -1100,6 +1237,7 @@ Encoder status information.
1100
1237
  | `state` | sesame.v1.common.ConnectionState | Connection/lifecycle state |
1101
1238
  | `msg` | optional string | Error message (typically when state == ERROR) |
1102
1239
  | `composition_id` | string | Compositor ID being encoded |
1240
+ | `dropped_frames` | uint32 | Frames skipped because the encoder fell behind the renderer |
1103
1241
 
1104
1242
 
1105
1243
  ### EncoderUpdateRequest
@@ -1145,6 +1283,21 @@ Request to add a new output.
1145
1283
  | `system_audio` | SystemAudioOutputConfig | |
1146
1284
 
1147
1285
 
1286
+ ### OutputControlRequest
1287
+
1288
+ Runtime start/stop of an output stream. Only valid for SRT outputs configured
1289
+ with SRT_STREAM_CONTROL_MANUAL; rejected otherwise.
1290
+ When received over the wire protocol (DATA_TYPE_OUTPUT_CONTROL) the target
1291
+ output is resolved from the track's metadata binding and `id` is ignored, so
1292
+ a remote client can only control the output its track is bound to.
1293
+
1294
+
1295
+ | Field | Type | Description |
1296
+ |-------|------|-------------|
1297
+ | `id` | string | Output ID (command API only; ignored on bound wire tracks) |
1298
+ | `action` | OutputControlAction | Action to perform |
1299
+
1300
+
1148
1301
  ### OutputRemoveRequest
1149
1302
 
1150
1303
  Request to remove an output.
@@ -1170,6 +1323,7 @@ Output status information.
1170
1323
  | `buffer_size` | uint32 | Buffer size (frames) |
1171
1324
  | `srt_stats` | optional sesame.v1.status.SRTSendStatistics | SRT stats (if SRT output) |
1172
1325
  | `encoder_id` | string | Shared encoder ID used by this output, if any |
1326
+ | `control` | SrtStreamControl | Stream control mode (SRT outputs; UNSPECIFIED elsewhere) |
1173
1327
 
1174
1328
 
1175
1329
  ### OutputUpdateRequest
@@ -1532,6 +1686,17 @@ that have a binding from this node+metadataId.
1532
1686
  | `data_type` | sesame.v1.wire.DataType | Wire data type (default DATA_TYPE_JSON for backward compat) |
1533
1687
 
1534
1688
 
1689
+ ### SystemOperationRequest
1690
+
1691
+ System maintenance operations. One oneof entry per operation keeps the
1692
+ single RPC extensible.
1693
+
1694
+
1695
+ | Field | Type | Description |
1696
+ |-------|------|-------------|
1697
+ | `reset_frame_drops` | sesame.v1.common.Empty | Resets the engine's dropped-frame counter shown in status. |
1698
+
1699
+
1535
1700
  ### SesameAPIService
1536
1701
 
1537
1702
  Main Sesame API service.
@@ -1551,6 +1716,72 @@ Main Sesame API service.
1551
1716
  | `RequestKeyframe` | .sesame.v1.outputs.KeyframeRequest | .sesame.v1.common.Empty | Request keyframe from encoder. |
1552
1717
  | `RequestIODeviceList` | .sesame.v1.common.Empty | .sesame.v1.status.IODeviceListResponse | Get list of I/O devices. |
1553
1718
  | `PublishMetadata` | PublishMetadataRequest | .sesame.v1.common.Empty | Publish a JSON metadata payload to all output transports bound to this node+metadataId. Used by apps (e.g. Snigel) to emit state that should be forwarded on MoQ/WebSocket outputs. |
1719
+ | `RequestSystemOperation` | SystemOperationRequest | .sesame.v1.common.Empty | System maintenance operations (counter resets and similar). |
1720
+
1721
+
1722
+ ---
1723
+
1724
+
1725
+ ## sesame/v1/sidedata/side_data.proto
1726
+
1727
+ `sesame.v1.sidedata`
1728
+
1729
+
1730
+
1731
+
1732
+ ### AtlasEntry
1733
+
1734
+ Placement of one source inside an atlas, in output pixels.
1735
+
1736
+
1737
+ | Field | Type | Description |
1738
+ |-------|------|-------------|
1739
+ | `source_id` | string | Source rendered at this rectangle |
1740
+ | `x` | uint32 | Left edge |
1741
+ | `y` | uint32 | Top edge |
1742
+ | `width` | uint32 | Rectangle width |
1743
+ | `height` | uint32 | Rectangle height |
1744
+ | `source_width` | uint32 | Native picture size of the source before scaling into the rectangle. Filled by the engine; 0 while unknown. May change without a version bump. |
1745
+ | `source_height` | uint32 | |
1746
+
1747
+
1748
+ ### AtlasLayout
1749
+
1750
+ Where each source sits in an atlas frame. Entries are expressed in the
1751
+ width x height coordinate space, normally the compositor size; receivers
1752
+ scale by decoded size over layout size when the encoder rescales.
1753
+
1754
+
1755
+ | Field | Type | Description |
1756
+ |-------|------|-------------|
1757
+ | `width` | uint32 | Coordinate space width |
1758
+ | `height` | uint32 | Coordinate space height |
1759
+ | `entries` | repeated AtlasEntry | |
1760
+
1761
+
1762
+ ### SideData
1763
+
1764
+ One side data entry. Entries are keyed by id so independent producers can
1765
+ attach data to the same compositor without touching each other's entries.
1766
+
1767
+
1768
+ | Field | Type | Description |
1769
+ |-------|------|-------------|
1770
+ | `id` | string | Namespaced key, e.g. "sesame.atlas.v1" |
1771
+ | `version` | uint64 | Producer-assigned; increases when the entry changes |
1772
+ | `atlas` | AtlasLayout | |
1773
+ | `json` | string | UTF-8 JSON, application-defined schema |
1774
+ | `binary` | bytes | Opaque bytes |
1775
+
1776
+
1777
+ ### SideDataSet
1778
+
1779
+ Complete set of side data entries in effect for a frame.
1780
+
1781
+
1782
+ | Field | Type | Description |
1783
+ |-------|------|-------------|
1784
+ | `entries` | repeated SideData | |
1554
1785
 
1555
1786
 
1556
1787
  ---
@@ -1599,6 +1830,17 @@ Signal generator audio program.
1599
1830
  | 3 | `SIGNAL_GENERATOR_AUDIO_MODE_SILENCE` | Silence |
1600
1831
 
1601
1832
 
1833
+ ### SignalGeneratorTimecodeMode
1834
+
1835
+ Signal generator timecode program.
1836
+
1837
+ | Value | Name | Description |
1838
+ |-------|------|-------------|
1839
+ | 0 | `SIGNAL_GENERATOR_TIMECODE_MODE_NONE` | No timecode published |
1840
+ | 1 | `SIGNAL_GENERATOR_TIMECODE_MODE_FREE_RUN` | Deterministic counter from timecode_start_frame; freeze() freezes it |
1841
+ | 2 | `SIGNAL_GENERATOR_TIMECODE_MODE_TIME_OF_DAY` | System clock time of day |
1842
+
1843
+
1602
1844
  ### SignalGeneratorVideoPattern
1603
1845
 
1604
1846
  Signal generator video test pattern.
@@ -1785,6 +2027,8 @@ Signal generator source configuration.
1785
2027
  | `freeze` | bool | Freeze the moving lip-sync overlay at its sync point (static test pattern) |
1786
2028
  | `video_pattern` | SignalGeneratorVideoPattern | Video test pattern |
1787
2029
  | `audio_mode` | SignalGeneratorAudioMode | Audio program |
2030
+ | `timecode_mode` | SignalGeneratorTimecodeMode | Timecode program |
2031
+ | `timecode_start_frame` | uint32 | FREE_RUN start value (frames since midnight at engine rate) |
1788
2032
 
1789
2033
 
1790
2034
  ### SourceAddRequest
@@ -2122,6 +2366,9 @@ Provides overall system health and performance metrics.
2122
2366
  | `gpu_decoder_utilization` | uint32 | NVDEC utilization (0-100%) |
2123
2367
  | `gpu_name` | string | GPU model name |
2124
2368
  | `vma_bytes` | uint64 | Vulkan Memory Allocator total bytes |
2369
+ | `version` | string | Server version string |
2370
+ | `nvenc_sessions` | uint32 | Open NVENC encoder sessions |
2371
+ | `nvdec_sessions` | uint32 | Open NVDEC decoder sessions |
2125
2372
 
2126
2373
 
2127
2374
  ---
@@ -2301,6 +2548,9 @@ type, or raw UTF-8 JSON for DATA_TYPE_JSON.
2301
2548
  | 4 | `DATA_TYPE_TRANSPORT_CONTROL` | payload: sesame.v1.sources.TransportControlRequest (transport → source) |
2302
2549
  | 5 | `DATA_TYPE_AUDIO_CONTROL` | payload: sesame.v1.audio.AudioControlRequest (transport → mixer) |
2303
2550
  | 6 | `DATA_TYPE_BINARY` | payload: raw binary bytes (opaque to the wire layer) |
2551
+ | 7 | `DATA_TYPE_OUTPUT_STATUS` | payload: sesame.v1.outputs.OutputStatus (output → transport) |
2552
+ | 8 | `DATA_TYPE_OUTPUT_CONTROL` | payload: sesame.v1.outputs.OutputControlRequest (transport → output) |
2553
+ | 9 | `DATA_TYPE_ENGINE_STATUS` | payload: sesame.v1.status.Status (engine → transport; full monitor status) |
2304
2554
 
2305
2555
 
2306
2556
  ### FrameType
@@ -2372,6 +2622,7 @@ Media-specific fields for VIDEO, AUDIO, MUXED, and DECODER_DATA frames.
2372
2622
  | `pts` | uint64 | Presentation timestamp in codec_data timebase units |
2373
2623
  | `keyframe` | bool | True for video key frames |
2374
2624
  | `codec_data` | MediaCodecData | Codec parameters (may be present on first frame or key frames) |
2625
+ | `side_data` | sesame.v1.sidedata.SideDataSet | Complete side data set in effect from this frame on. Present on key frames and on the frame where the set changes; absent means unchanged since the last frame that carried it. An empty set clears all entries. |
2375
2626
 
2376
2627
 
2377
2628
  ---
@@ -2437,6 +2688,7 @@ Properties are set via `PropertySetRequest` or animated via `PropertyAnimateRequ
2437
2688
  |----------|------|-------------|
2438
2689
  | `source` | string | Source ID to display |
2439
2690
  | `audio_meter_source` | string | Pipe-delimited mixer IDs for audio meters |
2691
+ | `audio_meter_count` | float | Number of audio meters to display (0 = automatic) |
2440
2692
  | `show_audio_meter` | bool | Show audio meters |
2441
2693
  | `show_border` | bool | Show border |
2442
2694
  | `show_label_bg` | bool | Show label background |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stinkycomputing/sesame-api-client",
3
- "version": "1.6.0",
3
+ "version": "1.9.0-alpha.1",
4
4
  "description": "Sesame API client library with protobuf definitions and command list helpers",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",