@livekit/rtc-node 0.0.7 → 0.2.0

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