@camstack/addon-decoder-nodeav 1.2.96 → 1.2.97

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.
package/dist/index.js CHANGED
@@ -20460,6 +20460,14 @@ var NativeCropResultSchema = object({
20460
20460
  * set `encodeJpeg: true`; `bytes` is then absent.
20461
20461
  */
20462
20462
  jpeg: string().optional(),
20463
+ /**
20464
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
20465
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
20466
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
20467
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
20468
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
20469
+ */
20470
+ jpegBytes: _instanceof(Uint8Array).optional(),
20463
20471
  width: number().int().positive(),
20464
20472
  height: number().int().positive(),
20465
20473
  /**
@@ -20526,7 +20534,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20526
20534
  })]);
20527
20535
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20528
20536
  var ParkedTrackFrameSchema = object({
20529
- jpeg: string(),
20537
+ /**
20538
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
20539
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
20540
+ * Exactly one of the two is present.
20541
+ */
20542
+ jpeg: string().optional(),
20543
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
20544
+ jpegBytes: _instanceof(Uint8Array).optional(),
20530
20545
  width: number().int().positive(),
20531
20546
  height: number().int().positive(),
20532
20547
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -21113,6 +21128,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21113
21128
  bbox: NativeCropBboxSchema,
21114
21129
  maxWidth: number().int().positive().optional(),
21115
21130
  /**
21131
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
21132
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
21133
+ * wire — never assume consent: a pre-D462 caller parses the field as
21134
+ * base64 and bytes would decode to garbage rather than fail.
21135
+ */
21136
+ acceptJpegBytes: boolean().optional(),
21137
+ /**
21116
21138
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
21117
21139
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
21118
21140
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -21180,7 +21202,14 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21180
21202
  }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21181
21203
  deviceId: number(),
21182
21204
  trackId: string(),
21183
- kind: ParkedFrameKindSchema
21205
+ kind: ParkedFrameKindSchema,
21206
+ /**
21207
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
21208
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
21209
+ * wire — never assume consent: a pre-D462 caller parses the field as
21210
+ * base64 and bytes would decode to garbage rather than fail.
21211
+ */
21212
+ acceptJpegBytes: boolean().optional()
21184
21213
  }), ParkedTrackFrameSchema.nullable()), method(object({
21185
21214
  deviceId: number(),
21186
21215
  trackId: string()
package/dist/index.mjs CHANGED
@@ -20456,6 +20456,14 @@ var NativeCropResultSchema = object({
20456
20456
  * set `encodeJpeg: true`; `bytes` is then absent.
20457
20457
  */
20458
20458
  jpeg: string().optional(),
20459
+ /**
20460
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
20461
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
20462
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
20463
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
20464
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
20465
+ */
20466
+ jpegBytes: _instanceof(Uint8Array).optional(),
20459
20467
  width: number().int().positive(),
20460
20468
  height: number().int().positive(),
20461
20469
  /**
@@ -20522,7 +20530,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
20522
20530
  })]);
20523
20531
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
20524
20532
  var ParkedTrackFrameSchema = object({
20525
- jpeg: string(),
20533
+ /**
20534
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
20535
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
20536
+ * Exactly one of the two is present.
20537
+ */
20538
+ jpeg: string().optional(),
20539
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
20540
+ jpegBytes: _instanceof(Uint8Array).optional(),
20526
20541
  width: number().int().positive(),
20527
20542
  height: number().int().positive(),
20528
20543
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -21109,6 +21124,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21109
21124
  bbox: NativeCropBboxSchema,
21110
21125
  maxWidth: number().int().positive().optional(),
21111
21126
  /**
21127
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
21128
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
21129
+ * wire — never assume consent: a pre-D462 caller parses the field as
21130
+ * base64 and bytes would decode to garbage rather than fail.
21131
+ */
21132
+ acceptJpegBytes: boolean().optional(),
21133
+ /**
21112
21134
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
21113
21135
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
21114
21136
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -21176,7 +21198,14 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
21176
21198
  }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
21177
21199
  deviceId: number(),
21178
21200
  trackId: string(),
21179
- kind: ParkedFrameKindSchema
21201
+ kind: ParkedFrameKindSchema,
21202
+ /**
21203
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
21204
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
21205
+ * wire — never assume consent: a pre-D462 caller parses the field as
21206
+ * base64 and bytes would decode to garbage rather than fail.
21207
+ */
21208
+ acceptJpegBytes: boolean().optional()
21180
21209
  }), ParkedTrackFrameSchema.nullable()), method(object({
21181
21210
  deviceId: number(),
21182
21211
  trackId: string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.96",
3
+ "version": "1.2.97",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",