@livekit/rtc-node 0.0.2 → 0.0.3

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.
Files changed (98) hide show
  1. package/Cargo.toml +21 -0
  2. package/build.rs +5 -0
  3. package/dist/audio_frame.d.ts +13 -0
  4. package/dist/audio_frame.js +36 -0
  5. package/dist/audio_frame.js.map +1 -0
  6. package/dist/audio_source.d.ts +13 -0
  7. package/dist/audio_source.js +42 -0
  8. package/dist/audio_source.js.map +1 -0
  9. package/dist/audio_stream.d.ts +23 -0
  10. package/dist/audio_stream.js +54 -0
  11. package/dist/audio_stream.js.map +1 -0
  12. package/dist/e2ee.d.ts +43 -0
  13. package/dist/e2ee.js +232 -0
  14. package/dist/e2ee.js.map +1 -0
  15. package/dist/ffi_client.d.ts +22 -0
  16. package/dist/ffi_client.js +57 -0
  17. package/dist/ffi_client.js.map +1 -0
  18. package/dist/index.d.ts +15 -0
  19. package/dist/index.js +71 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/native.d.ts +5 -0
  22. package/dist/native.js +297 -0
  23. package/dist/native.js.map +1 -0
  24. package/dist/participant.d.ts +29 -0
  25. package/dist/participant.js +120 -0
  26. package/dist/participant.js.map +1 -0
  27. package/dist/proto/audio_frame_pb.d.ts +555 -0
  28. package/dist/proto/audio_frame_pb.js +861 -0
  29. package/dist/proto/audio_frame_pb.js.map +1 -0
  30. package/dist/proto/e2ee_pb.d.ts +651 -0
  31. package/dist/proto/e2ee_pb.js +906 -0
  32. package/dist/proto/e2ee_pb.js.map +1 -0
  33. package/dist/proto/ffi_pb.d.ts +671 -0
  34. package/dist/proto/ffi_pb.js +459 -0
  35. package/dist/proto/ffi_pb.js.map +1 -0
  36. package/dist/proto/handle_pb.d.ts +29 -0
  37. package/dist/proto/handle_pb.js +59 -0
  38. package/dist/proto/handle_pb.js.map +1 -0
  39. package/dist/proto/participant_pb.d.ts +53 -0
  40. package/dist/proto/participant_pb.js +93 -0
  41. package/dist/proto/participant_pb.js.map +1 -0
  42. package/dist/proto/room_pb.d.ts +1479 -0
  43. package/dist/proto/room_pb.js +2172 -0
  44. package/dist/proto/room_pb.js.map +1 -0
  45. package/dist/proto/stats_pb.d.ts +1712 -0
  46. package/dist/proto/stats_pb.js +2238 -0
  47. package/dist/proto/stats_pb.js.map +1 -0
  48. package/dist/proto/track_pb.d.ts +352 -0
  49. package/dist/proto/track_pb.js +550 -0
  50. package/dist/proto/track_pb.js.map +1 -0
  51. package/dist/proto/video_frame_pb.d.ts +854 -0
  52. package/dist/proto/video_frame_pb.js +1214 -0
  53. package/dist/proto/video_frame_pb.js.map +1 -0
  54. package/dist/room.d.ts +94 -0
  55. package/dist/room.js +285 -0
  56. package/dist/room.js.map +1 -0
  57. package/dist/track.d.ts +34 -0
  58. package/dist/track.js +72 -0
  59. package/dist/track.js.map +1 -0
  60. package/dist/track_publication.d.ts +30 -0
  61. package/dist/track_publication.js +66 -0
  62. package/dist/track_publication.js.map +1 -0
  63. package/dist/video_frame.d.ts +110 -0
  64. package/dist/video_frame.js +364 -0
  65. package/dist/video_frame.js.map +1 -0
  66. package/dist/video_source.d.ts +13 -0
  67. package/dist/video_source.js +44 -0
  68. package/dist/video_source.js.map +1 -0
  69. package/dist/video_stream.d.ts +23 -0
  70. package/dist/video_stream.js +56 -0
  71. package/dist/video_stream.js.map +1 -0
  72. package/package.json +15 -11
  73. package/src/audio_frame.ts +45 -0
  74. package/src/audio_source.ts +64 -0
  75. package/src/audio_stream.ts +74 -0
  76. package/src/e2ee.ts +311 -0
  77. package/src/ffi_client.ts +68 -0
  78. package/src/index.ts +52 -0
  79. package/src/lib.rs +5 -0
  80. package/src/native.d.ts +14 -0
  81. package/src/native.js +269 -0
  82. package/src/nodejs.rs +115 -0
  83. package/src/participant.ts +171 -0
  84. package/src/proto/audio_frame_pb.ts +1121 -0
  85. package/src/proto/e2ee_pb.ts +1231 -0
  86. package/src/proto/ffi_pb.ts +969 -0
  87. package/src/proto/handle_pb.ts +69 -0
  88. package/src/proto/participant_pb.ts +121 -0
  89. package/src/proto/room_pb.ts +2843 -0
  90. package/src/proto/stats_pb.ts +2955 -0
  91. package/src/proto/track_pb.ts +683 -0
  92. package/src/proto/video_frame_pb.ts +1568 -0
  93. package/src/room.ts +370 -0
  94. package/src/track.ts +101 -0
  95. package/src/track_publication.ts +90 -0
  96. package/src/video_frame.ts +620 -0
  97. package/src/video_source.ts +61 -0
  98. package/src/video_stream.ts +76 -0
