@camstack/types 1.2.220 → 1.2.221
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/{canonical-hash-CBuveiaU.js → canonical-hash-BS9dQmcQ.js} +11 -0
- package/dist/{canonical-hash-B-5nFwFn.mjs → canonical-hash-C5pB-QV1.mjs} +11 -0
- package/dist/ffmpeg/invocation.d.ts +22 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/package.json +1 -1
|
@@ -129,6 +129,17 @@ function buildRateControlArgs(video) {
|
|
|
129
129
|
}
|
|
130
130
|
/** The whole video block (`-vf` … `-c:v` … knobs), after `-i`. */
|
|
131
131
|
function buildVideoArgs(video, outputArgs, filterGraph) {
|
|
132
|
+
if (video.kind === "raw") {
|
|
133
|
+
if (filterGraph && video.filter !== void 0) throw new Error("FfmpegInvocation: video.filter cannot be combined with a filter graph — fold the filter into the graph");
|
|
134
|
+
return [
|
|
135
|
+
...video.filter !== void 0 ? ["-vf", video.filter] : [],
|
|
136
|
+
"-c:v",
|
|
137
|
+
"rawvideo",
|
|
138
|
+
"-pix_fmt",
|
|
139
|
+
video.pixelFormat,
|
|
140
|
+
...video.fps !== void 0 ? ["-r", String(video.fps)] : []
|
|
141
|
+
];
|
|
142
|
+
}
|
|
132
143
|
if (video.kind === "copy") {
|
|
133
144
|
if (filterGraph) throw new Error("FfmpegInvocation: a filter graph produces a NEW picture, so video.kind must be `encode`");
|
|
134
145
|
return [
|
|
@@ -129,6 +129,17 @@ function buildRateControlArgs(video) {
|
|
|
129
129
|
}
|
|
130
130
|
/** The whole video block (`-vf` … `-c:v` … knobs), after `-i`. */
|
|
131
131
|
function buildVideoArgs(video, outputArgs, filterGraph) {
|
|
132
|
+
if (video.kind === "raw") {
|
|
133
|
+
if (filterGraph && video.filter !== void 0) throw new Error("FfmpegInvocation: video.filter cannot be combined with a filter graph — fold the filter into the graph");
|
|
134
|
+
return [
|
|
135
|
+
...video.filter !== void 0 ? ["-vf", video.filter] : [],
|
|
136
|
+
"-c:v",
|
|
137
|
+
"rawvideo",
|
|
138
|
+
"-pix_fmt",
|
|
139
|
+
video.pixelFormat,
|
|
140
|
+
...video.fps !== void 0 ? ["-r", String(video.fps)] : []
|
|
141
|
+
];
|
|
142
|
+
}
|
|
132
143
|
if (video.kind === "copy") {
|
|
133
144
|
if (filterGraph) throw new Error("FfmpegInvocation: a filter graph produces a NEW picture, so video.kind must be `encode`");
|
|
134
145
|
return [
|
|
@@ -193,7 +193,27 @@ export interface FfmpegVideoCopyPlan {
|
|
|
193
193
|
readonly kind: 'copy';
|
|
194
194
|
readonly bitstreamFilter?: string;
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
/**
|
|
197
|
+
* Decode, filter, and hand the PIXELS on — no encoder at all.
|
|
198
|
+
*
|
|
199
|
+
* The one consumer is a composition this repo assembles itself
|
|
200
|
+
* (`grid-compositor.ts`): its tiles are copied into a canvas, so encoding them
|
|
201
|
+
* on the way out and decoding them again on the way in would be two codecs paid
|
|
202
|
+
* to deliver the frames that were already there.
|
|
203
|
+
*
|
|
204
|
+
* `pixelFormat` is REQUIRED, unlike on an encode plan where it is a hint.
|
|
205
|
+
* Raw frames carry no header, so their format is not written down anywhere on
|
|
206
|
+
* the wire: whoever reads them has to be told, and a default here would be a
|
|
207
|
+
* fact one side knows and the other guesses.
|
|
208
|
+
*/
|
|
209
|
+
export interface FfmpegVideoRawPlan {
|
|
210
|
+
readonly kind: 'raw';
|
|
211
|
+
readonly pixelFormat: string;
|
|
212
|
+
/** A simple `-vf` chain (crop, scale). Never combined with a filter graph. */
|
|
213
|
+
readonly filter?: string;
|
|
214
|
+
readonly fps?: number;
|
|
215
|
+
}
|
|
216
|
+
export type FfmpegVideoPlan = FfmpegVideoCopyPlan | FfmpegVideoEncodePlan | FfmpegVideoRawPlan;
|
|
197
217
|
export type FfmpegAudioCodecId = 'opus' | 'aac' | 'pcmu' | 'pcma';
|
|
198
218
|
export interface FfmpegAudioEncodePlan {
|
|
199
219
|
readonly kind: 'encode';
|
|
@@ -290,7 +310,7 @@ export type FfmpegSink = {
|
|
|
290
310
|
*/
|
|
291
311
|
| {
|
|
292
312
|
readonly kind: 'stdout';
|
|
293
|
-
readonly container: 'h264' | 'hevc' | 'mpegts' | 'flv';
|
|
313
|
+
readonly container: 'h264' | 'hevc' | 'mpegts' | 'flv' | 'rawvideo';
|
|
294
314
|
} | FfmpegFmp4Sink
|
|
295
315
|
/**
|
|
296
316
|
* Two independent mapped RTP outputs. Generic ffmpeg RTP vocabulary — the
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_sleep = require("./sleep-VlZxDyXq.js");
|
|
3
3
|
const require_event_category = require("./event-category-BVfsrBYA.js");
|
|
4
|
-
const require_canonical_hash = require("./canonical-hash-
|
|
4
|
+
const require_canonical_hash = require("./canonical-hash-BS9dQmcQ.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
7
7
|
let zod = require("zod");
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as CAM_PROFILE_ORDER, A as DeviceType, At as isEvent, B as systemMethod, Bt as isAudioChunkFormat, C as customAction, Ct as SHARE_VIEW_KINDS, D as ChargingStatus, Dt as createDurableState, E as deviceCustomAction, Et as normalizeAddonInitResult, F as event, Ft as hydrateSchema, G as ReadinessRegistry, H as nodePin, I as expandCapMethods, It as resolveHydratedFieldValue, J as readinessKey, K as ReadinessTimeoutError, L as isDeviceConfigCap, Lt as AUDIO_CHUNK_FORMATS, M as DEFAULT_RUNTIME_STATE_DURABILITY, Mt as WELL_KNOWN_TAB_MAP, N as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Nt as collectHydratedFieldEntries, O as DeviceFeature, Ot as createEvent, P as DEVICE_STATUS_METHOD, Pt as collectHydratedFieldValues, Q as BrokerStatusSchema, R as method, Rt as audioChunkBytesPerSample, S as DEVICE_CHILDREN_BATCH_MAX, St as DATAPLANE_SECRET_HEADER, T as describeCustomActions, Tt as BaseAddon, U as readNodePin, V as CAP_NODE_PIN_CONTEXT_KEY, W as toNodeId, X as AudioChunkFormatSchema, Y as scopeKey, Z as BrokerStatsSchema, _ as createMirrorSource, _t as SubscribeFramesResultSchema, a as asJsonObject, at as DecodedFrameSchema, b as deviceOpsCapability, bt as parseProfileBrokerId, c as parseJsonArray, ct as FrameHandleSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as ProfileSlotStatusSchema, et as CamProfileSchema, f as DEVICE_SCOPED_CAPS, ft as StreamSourceEntrySchema, g as createLazyTrpcSource, gt as SubscribeFramesInputSchema, h as createEventBusSliceSource, ht as SubscribeAudioChunksResultSchema, i as asJsonArray, it as DecodedAudioChunkSchema, j as adminUiCapability, jt as WELL_KNOWN_TABS, k as DeviceRole, kt as emitReadiness, l as parseJsonObject, lt as ProfileRtspEntrySchema, m as createDeviceProxy, mt as SubscribeAudioChunksInputSchema, n as sleepCancellable, nt as CamStreamResolutionSchema, o as asNumber, ot as EncodedPacketSchema, p as isDeviceScopedCap, pt as StreamSourceSchema, q as emitDownForOwnedCaps, r as asBoolean, rt as CameraStreamSchema, s as asString, st as FrameHandleFormatSchema, t as sleep, tt as CamStreamKindSchema, u as parseJsonUnknown, ut as ProfileSlotSchema, v as createSliceHandle, vt as makeProfileBrokerId, w as defineCustomActions, wt as DisposerChain, x as viewerUiCapability, xt as selectAssignedProfileSlots, y as RawStateResultSchema, yt as makeSourceBrokerId, z as resolveCapMount, zt as expandAudioChunkToF32le } from "./sleep-GU_us3DG.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BVDXG4tB.mjs";
|
|
3
|
-
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, p as resolveStreamMaps, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-
|
|
3
|
+
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, p as resolveStreamMaps, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-C5pB-QV1.mjs";
|
|
4
4
|
import { EventSourceType } from "./enums.mjs";
|
|
5
5
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
6
6
|
import { z } from "zod";
|
package/dist/node.js
CHANGED
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
|
-
const require_canonical_hash = require("./canonical-hash-
|
|
24
|
+
const require_canonical_hash = require("./canonical-hash-BS9dQmcQ.js");
|
|
25
25
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
27
|
let node_fs = require("node:fs");
|
package/dist/node.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Fmp4BoxSplitter, o as buildFfmpegArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-
|
|
1
|
+
import { n as Fmp4BoxSplitter, o as buildFfmpegArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-C5pB-QV1.mjs";
|
|
2
2
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
3
3
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import * as fs from "node:fs";
|