@camstack/types 1.2.598 → 1.2.599
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/CHANGELOG.md +14 -0
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +7 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts +137 -0
- package/dist/capabilities/stream-broker.cap.d.ts +127 -0
- package/dist/client.js +87 -1
- package/dist/client.mjs +87 -1
- package/dist/encode-profile.d.ts +4 -0
- package/dist/ffmpeg/invocation.d.ts +9 -0
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/{implemented-methods-wFScvZ40.mjs → implemented-methods-BUBqZ2a0.mjs} +5 -4
- package/dist/{implemented-methods-DnfgAfI6.js → implemented-methods-I_l2ENnf.js} +5 -4
- package/dist/index.js +66 -7
- package/dist/index.mjs +62 -8
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{runtime-capabilities-qX7BpOYT.mjs → runtime-capabilities-B36VcCR6.mjs} +98 -2
- package/dist/{runtime-capabilities-DWgr8hrq.js → runtime-capabilities-azf1ve5b.js} +127 -1
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
24
|
const require_composed_stable_id = require("./composed-stable-id-DkF5-kuf.js");
|
|
25
|
-
const require_implemented_methods = require("./implemented-methods-
|
|
25
|
+
const require_implemented_methods = require("./implemented-methods-I_l2ENnf.js");
|
|
26
26
|
let node_crypto = require("node:crypto");
|
|
27
27
|
let node_fs = require("node:fs");
|
|
28
28
|
node_fs = __toESM(node_fs);
|
package/dist/node.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as errMsg } from "./composed-stable-id-DIeNz933.mjs";
|
|
2
|
-
import { B as compositionSourceKey, _r as isSoftwareDecode, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, ar as getFfmpegArtifact, cr as Fmp4BoxSplitter, ir as FFMPEG_RELEASE, nr as chooseFfmpegBinary, or as getFfmpegDownloadUrl, pr as buildFfmpegArgs, rr as ffmpegBinaryName, sr as canonicalHash, t as implementedMethodsOf, tr as FFMPEG_PATH_ENV } from "./implemented-methods-
|
|
2
|
+
import { B as compositionSourceKey, _r as isSoftwareDecode, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, ar as getFfmpegArtifact, cr as Fmp4BoxSplitter, ir as FFMPEG_RELEASE, nr as chooseFfmpegBinary, or as getFfmpegDownloadUrl, pr as buildFfmpegArgs, rr as ffmpegBinaryName, sr as canonicalHash, t as implementedMethodsOf, tr as FFMPEG_PATH_ENV } from "./implemented-methods-BUBqZ2a0.mjs";
|
|
3
3
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { chmodSync, copyFileSync, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -7308,6 +7308,99 @@ var BrokerStatusSchema = z.enum([
|
|
|
7308
7308
|
"error",
|
|
7309
7309
|
"stopped"
|
|
7310
7310
|
]);
|
|
7311
|
+
/**
|
|
7312
|
+
* The encode a derived stream's feeder was last spawned with — the read-only
|
|
7313
|
+
* "effective encode". Read off the ffmpeg argv that runs, so it cannot drift
|
|
7314
|
+
* from what the operator's profile and the carrier's rules resolved to.
|
|
7315
|
+
*/
|
|
7316
|
+
var DerivedEffectiveEncodeSchema = z.object({
|
|
7317
|
+
/** `-c:v` of the argv (`libx264`, a hardware encoder, `copy`); null when absent. */
|
|
7318
|
+
encoder: z.string().nullable(),
|
|
7319
|
+
/** Output frame rate; null when the source cadence passes through unmeasured. */
|
|
7320
|
+
fps: z.number().nullable(),
|
|
7321
|
+
gopFrames: z.number(),
|
|
7322
|
+
/** ABR target (`-b:v`), kbps. */
|
|
7323
|
+
targetKbps: z.number().nullable(),
|
|
7324
|
+
/** Ceiling (`-maxrate`), kbps. */
|
|
7325
|
+
capKbps: z.number().nullable(),
|
|
7326
|
+
bufsizeKbps: z.number().nullable(),
|
|
7327
|
+
/**
|
|
7328
|
+
* `copy` = source audio untouched, `aac` = re-encoded, `profile` = operator's
|
|
7329
|
+
* encode, `none` = the operator dropped the track.
|
|
7330
|
+
*/
|
|
7331
|
+
audio: z.enum([
|
|
7332
|
+
"copy",
|
|
7333
|
+
"aac",
|
|
7334
|
+
"profile",
|
|
7335
|
+
"none"
|
|
7336
|
+
])
|
|
7337
|
+
});
|
|
7338
|
+
/**
|
|
7339
|
+
* A derived stream's source: a **profile** slot (follows whatever physical
|
|
7340
|
+
* stream that profile is assigned to) or a **camStream** (pinned to one
|
|
7341
|
+
* physical stream regardless of assignment).
|
|
7342
|
+
*/
|
|
7343
|
+
var DerivedSourceRefSchema = z.union([z.object({
|
|
7344
|
+
kind: z.literal("profile"),
|
|
7345
|
+
profile: z.enum([
|
|
7346
|
+
"high",
|
|
7347
|
+
"mid",
|
|
7348
|
+
"low"
|
|
7349
|
+
])
|
|
7350
|
+
}), z.object({
|
|
7351
|
+
kind: z.literal("camStream"),
|
|
7352
|
+
camStreamId: z.string()
|
|
7353
|
+
})]);
|
|
7354
|
+
/**
|
|
7355
|
+
* What the broker knows of a derived stream's SOURCE when it starts the
|
|
7356
|
+
* encode. Every field is `null` when not measured — never `0`, never a guess.
|
|
7357
|
+
*/
|
|
7358
|
+
var DerivedSourceProbeSchema = z.object({
|
|
7359
|
+
width: z.number().nullable(),
|
|
7360
|
+
height: z.number().nullable(),
|
|
7361
|
+
fps: z.number().nullable(),
|
|
7362
|
+
idrIntervalMs: z.number().nullable(),
|
|
7363
|
+
/** `h264` / `h265` when observed. */
|
|
7364
|
+
videoCodec: z.enum(["h264", "h265"]).nullable(),
|
|
7365
|
+
/** Upper-cased SDP name (`AAC`, `PCMU`) when the source has an audio track. */
|
|
7366
|
+
audioCodec: z.string().nullable()
|
|
7367
|
+
});
|
|
7368
|
+
/**
|
|
7369
|
+
* The full effective encode of a derived-stream profile: the stats the broker
|
|
7370
|
+
* publishes in `getBrokerStats.derivedEncode` plus the resolved geometry, the
|
|
7371
|
+
* flags that say WHY a number differs from the request, and the ffmpeg output
|
|
7372
|
+
* argv. One function (`computeDerivedEncode`) produces it for both the
|
|
7373
|
+
* broker's start path and `previewDerivedEncode`.
|
|
7374
|
+
*/
|
|
7375
|
+
var DerivedEncodePreviewSchema = DerivedEffectiveEncodeSchema.extend({
|
|
7376
|
+
/** Final picture size; `null` when neither the profile nor the source names it. */
|
|
7377
|
+
width: z.number().nullable(),
|
|
7378
|
+
height: z.number().nullable(),
|
|
7379
|
+
/** `h264` / `h265` re-encode, `copy` remux; `null` is never returned (the encoder always resolves). */
|
|
7380
|
+
videoCodec: z.enum([
|
|
7381
|
+
"h264",
|
|
7382
|
+
"h265",
|
|
7383
|
+
"copy"
|
|
7384
|
+
]),
|
|
7385
|
+
requestedFps: z.number().nullable(),
|
|
7386
|
+
/** The requested fps exceeded the source and the source cadence won. */
|
|
7387
|
+
fpsClampedToSource: z.boolean(),
|
|
7388
|
+
/** Lowest bitrate accepted for this geometry x fps; `null` when unknown. */
|
|
7389
|
+
floorKbps: z.number().nullable(),
|
|
7390
|
+
/** The explicit bitrate was below the floor and was raised to it. */
|
|
7391
|
+
raisedToFloor: z.boolean(),
|
|
7392
|
+
/** What the profile asked for when it was raised; `null` otherwise. */
|
|
7393
|
+
requestedKbps: z.number().nullable(),
|
|
7394
|
+
/** Seconds between keyframes; `null` when the output cadence is unknown. */
|
|
7395
|
+
keyframeIntervalSec: z.number().nullable(),
|
|
7396
|
+
/** The ffmpeg argv, with the source loopback URL in `-i`. */
|
|
7397
|
+
args: z.array(z.string())
|
|
7398
|
+
});
|
|
7399
|
+
/** Result of `previewDerivedEncode`: a plan, or the reason there is none. */
|
|
7400
|
+
var PreviewDerivedEncodeResultSchema = z.discriminatedUnion("kind", [z.object({
|
|
7401
|
+
kind: z.literal("preview"),
|
|
7402
|
+
preview: DerivedEncodePreviewSchema
|
|
7403
|
+
}), z.object({ kind: z.literal("no-source") })]);
|
|
7311
7404
|
var BrokerStatsSchema = z.object({
|
|
7312
7405
|
status: BrokerStatusSchema,
|
|
7313
7406
|
inputFps: z.number(),
|
|
@@ -7349,7 +7442,9 @@ var BrokerStatsSchema = z.object({
|
|
|
7349
7442
|
* alone that the mute is on the packet path and not merely persisted.
|
|
7350
7443
|
*/
|
|
7351
7444
|
audioMuted: z.boolean().optional(),
|
|
7352
|
-
audioMutedDropped: z.number().optional()
|
|
7445
|
+
audioMutedDropped: z.number().optional(),
|
|
7446
|
+
/** Present for a derived broker once its feeder has spawned at least once. */
|
|
7447
|
+
derivedEncode: DerivedEffectiveEncodeSchema.optional()
|
|
7353
7448
|
});
|
|
7354
7449
|
/**
|
|
7355
7450
|
* Exporter-facing "profile restream" entry. Returned by
|
|
@@ -22215,6 +22310,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
22215
22310
|
forgetDeviceHardware: (input, options) => dispatchSystem("streamBroker", "forgetDeviceHardware", "mutation", input, void 0, options),
|
|
22216
22311
|
renderPreBufferClip: (input, options) => dispatchSystem("streamBroker", "renderPreBufferClip", "mutation", input, void 0, options),
|
|
22217
22312
|
produceEventMedia: (input, options) => dispatchSystem("streamBroker", "produceEventMedia", "mutation", input, void 0, options),
|
|
22313
|
+
previewDerivedEncode: (input, options) => dispatchSystem("streamBroker", "previewDerivedEncode", "query", input, void 0, options),
|
|
22218
22314
|
restartProfile: (input, options) => dispatchSystem("streamBroker", "restartProfile", "mutation", input, void 0, options),
|
|
22219
22315
|
getDeviceAudioMute: (input, options) => dispatchSystem("streamBroker", "getDeviceAudioMute", "query", input, void 0, options),
|
|
22220
22316
|
setDeviceAudioMute: (input, options) => dispatchSystem("streamBroker", "setDeviceAudioMute", "mutation", input, void 0, options),
|
|
@@ -23212,4 +23308,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
23212
23308
|
return out;
|
|
23213
23309
|
}
|
|
23214
23310
|
//#endregion
|
|
23215
|
-
export { CAP_STATE_LEAVES as $,
|
|
23311
|
+
export { CAP_STATE_LEAVES as $, collectSecretConfigKeys as $a, normalizeSecretOwner as $i, createSecretsAccess as $n, classifyStoreError as $r, AudioChunkFormatSchema as $t, DEVICE_SCOPED_CAPS as A, defineAddonMigrations as Aa, recordSecretCollection as Ai, baseUnitOf as An, isZodSecret as Ar, allVocabActions as At, commandEffect as B, dehydrateSchema as Ba, RECORD_MAX_DATA_BYTES as Bi, TransitionCommandSchema as Bn, isDeviceConfigCap as Br, emitDownForOwnedCaps as Bt, asNumber as C, defaultIntegrationDepsOver as Ca, isInstanceEnabled as Ci, makeSourceBrokerId as Cn, RecordRetentionSchema as Cr, DEVICE_CHILDREN_BATCH_MAX as Ct, parseJsonUnknown as D, secretsOverMigrationApi as Da, mapSecretLeaves as Di, DISPLAY_PREFERENCES as Dn, defineRecordKinds as Dr, t as Dt, parseJsonObject as E, rowsDepsOver as Ea, collectSecretLeaves as Ei, DEFAULT_DISPLAY_PREFERENCE as En, declarationsOf as Er, addonPagesSourceCapability as Et, createEventBusSliceSource as F, WELL_KNOWN_TABS as Fa, RECORD_CLASSES as Fi, NOT_A_DEVICE as Fn, HISTORY_UNIT_LABELS as Fr, CAP_VOCABULARY_BY_NAME as Ft, resolveSideEffect as G, isSecretClear as Ga, RECORD_SETTINGS_MAX_ROWS as Gi, OnBehalfSourceSchema as Gn, CamstackError as Gr, DEBUG_WATCH_REARM_EVERY_MS as Gt, commandHoldMs as H, resolveHydratedFieldValue as Ha, RECORD_MAX_INDEX_FIELDS as Hi, TransitionValueSchema as Hn, optionalMethod as Hr, scopeKey as Ht, createLazyTrpcSource as I, WELL_KNOWN_TAB_MAP as Ia, RECORD_DATABASES as Ii, DeviceCommandSettledEventSchema as In, PROVIDER_PIN_FIELD as Ir, CAP_VOCABULARY as It, HF_REPO as J, isSecretMarkerLike as Ja, arrayItemFieldPath as Ji, makeInMemoryRecords as Jn, FORBIDDEN_MESSAGE_PREFIX as Jr, DebugWatchTable as Jt, DEFAULT_TOKEN_EXPIRY as K, isSecretFieldView as Ka, RECORD_SWEEP_INTERVAL_MS as Ki, RuleFireOriginSchema as Kn, ErrorCodeSchema as Kr, DEBUG_WATCH_WINDOW_MS as Kt, createMirrorSource as L, collectHydratedFieldEntries as La, RECORD_DEFAULT_MAX_DATA_BYTES as Li, DeviceTransitionSchema as Ln, event as Lr, MODEL_FORMATS as Lt, createDeviceProxy as M, createEvent as Ma, secretArrayPrefixes as Mi, historyUnitFor as Mn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Mr, findVocabAction as Mt, invokeTrpcLeaf as N, emitReadiness as Na, RECORD_BATCH_MAX as Ni, isReadingQuantity as Nn, DEVICE_STATUS_METHOD as Nr, vocabActionIdFor as Nt, hfModelUrl as O, switchRecordsOverMigrationApi as Oa, parseSecretPath as Oi, QUANTITY_BASE as On, SECRET_META as Or, VocabActionError as Ot, addonSliceHandleApi as P, isEvent as Pa, RECORD_BATCH_MAX_BYTES as Pi, readingMeta as Pn, HISTORY_DEFAULT_MIN_INTERVAL_MS as Pr, vocabCall as Pt, CAP_NAMES as Q, collectKeychainStoredKeys as Qa, isSecretRef as Qi, REVALIDATE_AFTER_MS as Qn, BaseAddon as Qr, isDebugChannelName as Qt, createSliceHandle as R, collectHydratedFieldValues as Ra, RECORD_DELETE_BATCH as Ri, TransitionActorKindSchema as Rn, expandCapMethods as Rr, ReadinessRegistry as Rt, asJsonObject as S, recordsErrorFromMessage as Sa, defaultAddDeviceMode as Si, makeProfileBrokerId as Sn, RecordKindNameSchema as Sr, deviceOpsCapability as St, parseJsonArray as T, recordsOverMigrationApi as Ta, REMOVE_LEAF as Ti, selectAssignedProfileSlots as Tn, assertValidDeclaration as Tr, AddonPageDeclarationSchema as Tt, effectConditionHolds as U, SECRET_CLEAR as Ua, RECORD_QUERY_MAX as Ui, CommandOriginClaimSchema as Un, resolveCapMount as Ur, DEBUG_CHANNEL_PREFIX as Ut, commandEffects as V, hydrateSchema as Va, RECORD_MAX_INDEXES as Vi, TransitionOutcomeSchema as Vn, method as Vr, readinessKey as Vt, isCommand as W, classifySecretWrite as Wa, RECORD_SECRET_COLLECTION_PREFIX as Wi, OnBehalfSchema as Wn, systemMethod as Wr, DEBUG_WATCH_HARD_CAP_MS as Wt, CAP_ADVANCE_FIELDS as X, toSecretFieldView as Xa, formatSecretScope as Xi, assertTransactScope as Xn, readErrorI18n as Xr, createDebugEmitter as Xt, RUNTIME_DEFAULTS as Y, makeSecretMarker as Ya, buildSecretRef as Yi, createRecordsAccess as Yn, forbiddenError as Yr, __resetDebugInterestForTests as Yt, CAP_METHOD_TIMEOUTS_MS as Z, REDACTED_SECRET as Za, globalSecretScope as Zi, resolveSecretViewsIn as Zn, userError as Zr, getDebugInterest as Zt, pythonScriptForBackend as _, RevConflictError as _a, moveRegistrySwitchToBody as _i, ProfileSlotStatusSchema as _n, entryBody as _r, switchRefusesSetState as _t, runtimeDevices as a, DeclarationRefusedError as aa, secretTreeFromSchema as ai, CamStreamKindSchema as an, findMigrationsBlocked as ao, scrubKnownSecrets as ar, defineCustomActions as at, asBoolean as b, UnknownRecordKindError as ba, registrySwitchToBodyMigration as bi, SubscribeAudioChunksInputSchema as bn, RecordIndexSchema as br, MIGRATION_API_VERSION as bt, coralUsableUnits as c, InvalidRecordError as ca, isSecretRefOwnedBy as ci, DecodedAudioChunkSchema as cn, expandAudioChunkToF32le as co, PEER_BYTES_MAX_OUTSTANDING as cr, CAP_COMMAND_ORIGIN_CONTEXT_KEY as ct, sleepCancellable as d, RECORDS_ERROR_CODES as da, SCOPED_SETTINGS_SCOPES as di, DerivedSourceProbeSchema as dn, PeerBytesTicketSchema as dr, nodePin as dt, parseSecretRef as ea, migrationSet as ei, AudioStreamPickSchema as en, isKeychainStoredField as eo, MIN_SCRUBBED_LENGTH as er, CAP_METHOD_NOT_IMPLEMENTED as et, DEVICE_BACKEND_TO_FORMAT as f, RecordNotFoundError as fa, nodeIdOfScopedKey as fi, DerivedSourceRefSchema as fn, CALLER_USERNAME_HEADER as fr, readCommandOrigin as ft, formatForRuntime as g, RecordsError as ga, createDurableState as gi, ProfileSlotSchema as gn, defineEntryKind as gr, SWITCH_SETTABLE_GATE as gt, deviceBackendToFormat as h, RecordUniqueViolationError as ha, normalizeNodeId as hi, ProfileRtspEntrySchema as hn, DisposerChain as hr, viewerUiCapability as ht, modelFormatForRuntime as i, BatchTooLargeError as ia, secretTreeFromPaths as ii, CamProfileSchema as in, AddonMigrationsBlockedError as io, registerKnownSecret as ir, customAction as it, isDeviceScopedCap as j, runAddonMigrations as ja, recordSecretRef as ji, displayUnitFor as jn, DEFAULT_RUNTIME_STATE_DURABILITY as jr, assertDeviceOffers as jt, BOOT_RECOVERY_BACKOFF_MS as k, AddonMigrationDefinitionError as ka, recordArrayItemPath as ki, ReadingQuantitySchema as kn, collectZodSecretPaths as kr, actionEffect as kt, edgetpuDelegateDevice as l, NoCallerError as la, resolveSecretMarkers as li, DerivedEffectiveEncodeSchema as ln, isAudioChunkFormat as lo, PEER_BYTES_STALL_MS as lr, CAP_NODE_PIN_CONTEXT_KEY as lt, RUNTIME_TO_FORMAT as m, RecordTooLargeError as ma, resolvedValues as mi, PreviewDerivedEncodeResultSchema as mn, SHARE_VIEW_KINDS as mr, toNodeId as mt, describeNvidia as n, linksOfKind as na, mergeSecretStatePaths as ni, BrokerStatusSchema as nn, omitTransientConfig as no, forgetKnownSecret as nr, CALLER_STAMPED_CAPABILITIES as nt, scoreRuntimes as o, FilterRequiredError as oa, KeychainWriteRefusedError as oi, CamStreamResolutionSchema as on, AUDIO_CHUNK_FORMATS as oo, shortSecretRefHash as or, describeCustomActions as ot, PYTHON_SCRIPT as p, RecordSecretUnavailableError as pa, resolveDeviceSettings as pi, FrameHandleSchema as pn, DATAPLANE_SECRET_HEADER as pr, readNodePin as pt, HF_BASE_URL as q, isSecretMarker as qa, SECRET_REF_SCHEME as qi, ruleFireOfClaim as qn, ErrorI18nPayloadSchema as qr, DebugInterest as qt, enumerateInferenceDevices as r, optionalLinkField as ra, parseSecretStatePath as ri, CAM_PROFILE_ORDER as rn, schemaDeclaresAnyField as ro, knownSecretCount as rr, withoutCallerStamp as rt, supportedRuntimes as s, ForeignSecretMarkerError as sa, collectSecretMarkerRefs as si, CameraStreamSchema as sn, audioChunkBytesPerSample as so, PEER_BYTES_CHUNK_BYTES as sr, deviceCustomAction as st, defaultDeviceFor as t, linkField as ta, normalizeAddonInitResult as ti, BrokerStatsSchema as tn, isSecretConfigField as to, clearKnownSecrets as tr, isCapMethodAbsent as tt, sleep as u, PlaintextSecretError as ua, transformSecretWrite as ui, DerivedEncodePreviewSchema as un, PEER_BYTES_TICKET_TTL_MS as ur, commandOrigin as ut, requiresPython as v, TransactRefusedError as va, registrySwitchPortsOver as vi, StreamSourceEntrySchema$1 as vn, EntryDescriptorSchema as vr, PipelineRunResultBridge as vt, asString as w, integrationRowsApiOver as wa, secretViewsOf as wi, parseProfileBrokerId as wn, StoredRecordKindDeclarationSchema as wr, adminUiCapability as wt, asJsonArray as x, asRecordsError as xa, RecordIntegrationInstances as xi, SubscribeAudioChunksResultSchema as xn, RecordKindDeclarationSchema as xr, RawStateResultSchema as xt, maskUrlCredentials as y, UnindexedFilterError as ya, registrySwitchToBodyId as yi, StreamSourceSchema as yn, RecordFieldPathSchema as yr, PipelineStepInputSchema as yt, auditedFields as z, dehydrateConfigField as za, RECORD_ID_MAX_LENGTH as zi, TransitionActorSchema as zn, historyItemFieldPath as zr, ReadinessTimeoutError as zt };
|
|
@@ -7308,6 +7308,99 @@ var BrokerStatusSchema = zod.z.enum([
|
|
|
7308
7308
|
"error",
|
|
7309
7309
|
"stopped"
|
|
7310
7310
|
]);
|
|
7311
|
+
/**
|
|
7312
|
+
* The encode a derived stream's feeder was last spawned with — the read-only
|
|
7313
|
+
* "effective encode". Read off the ffmpeg argv that runs, so it cannot drift
|
|
7314
|
+
* from what the operator's profile and the carrier's rules resolved to.
|
|
7315
|
+
*/
|
|
7316
|
+
var DerivedEffectiveEncodeSchema = zod.z.object({
|
|
7317
|
+
/** `-c:v` of the argv (`libx264`, a hardware encoder, `copy`); null when absent. */
|
|
7318
|
+
encoder: zod.z.string().nullable(),
|
|
7319
|
+
/** Output frame rate; null when the source cadence passes through unmeasured. */
|
|
7320
|
+
fps: zod.z.number().nullable(),
|
|
7321
|
+
gopFrames: zod.z.number(),
|
|
7322
|
+
/** ABR target (`-b:v`), kbps. */
|
|
7323
|
+
targetKbps: zod.z.number().nullable(),
|
|
7324
|
+
/** Ceiling (`-maxrate`), kbps. */
|
|
7325
|
+
capKbps: zod.z.number().nullable(),
|
|
7326
|
+
bufsizeKbps: zod.z.number().nullable(),
|
|
7327
|
+
/**
|
|
7328
|
+
* `copy` = source audio untouched, `aac` = re-encoded, `profile` = operator's
|
|
7329
|
+
* encode, `none` = the operator dropped the track.
|
|
7330
|
+
*/
|
|
7331
|
+
audio: zod.z.enum([
|
|
7332
|
+
"copy",
|
|
7333
|
+
"aac",
|
|
7334
|
+
"profile",
|
|
7335
|
+
"none"
|
|
7336
|
+
])
|
|
7337
|
+
});
|
|
7338
|
+
/**
|
|
7339
|
+
* A derived stream's source: a **profile** slot (follows whatever physical
|
|
7340
|
+
* stream that profile is assigned to) or a **camStream** (pinned to one
|
|
7341
|
+
* physical stream regardless of assignment).
|
|
7342
|
+
*/
|
|
7343
|
+
var DerivedSourceRefSchema = zod.z.union([zod.z.object({
|
|
7344
|
+
kind: zod.z.literal("profile"),
|
|
7345
|
+
profile: zod.z.enum([
|
|
7346
|
+
"high",
|
|
7347
|
+
"mid",
|
|
7348
|
+
"low"
|
|
7349
|
+
])
|
|
7350
|
+
}), zod.z.object({
|
|
7351
|
+
kind: zod.z.literal("camStream"),
|
|
7352
|
+
camStreamId: zod.z.string()
|
|
7353
|
+
})]);
|
|
7354
|
+
/**
|
|
7355
|
+
* What the broker knows of a derived stream's SOURCE when it starts the
|
|
7356
|
+
* encode. Every field is `null` when not measured — never `0`, never a guess.
|
|
7357
|
+
*/
|
|
7358
|
+
var DerivedSourceProbeSchema = zod.z.object({
|
|
7359
|
+
width: zod.z.number().nullable(),
|
|
7360
|
+
height: zod.z.number().nullable(),
|
|
7361
|
+
fps: zod.z.number().nullable(),
|
|
7362
|
+
idrIntervalMs: zod.z.number().nullable(),
|
|
7363
|
+
/** `h264` / `h265` when observed. */
|
|
7364
|
+
videoCodec: zod.z.enum(["h264", "h265"]).nullable(),
|
|
7365
|
+
/** Upper-cased SDP name (`AAC`, `PCMU`) when the source has an audio track. */
|
|
7366
|
+
audioCodec: zod.z.string().nullable()
|
|
7367
|
+
});
|
|
7368
|
+
/**
|
|
7369
|
+
* The full effective encode of a derived-stream profile: the stats the broker
|
|
7370
|
+
* publishes in `getBrokerStats.derivedEncode` plus the resolved geometry, the
|
|
7371
|
+
* flags that say WHY a number differs from the request, and the ffmpeg output
|
|
7372
|
+
* argv. One function (`computeDerivedEncode`) produces it for both the
|
|
7373
|
+
* broker's start path and `previewDerivedEncode`.
|
|
7374
|
+
*/
|
|
7375
|
+
var DerivedEncodePreviewSchema = DerivedEffectiveEncodeSchema.extend({
|
|
7376
|
+
/** Final picture size; `null` when neither the profile nor the source names it. */
|
|
7377
|
+
width: zod.z.number().nullable(),
|
|
7378
|
+
height: zod.z.number().nullable(),
|
|
7379
|
+
/** `h264` / `h265` re-encode, `copy` remux; `null` is never returned (the encoder always resolves). */
|
|
7380
|
+
videoCodec: zod.z.enum([
|
|
7381
|
+
"h264",
|
|
7382
|
+
"h265",
|
|
7383
|
+
"copy"
|
|
7384
|
+
]),
|
|
7385
|
+
requestedFps: zod.z.number().nullable(),
|
|
7386
|
+
/** The requested fps exceeded the source and the source cadence won. */
|
|
7387
|
+
fpsClampedToSource: zod.z.boolean(),
|
|
7388
|
+
/** Lowest bitrate accepted for this geometry x fps; `null` when unknown. */
|
|
7389
|
+
floorKbps: zod.z.number().nullable(),
|
|
7390
|
+
/** The explicit bitrate was below the floor and was raised to it. */
|
|
7391
|
+
raisedToFloor: zod.z.boolean(),
|
|
7392
|
+
/** What the profile asked for when it was raised; `null` otherwise. */
|
|
7393
|
+
requestedKbps: zod.z.number().nullable(),
|
|
7394
|
+
/** Seconds between keyframes; `null` when the output cadence is unknown. */
|
|
7395
|
+
keyframeIntervalSec: zod.z.number().nullable(),
|
|
7396
|
+
/** The ffmpeg argv, with the source loopback URL in `-i`. */
|
|
7397
|
+
args: zod.z.array(zod.z.string())
|
|
7398
|
+
});
|
|
7399
|
+
/** Result of `previewDerivedEncode`: a plan, or the reason there is none. */
|
|
7400
|
+
var PreviewDerivedEncodeResultSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
7401
|
+
kind: zod.z.literal("preview"),
|
|
7402
|
+
preview: DerivedEncodePreviewSchema
|
|
7403
|
+
}), zod.z.object({ kind: zod.z.literal("no-source") })]);
|
|
7311
7404
|
var BrokerStatsSchema = zod.z.object({
|
|
7312
7405
|
status: BrokerStatusSchema,
|
|
7313
7406
|
inputFps: zod.z.number(),
|
|
@@ -7349,7 +7442,9 @@ var BrokerStatsSchema = zod.z.object({
|
|
|
7349
7442
|
* alone that the mute is on the packet path and not merely persisted.
|
|
7350
7443
|
*/
|
|
7351
7444
|
audioMuted: zod.z.boolean().optional(),
|
|
7352
|
-
audioMutedDropped: zod.z.number().optional()
|
|
7445
|
+
audioMutedDropped: zod.z.number().optional(),
|
|
7446
|
+
/** Present for a derived broker once its feeder has spawned at least once. */
|
|
7447
|
+
derivedEncode: DerivedEffectiveEncodeSchema.optional()
|
|
7353
7448
|
});
|
|
7354
7449
|
/**
|
|
7355
7450
|
* Exporter-facing "profile restream" entry. Returned by
|
|
@@ -22215,6 +22310,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
22215
22310
|
forgetDeviceHardware: (input, options) => dispatchSystem("streamBroker", "forgetDeviceHardware", "mutation", input, void 0, options),
|
|
22216
22311
|
renderPreBufferClip: (input, options) => dispatchSystem("streamBroker", "renderPreBufferClip", "mutation", input, void 0, options),
|
|
22217
22312
|
produceEventMedia: (input, options) => dispatchSystem("streamBroker", "produceEventMedia", "mutation", input, void 0, options),
|
|
22313
|
+
previewDerivedEncode: (input, options) => dispatchSystem("streamBroker", "previewDerivedEncode", "query", input, void 0, options),
|
|
22218
22314
|
restartProfile: (input, options) => dispatchSystem("streamBroker", "restartProfile", "mutation", input, void 0, options),
|
|
22219
22315
|
getDeviceAudioMute: (input, options) => dispatchSystem("streamBroker", "getDeviceAudioMute", "query", input, void 0, options),
|
|
22220
22316
|
setDeviceAudioMute: (input, options) => dispatchSystem("streamBroker", "setDeviceAudioMute", "mutation", input, void 0, options),
|
|
@@ -23494,6 +23590,30 @@ Object.defineProperty(exports, "DecodedAudioChunkSchema", {
|
|
|
23494
23590
|
return DecodedAudioChunkSchema;
|
|
23495
23591
|
}
|
|
23496
23592
|
});
|
|
23593
|
+
Object.defineProperty(exports, "DerivedEffectiveEncodeSchema", {
|
|
23594
|
+
enumerable: true,
|
|
23595
|
+
get: function() {
|
|
23596
|
+
return DerivedEffectiveEncodeSchema;
|
|
23597
|
+
}
|
|
23598
|
+
});
|
|
23599
|
+
Object.defineProperty(exports, "DerivedEncodePreviewSchema", {
|
|
23600
|
+
enumerable: true,
|
|
23601
|
+
get: function() {
|
|
23602
|
+
return DerivedEncodePreviewSchema;
|
|
23603
|
+
}
|
|
23604
|
+
});
|
|
23605
|
+
Object.defineProperty(exports, "DerivedSourceProbeSchema", {
|
|
23606
|
+
enumerable: true,
|
|
23607
|
+
get: function() {
|
|
23608
|
+
return DerivedSourceProbeSchema;
|
|
23609
|
+
}
|
|
23610
|
+
});
|
|
23611
|
+
Object.defineProperty(exports, "DerivedSourceRefSchema", {
|
|
23612
|
+
enumerable: true,
|
|
23613
|
+
get: function() {
|
|
23614
|
+
return DerivedSourceRefSchema;
|
|
23615
|
+
}
|
|
23616
|
+
});
|
|
23497
23617
|
Object.defineProperty(exports, "DeviceCommandSettledEventSchema", {
|
|
23498
23618
|
enumerable: true,
|
|
23499
23619
|
get: function() {
|
|
@@ -23692,6 +23812,12 @@ Object.defineProperty(exports, "PlaintextSecretError", {
|
|
|
23692
23812
|
return PlaintextSecretError;
|
|
23693
23813
|
}
|
|
23694
23814
|
});
|
|
23815
|
+
Object.defineProperty(exports, "PreviewDerivedEncodeResultSchema", {
|
|
23816
|
+
enumerable: true,
|
|
23817
|
+
get: function() {
|
|
23818
|
+
return PreviewDerivedEncodeResultSchema;
|
|
23819
|
+
}
|
|
23820
|
+
});
|
|
23695
23821
|
Object.defineProperty(exports, "ProfileRtspEntrySchema", {
|
|
23696
23822
|
enumerable: true,
|
|
23697
23823
|
get: function() {
|