stream-params
One of the camera's stream profiles.
One of the camera's stream profiles.
At a glance
| Capability | stream-params |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | camera |
| Device settings | Yes: its settings section on the device page is built from this capability's methods. |
| Source | packages/types/src/capabilities/stream-params.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
getOptions | query | yes | default |
setProfile | mutation | yes | admin |
getConfigSchema | query | yes | default |
getOptions
query
Input
No fields besides deviceId.
Output
| Field | Type | Required | Description |
|---|---|---|---|
main | { resolutions: ({ width: number; height: number })[]; codecs: ("h264" | "h265")[]; framerates: number[]; bitrates: number[]; bitrateRange?: [number, number]; supportsBitrateMode: boolean; supportsEncoderProfile: boolean;… | no | |
sub | { resolutions: ({ width: number; height: number })[]; codecs: ("h264" | "h265")[]; framerates: number[]; bitrates: number[]; bitrateRange?: [number, number]; supportsBitrateMode: boolean; supportsEncoderProfile: boolean;… | no | |
ext | { resolutions: ({ width: number; height: number })[]; codecs: ("h264" | "h265")[]; framerates: number[]; bitrates: number[]; bitrateRange?: [number, number]; supportsBitrateMode: boolean; supportsEncoderProfile: boolean;… | no |
setProfile
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
profile | "main" | "sub" | "ext" | yes | |
patch | { width?: number; height?: number; codec?: "h264" | "h265"; framerate?: number; bitrate?: number; bitrateMode?: "vbr" | "cbr"; encoderProfile?: "high" | "main" | "baseline"; gop?: number } | yes |
Output
Nothing.
getConfigSchema
query
Build the ConfigUISchema (admin-ui ConfigFormBuilder input shape) for this camera's stream-encoder settings — one section per profile (main / sub / ext) with the resolution / codec / framerate / bitrate / bitrate-mode / encoder-profile / GOP controls the firmware actually exposes.
Driven by getOptions (camera-probed availability) + getStatus (current per-profile config); each field's default is seeded from the live config so the form renders the camera state in one pass. Returns null when the camera exposes no configurable stream property — the renderer then shows the unsupported message.
Output is z.unknown().nullable() — the same convention every other ConfigUISchema-returning cap method uses (device-ops, device-manager); ConfigUISchema is a TS-only type with no companion Zod schema, and a concrete object would collapse unrelated AppRouter branches to unknown during codegen.
Input
No fields besides deviceId.
Output
unknown | null
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
| Field | Type | Required | Description |
|---|---|---|---|
main | { width: number; height: number; codec: "h264" | "h265"; framerate: number; bitrate: number; bitrateMode?: "vbr" | "cbr"; encoderProfile?: "high" | "main" | "baseline"; gop?: number; audio?: boolean } | no | Per-profile current config. A profile absent = the camera doesn't have it. |
sub | { width: number; height: number; codec: "h264" | "h265"; framerate: number; bitrate: number; bitrateMode?: "vbr" | "cbr"; encoderProfile?: "high" | "main" | "baseline"; gop?: number; audio?: boolean } | no | |
ext | { width: number; height: number; codec: "h264" | "h265"; framerate: number; bitrate: number; bitrateMode?: "vbr" | "cbr"; encoderProfile?: "high" | "main" | "baseline"; gop?: number; audio?: boolean } | no | |
lastFetchedAt | number | yes |