@@ -0,0 +1,1214 @@
1
+ "use strict";
2
+ // Copyright 2023 LiveKit, Inc.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.OwnedVideoSource = exports.VideoSourceInfo = exports.VideoSourceResolution = exports.VideoStreamEOS = exports.VideoFrameReceived = exports.VideoStreamEvent = exports.OwnedVideoStream = exports.VideoStreamInfo = exports.NativeBufferInfo = exports.BiplanarYuvBufferInfo = exports.PlanarYuvBufferInfo = exports.OwnedVideoFrameBuffer = exports.VideoFrameBufferInfo = exports.VideoFrameInfo = exports.ArgbBufferInfo = exports.VideoResolution = exports.ToArgbResponse = exports.ToArgbRequest = exports.ToI420Response = exports.ToI420Request = exports.CaptureVideoFrameResponse = exports.CaptureVideoFrameRequest = exports.NewVideoSourceResponse = exports.NewVideoSourceRequest = exports.NewVideoStreamResponse = exports.NewVideoStreamRequest = exports.AllocVideoBufferResponse = exports.AllocVideoBufferRequest = exports.VideoSourceType = exports.VideoStreamType = exports.VideoFrameBufferType = exports.VideoFormatType = exports.VideoRotation = exports.VideoCodec = void 0;
17
+ const protobuf_1 = require("@bufbuild/protobuf");
18
+ const handle_pb_js_1 = require("./handle_pb.js");
19
+ /**
20
+ * @generated from enum livekit.proto.VideoCodec
21
+ */
22
+ var VideoCodec;
23
+ (function (VideoCodec) {
24
+ /**
25
+ * @generated from enum value: VP8 = 0;
26
+ */
27
+ VideoCodec[VideoCodec["VP8"] = 0] = "VP8";
28
+ /**
29
+ * @generated from enum value: H264 = 1;
30
+ */
31
+ VideoCodec[VideoCodec["H264"] = 1] = "H264";
32
+ /**
33
+ * @generated from enum value: AV1 = 2;
34
+ */
35
+ VideoCodec[VideoCodec["AV1"] = 2] = "AV1";
36
+ })(VideoCodec || (exports.VideoCodec = VideoCodec = {}));
37
+ // Retrieve enum metadata with: proto3.getEnumType(VideoCodec)
38
+ protobuf_1.proto3.util.setEnumType(VideoCodec, "livekit.proto.VideoCodec", [
39
+ { no: 0, name: "VP8" },
40
+ { no: 1, name: "H264" },
41
+ { no: 2, name: "AV1" },
42
+ ]);
43
+ /**
44
+ * @generated from enum livekit.proto.VideoRotation
45
+ */
46
+ var VideoRotation;
47
+ (function (VideoRotation) {
48
+ /**
49
+ * @generated from enum value: VIDEO_ROTATION_0 = 0;
50
+ */
51
+ VideoRotation[VideoRotation["VIDEO_ROTATION_0"] = 0] = "VIDEO_ROTATION_0";
52
+ /**
53
+ * @generated from enum value: VIDEO_ROTATION_90 = 1;
54
+ */
55
+ VideoRotation[VideoRotation["VIDEO_ROTATION_90"] = 1] = "VIDEO_ROTATION_90";
56
+ /**
57
+ * @generated from enum value: VIDEO_ROTATION_180 = 2;
58
+ */
59
+ VideoRotation[VideoRotation["VIDEO_ROTATION_180"] = 2] = "VIDEO_ROTATION_180";
60
+ /**
61
+ * @generated from enum value: VIDEO_ROTATION_270 = 3;
62
+ */
63
+ VideoRotation[VideoRotation["VIDEO_ROTATION_270"] = 3] = "VIDEO_ROTATION_270";
64
+ })(VideoRotation || (exports.VideoRotation = VideoRotation = {}));
65
+ // Retrieve enum metadata with: proto3.getEnumType(VideoRotation)
66
+ protobuf_1.proto3.util.setEnumType(VideoRotation, "livekit.proto.VideoRotation", [
67
+ { no: 0, name: "VIDEO_ROTATION_0" },
68
+ { no: 1, name: "VIDEO_ROTATION_90" },
69
+ { no: 2, name: "VIDEO_ROTATION_180" },
70
+ { no: 3, name: "VIDEO_ROTATION_270" },
71
+ ]);
72
+ /**
73
+ * @generated from enum livekit.proto.VideoFormatType
74
+ */
75
+ var VideoFormatType;
76
+ (function (VideoFormatType) {
77
+ /**
78
+ * @generated from enum value: FORMAT_ARGB = 0;
79
+ */
80
+ VideoFormatType[VideoFormatType["FORMAT_ARGB"] = 0] = "FORMAT_ARGB";
81
+ /**
82
+ * @generated from enum value: FORMAT_BGRA = 1;
83
+ */
84
+ VideoFormatType[VideoFormatType["FORMAT_BGRA"] = 1] = "FORMAT_BGRA";
85
+ /**
86
+ * @generated from enum value: FORMAT_ABGR = 2;
87
+ */
88
+ VideoFormatType[VideoFormatType["FORMAT_ABGR"] = 2] = "FORMAT_ABGR";
89
+ /**
90
+ * @generated from enum value: FORMAT_RGBA = 3;
91
+ */
92
+ VideoFormatType[VideoFormatType["FORMAT_RGBA"] = 3] = "FORMAT_RGBA";
93
+ })(VideoFormatType || (exports.VideoFormatType = VideoFormatType = {}));
94
+ // Retrieve enum metadata with: proto3.getEnumType(VideoFormatType)
95
+ protobuf_1.proto3.util.setEnumType(VideoFormatType, "livekit.proto.VideoFormatType", [
96
+ { no: 0, name: "FORMAT_ARGB" },
97
+ { no: 1, name: "FORMAT_BGRA" },
98
+ { no: 2, name: "FORMAT_ABGR" },
99
+ { no: 3, name: "FORMAT_RGBA" },
100
+ ]);
101
+ /**
102
+ * @generated from enum livekit.proto.VideoFrameBufferType
103
+ */
104
+ var VideoFrameBufferType;
105
+ (function (VideoFrameBufferType) {
106
+ /**
107
+ * @generated from enum value: NATIVE = 0;
108
+ */
109
+ VideoFrameBufferType[VideoFrameBufferType["NATIVE"] = 0] = "NATIVE";
110
+ /**
111
+ * @generated from enum value: I420 = 1;
112
+ */
113
+ VideoFrameBufferType[VideoFrameBufferType["I420"] = 1] = "I420";
114
+ /**
115
+ * @generated from enum value: I420A = 2;
116
+ */
117
+ VideoFrameBufferType[VideoFrameBufferType["I420A"] = 2] = "I420A";
118
+ /**
119
+ * @generated from enum value: I422 = 3;
120
+ */
121
+ VideoFrameBufferType[VideoFrameBufferType["I422"] = 3] = "I422";
122
+ /**
123
+ * @generated from enum value: I444 = 4;
124
+ */
125
+ VideoFrameBufferType[VideoFrameBufferType["I444"] = 4] = "I444";
126
+ /**
127
+ * @generated from enum value: I010 = 5;
128
+ */
129
+ VideoFrameBufferType[VideoFrameBufferType["I010"] = 5] = "I010";
130
+ /**
131
+ * @generated from enum value: NV12 = 6;
132
+ */
133
+ VideoFrameBufferType[VideoFrameBufferType["NV12"] = 6] = "NV12";
134
+ })(VideoFrameBufferType || (exports.VideoFrameBufferType = VideoFrameBufferType = {}));
135
+ // Retrieve enum metadata with: proto3.getEnumType(VideoFrameBufferType)
136
+ protobuf_1.proto3.util.setEnumType(VideoFrameBufferType, "livekit.proto.VideoFrameBufferType", [
137
+ { no: 0, name: "NATIVE" },
138
+ { no: 1, name: "I420" },
139
+ { no: 2, name: "I420A" },
140
+ { no: 3, name: "I422" },
141
+ { no: 4, name: "I444" },
142
+ { no: 5, name: "I010" },
143
+ { no: 6, name: "NV12" },
144
+ ]);
145
+ /**
146
+ * @generated from enum livekit.proto.VideoStreamType
147
+ */
148
+ var VideoStreamType;
149
+ (function (VideoStreamType) {
150
+ /**
151
+ * @generated from enum value: VIDEO_STREAM_NATIVE = 0;
152
+ */
153
+ VideoStreamType[VideoStreamType["VIDEO_STREAM_NATIVE"] = 0] = "VIDEO_STREAM_NATIVE";
154
+ /**
155
+ * @generated from enum value: VIDEO_STREAM_WEBGL = 1;
156
+ */
157
+ VideoStreamType[VideoStreamType["VIDEO_STREAM_WEBGL"] = 1] = "VIDEO_STREAM_WEBGL";
158
+ /**
159
+ * @generated from enum value: VIDEO_STREAM_HTML = 2;
160
+ */
161
+ VideoStreamType[VideoStreamType["VIDEO_STREAM_HTML"] = 2] = "VIDEO_STREAM_HTML";
162
+ })(VideoStreamType || (exports.VideoStreamType = VideoStreamType = {}));
163
+ // Retrieve enum metadata with: proto3.getEnumType(VideoStreamType)
164
+ protobuf_1.proto3.util.setEnumType(VideoStreamType, "livekit.proto.VideoStreamType", [
165
+ { no: 0, name: "VIDEO_STREAM_NATIVE" },
166
+ { no: 1, name: "VIDEO_STREAM_WEBGL" },
167
+ { no: 2, name: "VIDEO_STREAM_HTML" },
168
+ ]);
169
+ /**
170
+ * @generated from enum livekit.proto.VideoSourceType
171
+ */
172
+ var VideoSourceType;
173
+ (function (VideoSourceType) {
174
+ /**
175
+ * @generated from enum value: VIDEO_SOURCE_NATIVE = 0;
176
+ */
177
+ VideoSourceType[VideoSourceType["VIDEO_SOURCE_NATIVE"] = 0] = "VIDEO_SOURCE_NATIVE";
178
+ })(VideoSourceType || (exports.VideoSourceType = VideoSourceType = {}));
179
+ // Retrieve enum metadata with: proto3.getEnumType(VideoSourceType)
180
+ protobuf_1.proto3.util.setEnumType(VideoSourceType, "livekit.proto.VideoSourceType", [
181
+ { no: 0, name: "VIDEO_SOURCE_NATIVE" },
182
+ ]);
183
+ /**
184
+ * Allocate a new VideoFrameBuffer
185
+ *
186
+ * @generated from message livekit.proto.AllocVideoBufferRequest
187
+ */
188
+ class AllocVideoBufferRequest extends protobuf_1.Message {
189
+ constructor(data) {
190
+ super();
191
+ /**
192
+ * Only I420 is supported atm
193
+ *
194
+ * @generated from field: livekit.proto.VideoFrameBufferType type = 1;
195
+ */
196
+ this.type = VideoFrameBufferType.NATIVE;
197
+ /**
198
+ * @generated from field: uint32 width = 2;
199
+ */
200
+ this.width = 0;
201
+ /**
202
+ * @generated from field: uint32 height = 3;
203
+ */
204
+ this.height = 0;
205
+ protobuf_1.proto3.util.initPartial(data, this);
206
+ }
207
+ static fromBinary(bytes, options) {
208
+ return new AllocVideoBufferRequest().fromBinary(bytes, options);
209
+ }
210
+ static fromJson(jsonValue, options) {
211
+ return new AllocVideoBufferRequest().fromJson(jsonValue, options);
212
+ }
213
+ static fromJsonString(jsonString, options) {
214
+ return new AllocVideoBufferRequest().fromJsonString(jsonString, options);
215
+ }
216
+ static equals(a, b) {
217
+ return protobuf_1.proto3.util.equals(AllocVideoBufferRequest, a, b);
218
+ }
219
+ }
220
+ exports.AllocVideoBufferRequest = AllocVideoBufferRequest;
221
+ AllocVideoBufferRequest.runtime = protobuf_1.proto3;
222
+ AllocVideoBufferRequest.typeName = "livekit.proto.AllocVideoBufferRequest";
223
+ AllocVideoBufferRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
224
+ { no: 1, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoFrameBufferType) },
225
+ { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
226
+ { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
227
+ ]);
228
+ /**
229
+ * @generated from message livekit.proto.AllocVideoBufferResponse
230
+ */
231
+ class AllocVideoBufferResponse extends protobuf_1.Message {
232
+ constructor(data) {
233
+ super();
234
+ protobuf_1.proto3.util.initPartial(data, this);
235
+ }
236
+ static fromBinary(bytes, options) {
237
+ return new AllocVideoBufferResponse().fromBinary(bytes, options);
238
+ }
239
+ static fromJson(jsonValue, options) {
240
+ return new AllocVideoBufferResponse().fromJson(jsonValue, options);
241
+ }
242
+ static fromJsonString(jsonString, options) {
243
+ return new AllocVideoBufferResponse().fromJsonString(jsonString, options);
244
+ }
245
+ static equals(a, b) {
246
+ return protobuf_1.proto3.util.equals(AllocVideoBufferResponse, a, b);
247
+ }
248
+ }
249
+ exports.AllocVideoBufferResponse = AllocVideoBufferResponse;
250
+ AllocVideoBufferResponse.runtime = protobuf_1.proto3;
251
+ AllocVideoBufferResponse.typeName = "livekit.proto.AllocVideoBufferResponse";
252
+ AllocVideoBufferResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
253
+ { no: 1, name: "buffer", kind: "message", T: OwnedVideoFrameBuffer },
254
+ ]);
255
+ /**
256
+ * Create a new VideoStream
257
+ * VideoStream is used to receive video frames from a track
258
+ *
259
+ * @generated from message livekit.proto.NewVideoStreamRequest
260
+ */
261
+ class NewVideoStreamRequest extends protobuf_1.Message {
262
+ constructor(data) {
263
+ super();
264
+ /**
265
+ * @generated from field: uint64 track_handle = 1;
266
+ */
267
+ this.trackHandle = protobuf_1.protoInt64.zero;
268
+ /**
269
+ * @generated from field: livekit.proto.VideoStreamType type = 2;
270
+ */
271
+ this.type = VideoStreamType.VIDEO_STREAM_NATIVE;
272
+ protobuf_1.proto3.util.initPartial(data, this);
273
+ }
274
+ static fromBinary(bytes, options) {
275
+ return new NewVideoStreamRequest().fromBinary(bytes, options);
276
+ }
277
+ static fromJson(jsonValue, options) {
278
+ return new NewVideoStreamRequest().fromJson(jsonValue, options);
279
+ }
280
+ static fromJsonString(jsonString, options) {
281
+ return new NewVideoStreamRequest().fromJsonString(jsonString, options);
282
+ }
283
+ static equals(a, b) {
284
+ return protobuf_1.proto3.util.equals(NewVideoStreamRequest, a, b);
285
+ }
286
+ }
287
+ exports.NewVideoStreamRequest = NewVideoStreamRequest;
288
+ NewVideoStreamRequest.runtime = protobuf_1.proto3;
289
+ NewVideoStreamRequest.typeName = "livekit.proto.NewVideoStreamRequest";
290
+ NewVideoStreamRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
291
+ { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
292
+ { no: 2, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoStreamType) },
293
+ ]);
294
+ /**
295
+ * @generated from message livekit.proto.NewVideoStreamResponse
296
+ */
297
+ class NewVideoStreamResponse extends protobuf_1.Message {
298
+ constructor(data) {
299
+ super();
300
+ protobuf_1.proto3.util.initPartial(data, this);
301
+ }
302
+ static fromBinary(bytes, options) {
303
+ return new NewVideoStreamResponse().fromBinary(bytes, options);
304
+ }
305
+ static fromJson(jsonValue, options) {
306
+ return new NewVideoStreamResponse().fromJson(jsonValue, options);
307
+ }
308
+ static fromJsonString(jsonString, options) {
309
+ return new NewVideoStreamResponse().fromJsonString(jsonString, options);
310
+ }
311
+ static equals(a, b) {
312
+ return protobuf_1.proto3.util.equals(NewVideoStreamResponse, a, b);
313
+ }
314
+ }
315
+ exports.NewVideoStreamResponse = NewVideoStreamResponse;
316
+ NewVideoStreamResponse.runtime = protobuf_1.proto3;
317
+ NewVideoStreamResponse.typeName = "livekit.proto.NewVideoStreamResponse";
318
+ NewVideoStreamResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
319
+ { no: 1, name: "stream", kind: "message", T: OwnedVideoStream },
320
+ ]);
321
+ /**
322
+ * Create a new VideoSource
323
+ * VideoSource is used to send video frame to a track
324
+ *
325
+ * @generated from message livekit.proto.NewVideoSourceRequest
326
+ */
327
+ class NewVideoSourceRequest extends protobuf_1.Message {
328
+ constructor(data) {
329
+ super();
330
+ /**
331
+ * @generated from field: livekit.proto.VideoSourceType type = 1;
332
+ */
333
+ this.type = VideoSourceType.VIDEO_SOURCE_NATIVE;
334
+ protobuf_1.proto3.util.initPartial(data, this);
335
+ }
336
+ static fromBinary(bytes, options) {
337
+ return new NewVideoSourceRequest().fromBinary(bytes, options);
338
+ }
339
+ static fromJson(jsonValue, options) {
340
+ return new NewVideoSourceRequest().fromJson(jsonValue, options);
341
+ }
342
+ static fromJsonString(jsonString, options) {
343
+ return new NewVideoSourceRequest().fromJsonString(jsonString, options);
344
+ }
345
+ static equals(a, b) {
346
+ return protobuf_1.proto3.util.equals(NewVideoSourceRequest, a, b);
347
+ }
348
+ }
349
+ exports.NewVideoSourceRequest = NewVideoSourceRequest;
350
+ NewVideoSourceRequest.runtime = protobuf_1.proto3;
351
+ NewVideoSourceRequest.typeName = "livekit.proto.NewVideoSourceRequest";
352
+ NewVideoSourceRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
353
+ { no: 1, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoSourceType) },
354
+ { no: 2, name: "resolution", kind: "message", T: VideoSourceResolution },
355
+ ]);
356
+ /**
357
+ * @generated from message livekit.proto.NewVideoSourceResponse
358
+ */
359
+ class NewVideoSourceResponse extends protobuf_1.Message {
360
+ constructor(data) {
361
+ super();
362
+ protobuf_1.proto3.util.initPartial(data, this);
363
+ }
364
+ static fromBinary(bytes, options) {
365
+ return new NewVideoSourceResponse().fromBinary(bytes, options);
366
+ }
367
+ static fromJson(jsonValue, options) {
368
+ return new NewVideoSourceResponse().fromJson(jsonValue, options);
369
+ }
370
+ static fromJsonString(jsonString, options) {
371
+ return new NewVideoSourceResponse().fromJsonString(jsonString, options);
372
+ }
373
+ static equals(a, b) {
374
+ return protobuf_1.proto3.util.equals(NewVideoSourceResponse, a, b);
375
+ }
376
+ }
377
+ exports.NewVideoSourceResponse = NewVideoSourceResponse;
378
+ NewVideoSourceResponse.runtime = protobuf_1.proto3;
379
+ NewVideoSourceResponse.typeName = "livekit.proto.NewVideoSourceResponse";
380
+ NewVideoSourceResponse.fields = protobuf_1.proto3.util.newFieldList(() => [
381
+ { no: 1, name: "source", kind: "message", T: OwnedVideoSource },
382
+ ]);
383
+ /**
384
+ * Push a frame to a VideoSource
385
+ *
386
+ * @generated from message livekit.proto.CaptureVideoFrameRequest
387
+ */
388
+ class CaptureVideoFrameRequest extends protobuf_1.Message {
389
+ constructor(data) {
390
+ super();
391
+ /**
392
+ * @generated from field: uint64 source_handle = 1;
393
+ */
394
+ this.sourceHandle = protobuf_1.protoInt64.zero;
395
+ /**
396
+ * @generated from oneof livekit.proto.CaptureVideoFrameRequest.from
397
+ */
398
+ this.from = { case: undefined };
399
+ protobuf_1.proto3.util.initPartial(data, this);
400
+ }
401
+ static fromBinary(bytes, options) {
402
+ return new CaptureVideoFrameRequest().fromBinary(bytes, options);
403
+ }
404
+ static fromJson(jsonValue, options) {
405
+ return new CaptureVideoFrameRequest().fromJson(jsonValue, options);
406
+ }
407
+ static fromJsonString(jsonString, options) {
408
+ return new CaptureVideoFrameRequest().fromJsonString(jsonString, options);
409
+ }
410
+ static equals(a, b) {
411
+ return protobuf_1.proto3.util.equals(CaptureVideoFrameRequest, a, b);
412
+ }
413
+ }
414
+ exports.CaptureVideoFrameRequest = CaptureVideoFrameRequest;
415
+ CaptureVideoFrameRequest.runtime = protobuf_1.proto3;
416
+ CaptureVideoFrameRequest.typeName = "livekit.proto.CaptureVideoFrameRequest";
417
+ CaptureVideoFrameRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
418
+ { no: 1, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
419
+ { no: 2, name: "frame", kind: "message", T: VideoFrameInfo },
420
+ { no: 3, name: "info", kind: "message", T: VideoFrameBufferInfo, oneof: "from" },
421
+ { no: 4, name: "handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "from" },
422
+ ]);
423
+ /**
424
+ * @generated from message livekit.proto.CaptureVideoFrameResponse
425
+ */
426
+ class CaptureVideoFrameResponse extends protobuf_1.Message {
427
+ constructor(data) {
428
+ super();
429
+ protobuf_1.proto3.util.initPartial(data, this);
430
+ }
431
+ static fromBinary(bytes, options) {
432
+ return new CaptureVideoFrameResponse().fromBinary(bytes, options);
433
+ }
434
+ static fromJson(jsonValue, options) {
435
+ return new CaptureVideoFrameResponse().fromJson(jsonValue, options);
436
+ }
437
+ static fromJsonString(jsonString, options) {
438
+ return new CaptureVideoFrameResponse().fromJsonString(jsonString, options);
439
+ }
440
+ static equals(a, b) {
441
+ return protobuf_1.proto3.util.equals(CaptureVideoFrameResponse, a, b);
442
+ }
443
+ }
444
+ exports.CaptureVideoFrameResponse = CaptureVideoFrameResponse;
445
+ CaptureVideoFrameResponse.runtime = protobuf_1.proto3;
446
+ CaptureVideoFrameResponse.typeName = "livekit.proto.CaptureVideoFrameResponse";
447
+ CaptureVideoFrameResponse.fields = protobuf_1.proto3.util.newFieldList(() => []);
448
+ /**
449
+ * Convert a RGBA frame to a I420 YUV frame
450
+ * Or convert another YUV frame format to I420
451
+ *
452
+ * @generated from message livekit.proto.ToI420Request
453
+ */
454
+ class ToI420Request extends protobuf_1.Message {
455
+ constructor(data) {
456
+ super();
457
+ /**
458
+ * @generated from field: bool flip_y = 1;
459
+ */
460
+ this.flipY = false;
461
+ /**
462
+ * @generated from oneof livekit.proto.ToI420Request.from
463
+ */
464
+ this.from = { case: undefined };
465
+ protobuf_1.proto3.util.initPartial(data, this);
466
+ }
467
+ static fromBinary(bytes, options) {
468
+ return new ToI420Request().fromBinary(bytes, options);
469
+ }
470
+ static fromJson(jsonValue, options) {
471
+ return new ToI420Request().fromJson(jsonValue, options);
472
+ }
473
+ static fromJsonString(jsonString, options) {
474
+ return new ToI420Request().fromJsonString(jsonString, options);
475
+ }
476
+ static equals(a, b) {
477
+ return protobuf_1.proto3.util.equals(ToI420Request, a, b);
478
+ }
479
+ }
480
+ exports.ToI420Request = ToI420Request;
481
+ ToI420Request.runtime = protobuf_1.proto3;
482
+ ToI420Request.typeName = "livekit.proto.ToI420Request";
483
+ ToI420Request.fields = protobuf_1.proto3.util.newFieldList(() => [
484
+ { no: 1, name: "flip_y", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
485
+ { no: 2, name: "argb", kind: "message", T: ArgbBufferInfo, oneof: "from" },
486
+ { no: 3, name: "buffer", kind: "message", T: VideoFrameBufferInfo, oneof: "from" },
487
+ { no: 4, name: "handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "from" },
488
+ ]);
489
+ /**
490
+ * @generated from message livekit.proto.ToI420Response
491
+ */
492
+ class ToI420Response extends protobuf_1.Message {
493
+ constructor(data) {
494
+ super();
495
+ protobuf_1.proto3.util.initPartial(data, this);
496
+ }
497
+ static fromBinary(bytes, options) {
498
+ return new ToI420Response().fromBinary(bytes, options);
499
+ }
500
+ static fromJson(jsonValue, options) {
501
+ return new ToI420Response().fromJson(jsonValue, options);
502
+ }
503
+ static fromJsonString(jsonString, options) {
504
+ return new ToI420Response().fromJsonString(jsonString, options);
505
+ }
506
+ static equals(a, b) {
507
+ return protobuf_1.proto3.util.equals(ToI420Response, a, b);
508
+ }
509
+ }
510
+ exports.ToI420Response = ToI420Response;
511
+ ToI420Response.runtime = protobuf_1.proto3;
512
+ ToI420Response.typeName = "livekit.proto.ToI420Response";
513
+ ToI420Response.fields = protobuf_1.proto3.util.newFieldList(() => [
514
+ { no: 1, name: "buffer", kind: "message", T: OwnedVideoFrameBuffer },
515
+ ]);
516
+ /**
517
+ * Convert a YUV frame to a RGBA frame
518
+ * Only I420 is supported atm
519
+ *
520
+ * @generated from message livekit.proto.ToArgbRequest
521
+ */
522
+ class ToArgbRequest extends protobuf_1.Message {
523
+ constructor(data) {
524
+ super();
525
+ /**
526
+ * @generated from field: uint64 dst_ptr = 2;
527
+ */
528
+ this.dstPtr = protobuf_1.protoInt64.zero;
529
+ /**
530
+ * @generated from field: livekit.proto.VideoFormatType dst_format = 3;
531
+ */
532
+ this.dstFormat = VideoFormatType.FORMAT_ARGB;
533
+ /**
534
+ * @generated from field: uint32 dst_stride = 4;
535
+ */
536
+ this.dstStride = 0;
537
+ /**
538
+ * @generated from field: uint32 dst_width = 5;
539
+ */
540
+ this.dstWidth = 0;
541
+ /**
542
+ * @generated from field: uint32 dst_height = 6;
543
+ */
544
+ this.dstHeight = 0;
545
+ /**
546
+ * @generated from field: bool flip_y = 7;
547
+ */
548
+ this.flipY = false;
549
+ protobuf_1.proto3.util.initPartial(data, this);
550
+ }
551
+ static fromBinary(bytes, options) {
552
+ return new ToArgbRequest().fromBinary(bytes, options);
553
+ }
554
+ static fromJson(jsonValue, options) {
555
+ return new ToArgbRequest().fromJson(jsonValue, options);
556
+ }
557
+ static fromJsonString(jsonString, options) {
558
+ return new ToArgbRequest().fromJsonString(jsonString, options);
559
+ }
560
+ static equals(a, b) {
561
+ return protobuf_1.proto3.util.equals(ToArgbRequest, a, b);
562
+ }
563
+ }
564
+ exports.ToArgbRequest = ToArgbRequest;
565
+ ToArgbRequest.runtime = protobuf_1.proto3;
566
+ ToArgbRequest.typeName = "livekit.proto.ToArgbRequest";
567
+ ToArgbRequest.fields = protobuf_1.proto3.util.newFieldList(() => [
568
+ { no: 1, name: "buffer", kind: "message", T: VideoFrameBufferInfo },
569
+ { no: 2, name: "dst_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
570
+ { no: 3, name: "dst_format", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoFormatType) },
571
+ { no: 4, name: "dst_stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
572
+ { no: 5, name: "dst_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
573
+ { no: 6, name: "dst_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
574
+ { no: 7, name: "flip_y", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
575
+ ]);
576
+ /**
577
+ * @generated from message livekit.proto.ToArgbResponse
578
+ */
579
+ class ToArgbResponse extends protobuf_1.Message {
580
+ constructor(data) {
581
+ super();
582
+ protobuf_1.proto3.util.initPartial(data, this);
583
+ }
584
+ static fromBinary(bytes, options) {
585
+ return new ToArgbResponse().fromBinary(bytes, options);
586
+ }
587
+ static fromJson(jsonValue, options) {
588
+ return new ToArgbResponse().fromJson(jsonValue, options);
589
+ }
590
+ static fromJsonString(jsonString, options) {
591
+ return new ToArgbResponse().fromJsonString(jsonString, options);
592
+ }
593
+ static equals(a, b) {
594
+ return protobuf_1.proto3.util.equals(ToArgbResponse, a, b);
595
+ }
596
+ }
597
+ exports.ToArgbResponse = ToArgbResponse;
598
+ ToArgbResponse.runtime = protobuf_1.proto3;
599
+ ToArgbResponse.typeName = "livekit.proto.ToArgbResponse";
600
+ ToArgbResponse.fields = protobuf_1.proto3.util.newFieldList(() => []);
601
+ /**
602
+ * @generated from message livekit.proto.VideoResolution
603
+ */
604
+ class VideoResolution extends protobuf_1.Message {
605
+ constructor(data) {
606
+ super();
607
+ /**
608
+ * @generated from field: uint32 width = 1;
609
+ */
610
+ this.width = 0;
611
+ /**
612
+ * @generated from field: uint32 height = 2;
613
+ */
614
+ this.height = 0;
615
+ /**
616
+ * @generated from field: double frame_rate = 3;
617
+ */
618
+ this.frameRate = 0;
619
+ protobuf_1.proto3.util.initPartial(data, this);
620
+ }
621
+ static fromBinary(bytes, options) {
622
+ return new VideoResolution().fromBinary(bytes, options);
623
+ }
624
+ static fromJson(jsonValue, options) {
625
+ return new VideoResolution().fromJson(jsonValue, options);
626
+ }
627
+ static fromJsonString(jsonString, options) {
628
+ return new VideoResolution().fromJsonString(jsonString, options);
629
+ }
630
+ static equals(a, b) {
631
+ return protobuf_1.proto3.util.equals(VideoResolution, a, b);
632
+ }
633
+ }
634
+ exports.VideoResolution = VideoResolution;
635
+ VideoResolution.runtime = protobuf_1.proto3;
636
+ VideoResolution.typeName = "livekit.proto.VideoResolution";
637
+ VideoResolution.fields = protobuf_1.proto3.util.newFieldList(() => [
638
+ { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
639
+ { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
640
+ { no: 3, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
641
+ ]);
642
+ /**
643
+ * @generated from message livekit.proto.ArgbBufferInfo
644
+ */
645
+ class ArgbBufferInfo extends protobuf_1.Message {
646
+ constructor(data) {
647
+ super();
648
+ /**
649
+ * @generated from field: uint64 ptr = 1;
650
+ */
651
+ this.ptr = protobuf_1.protoInt64.zero;
652
+ /**
653
+ * @generated from field: livekit.proto.VideoFormatType format = 2;
654
+ */
655
+ this.format = VideoFormatType.FORMAT_ARGB;
656
+ /**
657
+ * @generated from field: uint32 stride = 3;
658
+ */
659
+ this.stride = 0;
660
+ /**
661
+ * @generated from field: uint32 width = 4;
662
+ */
663
+ this.width = 0;
664
+ /**
665
+ * @generated from field: uint32 height = 5;
666
+ */
667
+ this.height = 0;
668
+ protobuf_1.proto3.util.initPartial(data, this);
669
+ }
670
+ static fromBinary(bytes, options) {
671
+ return new ArgbBufferInfo().fromBinary(bytes, options);
672
+ }
673
+ static fromJson(jsonValue, options) {
674
+ return new ArgbBufferInfo().fromJson(jsonValue, options);
675
+ }
676
+ static fromJsonString(jsonString, options) {
677
+ return new ArgbBufferInfo().fromJsonString(jsonString, options);
678
+ }
679
+ static equals(a, b) {
680
+ return protobuf_1.proto3.util.equals(ArgbBufferInfo, a, b);
681
+ }
682
+ }
683
+ exports.ArgbBufferInfo = ArgbBufferInfo;
684
+ ArgbBufferInfo.runtime = protobuf_1.proto3;
685
+ ArgbBufferInfo.typeName = "livekit.proto.ArgbBufferInfo";
686
+ ArgbBufferInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
687
+ { no: 1, name: "ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
688
+ { no: 2, name: "format", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoFormatType) },
689
+ { no: 3, name: "stride", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
690
+ { no: 4, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
691
+ { no: 5, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
692
+ ]);
693
+ /**
694
+ * @generated from message livekit.proto.VideoFrameInfo
695
+ */
696
+ class VideoFrameInfo extends protobuf_1.Message {
697
+ constructor(data) {
698
+ super();
699
+ /**
700
+ * In microseconds
701
+ *
702
+ * @generated from field: int64 timestamp_us = 1;
703
+ */
704
+ this.timestampUs = protobuf_1.protoInt64.zero;
705
+ /**
706
+ * @generated from field: livekit.proto.VideoRotation rotation = 2;
707
+ */
708
+ this.rotation = VideoRotation.VIDEO_ROTATION_0;
709
+ protobuf_1.proto3.util.initPartial(data, this);
710
+ }
711
+ static fromBinary(bytes, options) {
712
+ return new VideoFrameInfo().fromBinary(bytes, options);
713
+ }
714
+ static fromJson(jsonValue, options) {
715
+ return new VideoFrameInfo().fromJson(jsonValue, options);
716
+ }
717
+ static fromJsonString(jsonString, options) {
718
+ return new VideoFrameInfo().fromJsonString(jsonString, options);
719
+ }
720
+ static equals(a, b) {
721
+ return protobuf_1.proto3.util.equals(VideoFrameInfo, a, b);
722
+ }
723
+ }
724
+ exports.VideoFrameInfo = VideoFrameInfo;
725
+ VideoFrameInfo.runtime = protobuf_1.proto3;
726
+ VideoFrameInfo.typeName = "livekit.proto.VideoFrameInfo";
727
+ VideoFrameInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
728
+ { no: 1, name: "timestamp_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
729
+ { no: 2, name: "rotation", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoRotation) },
730
+ ]);
731
+ /**
732
+ * @generated from message livekit.proto.VideoFrameBufferInfo
733
+ */
734
+ class VideoFrameBufferInfo extends protobuf_1.Message {
735
+ constructor(data) {
736
+ super();
737
+ /**
738
+ * @generated from field: livekit.proto.VideoFrameBufferType buffer_type = 1;
739
+ */
740
+ this.bufferType = VideoFrameBufferType.NATIVE;
741
+ /**
742
+ * @generated from field: uint32 width = 2;
743
+ */
744
+ this.width = 0;
745
+ /**
746
+ * @generated from field: uint32 height = 3;
747
+ */
748
+ this.height = 0;
749
+ /**
750
+ * @generated from oneof livekit.proto.VideoFrameBufferInfo.buffer
751
+ */
752
+ this.buffer = { case: undefined };
753
+ protobuf_1.proto3.util.initPartial(data, this);
754
+ }
755
+ static fromBinary(bytes, options) {
756
+ return new VideoFrameBufferInfo().fromBinary(bytes, options);
757
+ }
758
+ static fromJson(jsonValue, options) {
759
+ return new VideoFrameBufferInfo().fromJson(jsonValue, options);
760
+ }
761
+ static fromJsonString(jsonString, options) {
762
+ return new VideoFrameBufferInfo().fromJsonString(jsonString, options);
763
+ }
764
+ static equals(a, b) {
765
+ return protobuf_1.proto3.util.equals(VideoFrameBufferInfo, a, b);
766
+ }
767
+ }
768
+ exports.VideoFrameBufferInfo = VideoFrameBufferInfo;
769
+ VideoFrameBufferInfo.runtime = protobuf_1.proto3;
770
+ VideoFrameBufferInfo.typeName = "livekit.proto.VideoFrameBufferInfo";
771
+ VideoFrameBufferInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
772
+ { no: 1, name: "buffer_type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoFrameBufferType) },
773
+ { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
774
+ { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
775
+ { no: 4, name: "yuv", kind: "message", T: PlanarYuvBufferInfo, oneof: "buffer" },
776
+ { no: 5, name: "bi_yuv", kind: "message", T: BiplanarYuvBufferInfo, oneof: "buffer" },
777
+ { no: 6, name: "native", kind: "message", T: NativeBufferInfo, oneof: "buffer" },
778
+ ]);
779
+ /**
780
+ * @generated from message livekit.proto.OwnedVideoFrameBuffer
781
+ */
782
+ class OwnedVideoFrameBuffer extends protobuf_1.Message {
783
+ constructor(data) {
784
+ super();
785
+ protobuf_1.proto3.util.initPartial(data, this);
786
+ }
787
+ static fromBinary(bytes, options) {
788
+ return new OwnedVideoFrameBuffer().fromBinary(bytes, options);
789
+ }
790
+ static fromJson(jsonValue, options) {
791
+ return new OwnedVideoFrameBuffer().fromJson(jsonValue, options);
792
+ }
793
+ static fromJsonString(jsonString, options) {
794
+ return new OwnedVideoFrameBuffer().fromJsonString(jsonString, options);
795
+ }
796
+ static equals(a, b) {
797
+ return protobuf_1.proto3.util.equals(OwnedVideoFrameBuffer, a, b);
798
+ }
799
+ }
800
+ exports.OwnedVideoFrameBuffer = OwnedVideoFrameBuffer;
801
+ OwnedVideoFrameBuffer.runtime = protobuf_1.proto3;
802
+ OwnedVideoFrameBuffer.typeName = "livekit.proto.OwnedVideoFrameBuffer";
803
+ OwnedVideoFrameBuffer.fields = protobuf_1.proto3.util.newFieldList(() => [
804
+ { no: 1, name: "handle", kind: "message", T: handle_pb_js_1.FfiOwnedHandle },
805
+ { no: 2, name: "info", kind: "message", T: VideoFrameBufferInfo },
806
+ ]);
807
+ /**
808
+ * @generated from message livekit.proto.PlanarYuvBufferInfo
809
+ */
810
+ class PlanarYuvBufferInfo extends protobuf_1.Message {
811
+ constructor(data) {
812
+ super();
813
+ /**
814
+ * @generated from field: uint32 chroma_width = 1;
815
+ */
816
+ this.chromaWidth = 0;
817
+ /**
818
+ * @generated from field: uint32 chroma_height = 2;
819
+ */
820
+ this.chromaHeight = 0;
821
+ /**
822
+ * @generated from field: uint32 stride_y = 3;
823
+ */
824
+ this.strideY = 0;
825
+ /**
826
+ * @generated from field: uint32 stride_u = 4;
827
+ */
828
+ this.strideU = 0;
829
+ /**
830
+ * @generated from field: uint32 stride_v = 5;
831
+ */
832
+ this.strideV = 0;
833
+ /**
834
+ * @generated from field: uint32 stride_a = 6;
835
+ */
836
+ this.strideA = 0;
837
+ /**
838
+ * *const u8 or *const u16
839
+ *
840
+ * @generated from field: uint64 data_y_ptr = 7;
841
+ */
842
+ this.dataYPtr = protobuf_1.protoInt64.zero;
843
+ /**
844
+ * @generated from field: uint64 data_u_ptr = 8;
845
+ */
846
+ this.dataUPtr = protobuf_1.protoInt64.zero;
847
+ /**
848
+ * @generated from field: uint64 data_v_ptr = 9;
849
+ */
850
+ this.dataVPtr = protobuf_1.protoInt64.zero;
851
+ /**
852
+ * nullptr = no alpha
853
+ *
854
+ * @generated from field: uint64 data_a_ptr = 10;
855
+ */
856
+ this.dataAPtr = protobuf_1.protoInt64.zero;
857
+ protobuf_1.proto3.util.initPartial(data, this);
858
+ }
859
+ static fromBinary(bytes, options) {
860
+ return new PlanarYuvBufferInfo().fromBinary(bytes, options);
861
+ }
862
+ static fromJson(jsonValue, options) {
863
+ return new PlanarYuvBufferInfo().fromJson(jsonValue, options);
864
+ }
865
+ static fromJsonString(jsonString, options) {
866
+ return new PlanarYuvBufferInfo().fromJsonString(jsonString, options);
867
+ }
868
+ static equals(a, b) {
869
+ return protobuf_1.proto3.util.equals(PlanarYuvBufferInfo, a, b);
870
+ }
871
+ }
872
+ exports.PlanarYuvBufferInfo = PlanarYuvBufferInfo;
873
+ PlanarYuvBufferInfo.runtime = protobuf_1.proto3;
874
+ PlanarYuvBufferInfo.typeName = "livekit.proto.PlanarYuvBufferInfo";
875
+ PlanarYuvBufferInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
876
+ { no: 1, name: "chroma_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
877
+ { no: 2, name: "chroma_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
878
+ { no: 3, name: "stride_y", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
879
+ { no: 4, name: "stride_u", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
880
+ { no: 5, name: "stride_v", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
881
+ { no: 6, name: "stride_a", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
882
+ { no: 7, name: "data_y_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
883
+ { no: 8, name: "data_u_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
884
+ { no: 9, name: "data_v_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
885
+ { no: 10, name: "data_a_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
886
+ ]);
887
+ /**
888
+ * @generated from message livekit.proto.BiplanarYuvBufferInfo
889
+ */
890
+ class BiplanarYuvBufferInfo extends protobuf_1.Message {
891
+ constructor(data) {
892
+ super();
893
+ /**
894
+ * @generated from field: uint32 chroma_width = 1;
895
+ */
896
+ this.chromaWidth = 0;
897
+ /**
898
+ * @generated from field: uint32 chroma_height = 2;
899
+ */
900
+ this.chromaHeight = 0;
901
+ /**
902
+ * @generated from field: uint32 stride_y = 3;
903
+ */
904
+ this.strideY = 0;
905
+ /**
906
+ * @generated from field: uint32 stride_uv = 4;
907
+ */
908
+ this.strideUv = 0;
909
+ /**
910
+ * @generated from field: uint64 data_y_ptr = 5;
911
+ */
912
+ this.dataYPtr = protobuf_1.protoInt64.zero;
913
+ /**
914
+ * @generated from field: uint64 data_uv_ptr = 6;
915
+ */
916
+ this.dataUvPtr = protobuf_1.protoInt64.zero;
917
+ protobuf_1.proto3.util.initPartial(data, this);
918
+ }
919
+ static fromBinary(bytes, options) {
920
+ return new BiplanarYuvBufferInfo().fromBinary(bytes, options);
921
+ }
922
+ static fromJson(jsonValue, options) {
923
+ return new BiplanarYuvBufferInfo().fromJson(jsonValue, options);
924
+ }
925
+ static fromJsonString(jsonString, options) {
926
+ return new BiplanarYuvBufferInfo().fromJsonString(jsonString, options);
927
+ }
928
+ static equals(a, b) {
929
+ return protobuf_1.proto3.util.equals(BiplanarYuvBufferInfo, a, b);
930
+ }
931
+ }
932
+ exports.BiplanarYuvBufferInfo = BiplanarYuvBufferInfo;
933
+ BiplanarYuvBufferInfo.runtime = protobuf_1.proto3;
934
+ BiplanarYuvBufferInfo.typeName = "livekit.proto.BiplanarYuvBufferInfo";
935
+ BiplanarYuvBufferInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
936
+ { no: 1, name: "chroma_width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
937
+ { no: 2, name: "chroma_height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
938
+ { no: 3, name: "stride_y", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
939
+ { no: 4, name: "stride_uv", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
940
+ { no: 5, name: "data_y_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
941
+ { no: 6, name: "data_uv_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
942
+ ]);
943
+ /**
944
+ * TODO(theomonnom): Expose graphic context?
945
+ *
946
+ * @generated from message livekit.proto.NativeBufferInfo
947
+ */
948
+ class NativeBufferInfo extends protobuf_1.Message {
949
+ constructor(data) {
950
+ super();
951
+ protobuf_1.proto3.util.initPartial(data, this);
952
+ }
953
+ static fromBinary(bytes, options) {
954
+ return new NativeBufferInfo().fromBinary(bytes, options);
955
+ }
956
+ static fromJson(jsonValue, options) {
957
+ return new NativeBufferInfo().fromJson(jsonValue, options);
958
+ }
959
+ static fromJsonString(jsonString, options) {
960
+ return new NativeBufferInfo().fromJsonString(jsonString, options);
961
+ }
962
+ static equals(a, b) {
963
+ return protobuf_1.proto3.util.equals(NativeBufferInfo, a, b);
964
+ }
965
+ }
966
+ exports.NativeBufferInfo = NativeBufferInfo;
967
+ NativeBufferInfo.runtime = protobuf_1.proto3;
968
+ NativeBufferInfo.typeName = "livekit.proto.NativeBufferInfo";
969
+ NativeBufferInfo.fields = protobuf_1.proto3.util.newFieldList(() => []);
970
+ /**
971
+ * @generated from message livekit.proto.VideoStreamInfo
972
+ */
973
+ class VideoStreamInfo extends protobuf_1.Message {
974
+ constructor(data) {
975
+ super();
976
+ /**
977
+ * @generated from field: livekit.proto.VideoStreamType type = 1;
978
+ */
979
+ this.type = VideoStreamType.VIDEO_STREAM_NATIVE;
980
+ protobuf_1.proto3.util.initPartial(data, this);
981
+ }
982
+ static fromBinary(bytes, options) {
983
+ return new VideoStreamInfo().fromBinary(bytes, options);
984
+ }
985
+ static fromJson(jsonValue, options) {
986
+ return new VideoStreamInfo().fromJson(jsonValue, options);
987
+ }
988
+ static fromJsonString(jsonString, options) {
989
+ return new VideoStreamInfo().fromJsonString(jsonString, options);
990
+ }
991
+ static equals(a, b) {
992
+ return protobuf_1.proto3.util.equals(VideoStreamInfo, a, b);
993
+ }
994
+ }
995
+ exports.VideoStreamInfo = VideoStreamInfo;
996
+ VideoStreamInfo.runtime = protobuf_1.proto3;
997
+ VideoStreamInfo.typeName = "livekit.proto.VideoStreamInfo";
998
+ VideoStreamInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
999
+ { no: 1, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoStreamType) },
1000
+ ]);
1001
+ /**
1002
+ * @generated from message livekit.proto.OwnedVideoStream
1003
+ */
1004
+ class OwnedVideoStream extends protobuf_1.Message {
1005
+ constructor(data) {
1006
+ super();
1007
+ protobuf_1.proto3.util.initPartial(data, this);
1008
+ }
1009
+ static fromBinary(bytes, options) {
1010
+ return new OwnedVideoStream().fromBinary(bytes, options);
1011
+ }
1012
+ static fromJson(jsonValue, options) {
1013
+ return new OwnedVideoStream().fromJson(jsonValue, options);
1014
+ }
1015
+ static fromJsonString(jsonString, options) {
1016
+ return new OwnedVideoStream().fromJsonString(jsonString, options);
1017
+ }
1018
+ static equals(a, b) {
1019
+ return protobuf_1.proto3.util.equals(OwnedVideoStream, a, b);
1020
+ }
1021
+ }
1022
+ exports.OwnedVideoStream = OwnedVideoStream;
1023
+ OwnedVideoStream.runtime = protobuf_1.proto3;
1024
+ OwnedVideoStream.typeName = "livekit.proto.OwnedVideoStream";
1025
+ OwnedVideoStream.fields = protobuf_1.proto3.util.newFieldList(() => [
1026
+ { no: 1, name: "handle", kind: "message", T: handle_pb_js_1.FfiOwnedHandle },
1027
+ { no: 2, name: "info", kind: "message", T: VideoStreamInfo },
1028
+ ]);
1029
+ /**
1030
+ * @generated from message livekit.proto.VideoStreamEvent
1031
+ */
1032
+ class VideoStreamEvent extends protobuf_1.Message {
1033
+ constructor(data) {
1034
+ super();
1035
+ /**
1036
+ * @generated from field: uint64 stream_handle = 1;
1037
+ */
1038
+ this.streamHandle = protobuf_1.protoInt64.zero;
1039
+ /**
1040
+ * @generated from oneof livekit.proto.VideoStreamEvent.message
1041
+ */
1042
+ this.message = { case: undefined };
1043
+ protobuf_1.proto3.util.initPartial(data, this);
1044
+ }
1045
+ static fromBinary(bytes, options) {
1046
+ return new VideoStreamEvent().fromBinary(bytes, options);
1047
+ }
1048
+ static fromJson(jsonValue, options) {
1049
+ return new VideoStreamEvent().fromJson(jsonValue, options);
1050
+ }
1051
+ static fromJsonString(jsonString, options) {
1052
+ return new VideoStreamEvent().fromJsonString(jsonString, options);
1053
+ }
1054
+ static equals(a, b) {
1055
+ return protobuf_1.proto3.util.equals(VideoStreamEvent, a, b);
1056
+ }
1057
+ }
1058
+ exports.VideoStreamEvent = VideoStreamEvent;
1059
+ VideoStreamEvent.runtime = protobuf_1.proto3;
1060
+ VideoStreamEvent.typeName = "livekit.proto.VideoStreamEvent";
1061
+ VideoStreamEvent.fields = protobuf_1.proto3.util.newFieldList(() => [
1062
+ { no: 1, name: "stream_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
1063
+ { no: 2, name: "frame_received", kind: "message", T: VideoFrameReceived, oneof: "message" },
1064
+ { no: 3, name: "eos", kind: "message", T: VideoStreamEOS, oneof: "message" },
1065
+ ]);
1066
+ /**
1067
+ * @generated from message livekit.proto.VideoFrameReceived
1068
+ */
1069
+ class VideoFrameReceived extends protobuf_1.Message {
1070
+ constructor(data) {
1071
+ super();
1072
+ protobuf_1.proto3.util.initPartial(data, this);
1073
+ }
1074
+ static fromBinary(bytes, options) {
1075
+ return new VideoFrameReceived().fromBinary(bytes, options);
1076
+ }
1077
+ static fromJson(jsonValue, options) {
1078
+ return new VideoFrameReceived().fromJson(jsonValue, options);
1079
+ }
1080
+ static fromJsonString(jsonString, options) {
1081
+ return new VideoFrameReceived().fromJsonString(jsonString, options);
1082
+ }
1083
+ static equals(a, b) {
1084
+ return protobuf_1.proto3.util.equals(VideoFrameReceived, a, b);
1085
+ }
1086
+ }
1087
+ exports.VideoFrameReceived = VideoFrameReceived;
1088
+ VideoFrameReceived.runtime = protobuf_1.proto3;
1089
+ VideoFrameReceived.typeName = "livekit.proto.VideoFrameReceived";
1090
+ VideoFrameReceived.fields = protobuf_1.proto3.util.newFieldList(() => [
1091
+ { no: 1, name: "frame", kind: "message", T: VideoFrameInfo },
1092
+ { no: 2, name: "buffer", kind: "message", T: OwnedVideoFrameBuffer },
1093
+ ]);
1094
+ /**
1095
+ * @generated from message livekit.proto.VideoStreamEOS
1096
+ */
1097
+ class VideoStreamEOS extends protobuf_1.Message {
1098
+ constructor(data) {
1099
+ super();
1100
+ protobuf_1.proto3.util.initPartial(data, this);
1101
+ }
1102
+ static fromBinary(bytes, options) {
1103
+ return new VideoStreamEOS().fromBinary(bytes, options);
1104
+ }
1105
+ static fromJson(jsonValue, options) {
1106
+ return new VideoStreamEOS().fromJson(jsonValue, options);
1107
+ }
1108
+ static fromJsonString(jsonString, options) {
1109
+ return new VideoStreamEOS().fromJsonString(jsonString, options);
1110
+ }
1111
+ static equals(a, b) {
1112
+ return protobuf_1.proto3.util.equals(VideoStreamEOS, a, b);
1113
+ }
1114
+ }
1115
+ exports.VideoStreamEOS = VideoStreamEOS;
1116
+ VideoStreamEOS.runtime = protobuf_1.proto3;
1117
+ VideoStreamEOS.typeName = "livekit.proto.VideoStreamEOS";
1118
+ VideoStreamEOS.fields = protobuf_1.proto3.util.newFieldList(() => []);
1119
+ /**
1120
+ * @generated from message livekit.proto.VideoSourceResolution
1121
+ */
1122
+ class VideoSourceResolution extends protobuf_1.Message {
1123
+ constructor(data) {
1124
+ super();
1125
+ /**
1126
+ * @generated from field: uint32 width = 1;
1127
+ */
1128
+ this.width = 0;
1129
+ /**
1130
+ * @generated from field: uint32 height = 2;
1131
+ */
1132
+ this.height = 0;
1133
+ protobuf_1.proto3.util.initPartial(data, this);
1134
+ }
1135
+ static fromBinary(bytes, options) {
1136
+ return new VideoSourceResolution().fromBinary(bytes, options);
1137
+ }
1138
+ static fromJson(jsonValue, options) {
1139
+ return new VideoSourceResolution().fromJson(jsonValue, options);
1140
+ }
1141
+ static fromJsonString(jsonString, options) {
1142
+ return new VideoSourceResolution().fromJsonString(jsonString, options);
1143
+ }
1144
+ static equals(a, b) {
1145
+ return protobuf_1.proto3.util.equals(VideoSourceResolution, a, b);
1146
+ }
1147
+ }
1148
+ exports.VideoSourceResolution = VideoSourceResolution;
1149
+ VideoSourceResolution.runtime = protobuf_1.proto3;
1150
+ VideoSourceResolution.typeName = "livekit.proto.VideoSourceResolution";
1151
+ VideoSourceResolution.fields = protobuf_1.proto3.util.newFieldList(() => [
1152
+ { no: 1, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1153
+ { no: 2, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1154
+ ]);
1155
+ /**
1156
+ * @generated from message livekit.proto.VideoSourceInfo
1157
+ */
1158
+ class VideoSourceInfo extends protobuf_1.Message {
1159
+ constructor(data) {
1160
+ super();
1161
+ /**
1162
+ * @generated from field: livekit.proto.VideoSourceType type = 1;
1163
+ */
1164
+ this.type = VideoSourceType.VIDEO_SOURCE_NATIVE;
1165
+ protobuf_1.proto3.util.initPartial(data, this);
1166
+ }
1167
+ static fromBinary(bytes, options) {
1168
+ return new VideoSourceInfo().fromBinary(bytes, options);
1169
+ }
1170
+ static fromJson(jsonValue, options) {
1171
+ return new VideoSourceInfo().fromJson(jsonValue, options);
1172
+ }
1173
+ static fromJsonString(jsonString, options) {
1174
+ return new VideoSourceInfo().fromJsonString(jsonString, options);
1175
+ }
1176
+ static equals(a, b) {
1177
+ return protobuf_1.proto3.util.equals(VideoSourceInfo, a, b);
1178
+ }
1179
+ }
1180
+ exports.VideoSourceInfo = VideoSourceInfo;
1181
+ VideoSourceInfo.runtime = protobuf_1.proto3;
1182
+ VideoSourceInfo.typeName = "livekit.proto.VideoSourceInfo";
1183
+ VideoSourceInfo.fields = protobuf_1.proto3.util.newFieldList(() => [
1184
+ { no: 1, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(VideoSourceType) },
1185
+ ]);
1186
+ /**
1187
+ * @generated from message livekit.proto.OwnedVideoSource
1188
+ */
1189
+ class OwnedVideoSource extends protobuf_1.Message {
1190
+ constructor(data) {
1191
+ super();
1192
+ protobuf_1.proto3.util.initPartial(data, this);
1193
+ }
1194
+ static fromBinary(bytes, options) {
1195
+ return new OwnedVideoSource().fromBinary(bytes, options);
1196
+ }
1197
+ static fromJson(jsonValue, options) {
1198
+ return new OwnedVideoSource().fromJson(jsonValue, options);
1199
+ }
1200
+ static fromJsonString(jsonString, options) {
1201
+ return new OwnedVideoSource().fromJsonString(jsonString, options);
1202
+ }
1203
+ static equals(a, b) {
1204
+ return protobuf_1.proto3.util.equals(OwnedVideoSource, a, b);
1205
+ }
1206
+ }
1207
+ exports.OwnedVideoSource = OwnedVideoSource;
1208
+ OwnedVideoSource.runtime = protobuf_1.proto3;
1209
+ OwnedVideoSource.typeName = "livekit.proto.OwnedVideoSource";
1210
+ OwnedVideoSource.fields = protobuf_1.proto3.util.newFieldList(() => [
1211
+ { no: 1, name: "handle", kind: "message", T: handle_pb_js_1.FfiOwnedHandle },
1212
+ { no: 2, name: "info", kind: "message", T: VideoSourceInfo },
1213
+ ]);
1214
+ //# sourceMappingURL=video_frame_pb.js.map