@camstack/addon-pipeline 0.1.20 → 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.
- package/dist/audio-analyzer/index.js +736 -719
- package/dist/audio-analyzer/index.mjs +726 -679
- package/dist/audio-codec-nodeav/index.js +304 -461
- package/dist/audio-codec-nodeav/index.mjs +300 -462
- package/dist/chunk-BdkLduGY.mjs +5 -0
- package/dist/chunk-D6vf50IK.js +28 -0
- package/dist/codec-runtime-BOk-13PN.js +202 -0
- package/dist/codec-runtime-BsqlEjPi.mjs +197 -0
- package/dist/constants-B_b0a-6h.mjs +3119 -0
- package/dist/{index-CMcx_k6Y.js → constants-D65v6yp6.js} +3107 -2935
- package/dist/decoder-nodeav/index.js +1374 -1444
- package/dist/decoder-nodeav/index.mjs +1369 -1425
- package/dist/detection-pipeline/index.js +6462 -5613
- package/dist/detection-pipeline/index.mjs +6451 -5574
- package/dist/dist-7ewQjTle.js +22454 -0
- package/dist/dist-C5jnNl0n.mjs +22089 -0
- package/dist/motion-wasm/index.js +469 -467
- package/dist/motion-wasm/index.mjs +464 -446
- package/dist/pipeline-runner/index.js +2029 -1827
- package/dist/pipeline-runner/index.mjs +2025 -1811
- package/dist/recorder/index.js +2045 -2157
- package/dist/recorder/index.mjs +2042 -2156
- package/dist/stream-broker/_stub.js +1806 -1352
- package/dist/stream-broker/_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D4-DHanK.mjs +156 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Tf-HACFd.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C9WX5HNw.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs +26 -0
- package/dist/stream-broker/dist-CYZr2fwk.mjs +2726 -0
- package/dist/stream-broker/hostInit-Di6vceAU.mjs +129 -0
- package/dist/stream-broker/index.js +17778 -15470
- package/dist/stream-broker/index.mjs +17769 -15465
- package/dist/stream-broker/remoteEntry.js +134 -2973
- package/dist/stream-broker/remoteEntry.ssr.js +33 -0
- package/dist/stream-broker/virtualExposes-dYNvIwoR.mjs +27 -0
- package/dist/stream-broker/virtual_mf-exposes-ssr___mfe_internal__addon_stream_broker_widgets__remoteEntry_js-Cmqfp4i_.mjs +10 -0
- package/embed-dist/assets/index-B8VlSD0-.js +150 -0
- package/embed-dist/assets/index-ZhDdp1Nd.css +2 -0
- package/embed-dist/index.html +13 -0
- package/package.json +25 -7
- package/wasm/assembly/index.ts +41 -16
- package/dist/audio-analyzer/index.js.map +0 -1
- package/dist/audio-analyzer/index.mjs.map +0 -1
- package/dist/audio-codec-nodeav/index.js.map +0 -1
- package/dist/audio-codec-nodeav/index.mjs.map +0 -1
- package/dist/decoder-nodeav/index.js.map +0 -1
- package/dist/decoder-nodeav/index.mjs.map +0 -1
- package/dist/detection-pipeline/index.js.map +0 -1
- package/dist/detection-pipeline/index.mjs.map +0 -1
- package/dist/index-5aYef068.mjs +0 -17514
- package/dist/index-5aYef068.mjs.map +0 -1
- package/dist/index-B36NMAdu.js +0 -17513
- package/dist/index-B36NMAdu.js.map +0 -1
- package/dist/index-CMcx_k6Y.js.map +0 -1
- package/dist/index-CYb7cFrv.mjs +0 -5790
- package/dist/index-CYb7cFrv.mjs.map +0 -1
- package/dist/motion-wasm/index.js.map +0 -1
- package/dist/motion-wasm/index.mjs.map +0 -1
- package/dist/pipeline-runner/index.js.map +0 -1
- package/dist/pipeline-runner/index.mjs.map +0 -1
- package/dist/recorder/index.js.map +0 -1
- package/dist/recorder/index.mjs.map +0 -1
- package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/FfmpegParamsField.d.ts +0 -41
- package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/GeometryBuilder.d.ts +0 -54
- package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/StreamBrokerPanel.d.ts +0 -21
- package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/format-ua.d.ts +0 -13
- package/dist/stream-broker/@mf-types/compiled-types/stream-broker/widgets/index.d.ts +0 -15
- package/dist/stream-broker/@mf-types/widgets.d.ts +0 -2
- package/dist/stream-broker/@mf-types.d.ts +0 -3
- package/dist/stream-broker/@mf-types.zip +0 -0
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-lantnv8e.mjs +0 -12
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-DJ3UNg7O.mjs +0 -30
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-CYXy_bhS.mjs +0 -21
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-U1EUeEPs.mjs +0 -104
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DeouEaSs.mjs +0 -85
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-DHUwjbb9.mjs +0 -62
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs-CaDEYBIU.mjs +0 -89
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-D6EROtlA.mjs +0 -29
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-x6pP3Ghk.mjs +0 -36
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs-DYEKzzY-.mjs +0 -45
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CcnN6sbA.mjs +0 -6
- package/dist/stream-broker/__mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DICOtMTl.mjs +0 -34
- package/dist/stream-broker/_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CL9DR49k.mjs +0 -156
- package/dist/stream-broker/client-BvTmMOQu.mjs +0 -9836
- package/dist/stream-broker/getErrorShape-BPSzUA7W-TlK8ipWe.mjs +0 -211
- package/dist/stream-broker/hostInit-ChmiMPS0.mjs +0 -168
- package/dist/stream-broker/index-BxsFuFmE.mjs +0 -2603
- package/dist/stream-broker/index-C-248uOU.mjs +0 -725
- package/dist/stream-broker/index-C05B6jqp.mjs +0 -185
- package/dist/stream-broker/index-CWkKuNLr.mjs +0 -232
- package/dist/stream-broker/index-DOJoSShD.mjs +0 -67784
- package/dist/stream-broker/index-DtOI1aTU.mjs +0 -18504
- package/dist/stream-broker/index-oMq6ilgR.mjs +0 -1641
- package/dist/stream-broker/index-vIWZQBIL.mjs +0 -435
- package/dist/stream-broker/index-xncRG7-x.mjs +0 -2713
- package/dist/stream-broker/index.js.map +0 -1
- package/dist/stream-broker/index.mjs.map +0 -1
- package/dist/stream-broker/jsx-runtime-BRT_HL0A.mjs +0 -55
- package/dist/stream-broker/schemas-B7L0qZtq.mjs +0 -3599
- package/dist/stream-broker/virtualExposes-pCd777Rp.mjs +0 -42
|
@@ -1,1382 +1,1836 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
...c
|
|
92
|
-
})
|
|
93
|
-
);
|
|
94
|
-
return n.displayName = Y(t), n;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* @license lucide-react v0.511.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/
|
|
102
|
-
const Fe = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], X = T("chevron-down", Fe);
|
|
103
|
-
/**
|
|
104
|
-
* @license lucide-react v0.511.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/
|
|
109
|
-
const Pe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Q = T("chevron-right", Pe);
|
|
110
|
-
/**
|
|
111
|
-
* @license lucide-react v0.511.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/
|
|
116
|
-
const Be = [
|
|
117
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
118
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
119
|
-
], Oe = T("plus", Be);
|
|
120
|
-
/**
|
|
121
|
-
* @license lucide-react v0.511.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/
|
|
126
|
-
const De = [
|
|
127
|
-
["path", { d: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9", key: "1vaf9d" }],
|
|
128
|
-
["path", { d: "M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5", key: "u1ii0m" }],
|
|
129
|
-
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
|
|
130
|
-
["path", { d: "M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5", key: "1j5fej" }],
|
|
131
|
-
["path", { d: "M19.1 4.9C23 8.8 23 15.1 19.1 19", key: "10b0cb" }]
|
|
132
|
-
], Me = T("radio", De);
|
|
133
|
-
/**
|
|
134
|
-
* @license lucide-react v0.511.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/
|
|
139
|
-
const Ee = [
|
|
140
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
141
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
142
|
-
], Ke = T("x", Ee);
|
|
143
|
-
function Re(t) {
|
|
144
|
-
const a = [];
|
|
145
|
-
if (t.crop && a.push(`crop=${t.crop.w}:${t.crop.h}:${t.crop.x}:${t.crop.y}`), t.targetAspect && t.width !== void 0 && t.height !== void 0) {
|
|
146
|
-
const n = t.targetAspect.replace(":", "/");
|
|
147
|
-
t.mode === "pad" ? (a.push(`scale=${t.width}:${t.height}:force_original_aspect_ratio=decrease`), a.push(`pad=${t.width}:${t.height}:(ow-iw)/2:(oh-ih)/2`)) : (a.push(`scale=${t.width}:${t.height}:force_original_aspect_ratio=increase`), a.push(`crop=${t.width}:${t.height}`)), a.push(`setdar=${n}`);
|
|
148
|
-
}
|
|
149
|
-
return t.rotate === 90 ? a.push("transpose=1") : t.rotate === 270 ? a.push("transpose=2") : t.rotate === 180 && a.push("hflip", "vflip"), t.hflip && t.rotate !== 180 && a.push("hflip"), t.vflip && t.rotate !== 180 && a.push("vflip"), a.join(",");
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react__loadShare__.js-C9j-2lBe.mjs";
|
|
2
|
+
import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m, u as h } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C9WX5HNw.mjs";
|
|
3
|
+
import { n as g, r as _, t as v } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-XO0-Pyu6.mjs";
|
|
4
|
+
import { n as y, t as b } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-BO7TIbJV.mjs";
|
|
5
|
+
import { t as x } from "./_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Tf-HACFd.mjs";
|
|
6
|
+
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
7
|
+
var S = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), C = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), w = (e) => {
|
|
8
|
+
let t = C(e);
|
|
9
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
10
|
+
}, T = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), E = (e) => {
|
|
11
|
+
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
12
|
+
}, D = {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 24,
|
|
15
|
+
height: 24,
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: 2,
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
strokeLinejoin: "round"
|
|
22
|
+
}, O = n(({ color: e = "currentColor", size: t = 24, strokeWidth: n = 2, absoluteStrokeWidth: r, className: i = "", children: o, iconNode: s, ...c }, l) => a("svg", {
|
|
23
|
+
ref: l,
|
|
24
|
+
...D,
|
|
25
|
+
width: t,
|
|
26
|
+
height: t,
|
|
27
|
+
stroke: e,
|
|
28
|
+
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
29
|
+
className: T("lucide", i),
|
|
30
|
+
...!o && !E(c) && { "aria-hidden": "true" },
|
|
31
|
+
...c
|
|
32
|
+
}, [...s.map(([e, t]) => a(e, t)), ...Array.isArray(o) ? o : [o]])), k = (e, t) => {
|
|
33
|
+
let r = n(({ className: n, ...r }, i) => a(O, {
|
|
34
|
+
ref: i,
|
|
35
|
+
iconNode: t,
|
|
36
|
+
className: T(`lucide-${S(w(e))}`, `lucide-${e}`, n),
|
|
37
|
+
...r
|
|
38
|
+
}));
|
|
39
|
+
return r.displayName = w(e), r;
|
|
40
|
+
}, A = k("chevron-down", [["path", {
|
|
41
|
+
d: "m6 9 6 6 6-6",
|
|
42
|
+
key: "qrunsl"
|
|
43
|
+
}]]), j = k("chevron-right", [["path", {
|
|
44
|
+
d: "m9 18 6-6-6-6",
|
|
45
|
+
key: "mthhwq"
|
|
46
|
+
}]]), ee = k("plus", [["path", {
|
|
47
|
+
d: "M5 12h14",
|
|
48
|
+
key: "1ays0h"
|
|
49
|
+
}], ["path", {
|
|
50
|
+
d: "M12 5v14",
|
|
51
|
+
key: "s699le"
|
|
52
|
+
}]]), te = k("radio", [
|
|
53
|
+
["path", {
|
|
54
|
+
d: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9",
|
|
55
|
+
key: "1vaf9d"
|
|
56
|
+
}],
|
|
57
|
+
["path", {
|
|
58
|
+
d: "M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",
|
|
59
|
+
key: "u1ii0m"
|
|
60
|
+
}],
|
|
61
|
+
["circle", {
|
|
62
|
+
cx: "12",
|
|
63
|
+
cy: "12",
|
|
64
|
+
r: "2",
|
|
65
|
+
key: "1c9p78"
|
|
66
|
+
}],
|
|
67
|
+
["path", {
|
|
68
|
+
d: "M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",
|
|
69
|
+
key: "1j5fej"
|
|
70
|
+
}],
|
|
71
|
+
["path", {
|
|
72
|
+
d: "M19.1 4.9C23 8.8 23 15.1 19.1 19",
|
|
73
|
+
key: "10b0cb"
|
|
74
|
+
}]
|
|
75
|
+
]), ne = k("x", [["path", {
|
|
76
|
+
d: "M18 6 6 18",
|
|
77
|
+
key: "1bl5f8"
|
|
78
|
+
}], ["path", {
|
|
79
|
+
d: "m6 6 12 12",
|
|
80
|
+
key: "d8bk6v"
|
|
81
|
+
}]]);
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/stream-broker/widgets/GeometryBuilder.tsx
|
|
84
|
+
function re(e) {
|
|
85
|
+
let t = [];
|
|
86
|
+
if (e.crop && t.push(`crop=${e.crop.w}:${e.crop.h}:${e.crop.x}:${e.crop.y}`), e.targetAspect && e.width !== void 0 && e.height !== void 0) {
|
|
87
|
+
let n = e.targetAspect.replace(":", "/");
|
|
88
|
+
e.mode === "pad" ? (t.push(`scale=${e.width}:${e.height}:force_original_aspect_ratio=decrease`), t.push(`pad=${e.width}:${e.height}:(ow-iw)/2:(oh-ih)/2`)) : (t.push(`scale=${e.width}:${e.height}:force_original_aspect_ratio=increase`), t.push(`crop=${e.width}:${e.height}`)), t.push(`setdar=${n}`);
|
|
89
|
+
}
|
|
90
|
+
return e.rotate === 90 ? t.push("transpose=1") : e.rotate === 270 ? t.push("transpose=2") : e.rotate === 180 && t.push("hflip", "vflip"), e.hflip && e.rotate !== 180 && t.push("hflip"), e.vflip && e.rotate !== 180 && t.push("vflip"), t.join(",");
|
|
150
91
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
92
|
+
function ie(e, t) {
|
|
93
|
+
let n = [];
|
|
94
|
+
for (let t = 0; t < e.length; t++) {
|
|
95
|
+
if (e[t] === "-vf") {
|
|
96
|
+
t++;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
let r = e[t];
|
|
100
|
+
r !== void 0 && n.push(r);
|
|
101
|
+
}
|
|
102
|
+
return t.length > 0 && n.push("-vf", t), n;
|
|
162
103
|
}
|
|
163
|
-
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
104
|
+
var M = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium";
|
|
105
|
+
function ae({ outputArgs: e, onChange: t }) {
|
|
106
|
+
let [n, i] = r(""), [a, o] = r("pad"), [s, c] = r("1920"), [l, u] = r("1080"), [d, f] = r(!1), [p, m] = r("0"), [h, y] = r("0"), [b, x] = r("0"), [S, C] = r("0"), [w, T] = r(0), [E, D] = r(!1), [O, k] = r(!1), A = re((() => {
|
|
107
|
+
let e = {
|
|
108
|
+
rotate: w,
|
|
109
|
+
hflip: E,
|
|
110
|
+
vflip: O
|
|
111
|
+
};
|
|
112
|
+
return n !== "" && (e.targetAspect = n, e.mode = a, e.width = Number(s), e.height = Number(l)), d && (e.crop = {
|
|
113
|
+
x: Number(p),
|
|
114
|
+
y: Number(h),
|
|
115
|
+
w: Number(b),
|
|
116
|
+
h: Number(S)
|
|
117
|
+
}), e;
|
|
118
|
+
})());
|
|
119
|
+
return /* @__PURE__ */ _("div", {
|
|
120
|
+
className: "space-y-2 rounded border border-border/50 bg-surface-2/30 px-3 py-2",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ _("div", {
|
|
123
|
+
className: "flex items-center justify-between",
|
|
124
|
+
children: [/* @__PURE__ */ _("span", {
|
|
125
|
+
className: M,
|
|
126
|
+
children: ["Geometry / zoom", /* @__PURE__ */ g("span", {
|
|
127
|
+
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
128
|
+
children: "composes a single -vf into output args"
|
|
129
|
+
})]
|
|
130
|
+
}), /* @__PURE__ */ g("button", {
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: () => t(ie(e, A)),
|
|
133
|
+
className: "rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
134
|
+
children: "Apply geometry"
|
|
135
|
+
})]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ _("div", {
|
|
138
|
+
className: "flex flex-wrap items-center gap-2",
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ g("label", {
|
|
141
|
+
className: M,
|
|
142
|
+
htmlFor: "geom-aspect",
|
|
143
|
+
children: "Aspect"
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ _("select", {
|
|
146
|
+
id: "geom-aspect",
|
|
147
|
+
value: n,
|
|
148
|
+
onChange: (e) => i(e.target.value),
|
|
149
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[90px]",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ g("option", {
|
|
152
|
+
value: "",
|
|
153
|
+
children: "none"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ g("option", {
|
|
156
|
+
value: "16:9",
|
|
157
|
+
children: "16:9"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ g("option", {
|
|
160
|
+
value: "4:3",
|
|
161
|
+
children: "4:3"
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ g("option", {
|
|
164
|
+
value: "1:1",
|
|
165
|
+
children: "1:1"
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
n !== "" && /* @__PURE__ */ _(v, { children: [
|
|
170
|
+
/* @__PURE__ */ _("select", {
|
|
171
|
+
"aria-label": "Aspect mode",
|
|
172
|
+
value: a,
|
|
173
|
+
onChange: (e) => o(e.target.value),
|
|
174
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
175
|
+
children: [/* @__PURE__ */ g("option", {
|
|
176
|
+
value: "pad",
|
|
177
|
+
children: "pad"
|
|
178
|
+
}), /* @__PURE__ */ g("option", {
|
|
179
|
+
value: "crop",
|
|
180
|
+
children: "crop"
|
|
181
|
+
})]
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ g("input", {
|
|
184
|
+
type: "number",
|
|
185
|
+
"aria-label": "Aspect width",
|
|
186
|
+
value: s,
|
|
187
|
+
onChange: (e) => c(e.target.value),
|
|
188
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right"
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ g("span", {
|
|
191
|
+
className: "text-[11px] text-foreground-subtle",
|
|
192
|
+
children: "×"
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ g("input", {
|
|
195
|
+
type: "number",
|
|
196
|
+
"aria-label": "Aspect height",
|
|
197
|
+
value: l,
|
|
198
|
+
onChange: (e) => u(e.target.value),
|
|
199
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right"
|
|
200
|
+
})
|
|
201
|
+
] })
|
|
202
|
+
]
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ _("div", {
|
|
205
|
+
className: "flex flex-wrap items-center gap-2",
|
|
206
|
+
children: [/* @__PURE__ */ _("label", {
|
|
207
|
+
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
208
|
+
children: [/* @__PURE__ */ g("input", {
|
|
209
|
+
type: "checkbox",
|
|
210
|
+
checked: d,
|
|
211
|
+
onChange: (e) => f(e.target.checked)
|
|
212
|
+
}), "Crop / zoom"]
|
|
213
|
+
}), d && /* @__PURE__ */ _(v, { children: [
|
|
214
|
+
/* @__PURE__ */ g("input", {
|
|
215
|
+
type: "number",
|
|
216
|
+
"aria-label": "Crop x",
|
|
217
|
+
value: p,
|
|
218
|
+
onChange: (e) => m(e.target.value),
|
|
219
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
220
|
+
placeholder: "x"
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ g("input", {
|
|
223
|
+
type: "number",
|
|
224
|
+
"aria-label": "Crop y",
|
|
225
|
+
value: h,
|
|
226
|
+
onChange: (e) => y(e.target.value),
|
|
227
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-16 text-right",
|
|
228
|
+
placeholder: "y"
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ g("input", {
|
|
231
|
+
type: "number",
|
|
232
|
+
"aria-label": "Crop width",
|
|
233
|
+
value: b,
|
|
234
|
+
onChange: (e) => x(e.target.value),
|
|
235
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right",
|
|
236
|
+
placeholder: "w"
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ g("input", {
|
|
239
|
+
type: "number",
|
|
240
|
+
"aria-label": "Crop height",
|
|
241
|
+
value: S,
|
|
242
|
+
onChange: (e) => C(e.target.value),
|
|
243
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed w-20 text-right",
|
|
244
|
+
placeholder: "h"
|
|
245
|
+
})
|
|
246
|
+
] })]
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ _("div", {
|
|
249
|
+
className: "flex flex-wrap items-center gap-2",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ g("label", {
|
|
252
|
+
className: M,
|
|
253
|
+
htmlFor: "geom-rotate",
|
|
254
|
+
children: "Rotate"
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ _("select", {
|
|
257
|
+
id: "geom-rotate",
|
|
258
|
+
value: String(w),
|
|
259
|
+
onChange: (e) => T(Number(e.target.value)),
|
|
260
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed appearance-none pr-6 min-w-[80px]",
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ g("option", {
|
|
263
|
+
value: "0",
|
|
264
|
+
children: "0°"
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ g("option", {
|
|
267
|
+
value: "90",
|
|
268
|
+
children: "90°"
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ g("option", {
|
|
271
|
+
value: "180",
|
|
272
|
+
children: "180°"
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ g("option", {
|
|
275
|
+
value: "270",
|
|
276
|
+
children: "270°"
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ _("label", {
|
|
281
|
+
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
282
|
+
children: [/* @__PURE__ */ g("input", {
|
|
283
|
+
type: "checkbox",
|
|
284
|
+
checked: E,
|
|
285
|
+
onChange: (e) => D(e.target.checked)
|
|
286
|
+
}), "hflip"]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ _("label", {
|
|
289
|
+
className: "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium inline-flex items-center gap-1",
|
|
290
|
+
children: [/* @__PURE__ */ g("input", {
|
|
291
|
+
type: "checkbox",
|
|
292
|
+
checked: O,
|
|
293
|
+
onChange: (e) => k(e.target.checked)
|
|
294
|
+
}), "vflip"]
|
|
295
|
+
})
|
|
296
|
+
]
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ _("div", {
|
|
299
|
+
className: "font-mono text-[10px] text-foreground-subtle break-all",
|
|
300
|
+
children: ["-vf ", A.length > 0 ? A : /* @__PURE__ */ g("span", {
|
|
301
|
+
className: "italic",
|
|
302
|
+
children: "(empty)"
|
|
303
|
+
})]
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
});
|
|
282
307
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/stream-broker/widgets/FfmpegParamsField.tsx
|
|
310
|
+
var N = [
|
|
311
|
+
{
|
|
312
|
+
group: "Demuxer",
|
|
313
|
+
label: "-thread_queue_size 1024",
|
|
314
|
+
args: ["-thread_queue_size", "1024"],
|
|
315
|
+
description: "Larger input packet queue (helps with high-bitrate sources)"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
group: "Demuxer",
|
|
319
|
+
label: "-fflags +genpts",
|
|
320
|
+
args: ["-fflags", "+genpts"],
|
|
321
|
+
description: "Generate PTS when the source lacks them"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
group: "Demuxer",
|
|
325
|
+
label: "-re",
|
|
326
|
+
args: ["-re"],
|
|
327
|
+
description: "Read input at native frame rate (file replay)"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
group: "Demuxer",
|
|
331
|
+
label: "-probesize 32",
|
|
332
|
+
args: ["-probesize", "32"],
|
|
333
|
+
description: "Minimal probe size — faster start"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
group: "Demuxer",
|
|
337
|
+
label: "-analyzeduration 0",
|
|
338
|
+
args: ["-analyzeduration", "0"],
|
|
339
|
+
description: "Skip stream analysis — faster start"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
group: "RTSP",
|
|
343
|
+
label: "-rtsp_transport tcp",
|
|
344
|
+
args: ["-rtsp_transport", "tcp"],
|
|
345
|
+
description: "Force TCP transport for RTSP source"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
group: "RTSP",
|
|
349
|
+
label: "-stimeout 5000000",
|
|
350
|
+
args: ["-stimeout", "5000000"],
|
|
351
|
+
description: "Socket I/O timeout (microseconds, 5s)"
|
|
352
|
+
}
|
|
353
|
+
], oe = [
|
|
354
|
+
{
|
|
355
|
+
group: "Muxer",
|
|
356
|
+
label: "-flush_packets 1",
|
|
357
|
+
args: ["-flush_packets", "1"],
|
|
358
|
+
description: "Flush each packet immediately"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
group: "Muxer",
|
|
362
|
+
label: "-movflags +faststart",
|
|
363
|
+
args: ["-movflags", "+faststart"],
|
|
364
|
+
description: "Move MOOV atom to front (MP4)"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
group: "Bitstream",
|
|
368
|
+
label: "-bsf:v h264_mp4toannexb",
|
|
369
|
+
args: ["-bsf:v", "h264_mp4toannexb"],
|
|
370
|
+
description: "Convert MP4-format H.264 to Annex-B"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
group: "Bitstream",
|
|
374
|
+
label: "-bsf:v hevc_mp4toannexb",
|
|
375
|
+
args: ["-bsf:v", "hevc_mp4toannexb"],
|
|
376
|
+
description: "Convert MP4-format HEVC to Annex-B"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
group: "x264",
|
|
380
|
+
label: "-x264-params keyint_min=15",
|
|
381
|
+
args: ["-x264-params", "keyint_min=15"],
|
|
382
|
+
description: "Force minimum keyframe interval to 15 frames"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
group: "x264",
|
|
386
|
+
label: "-x264-params scenecut=0",
|
|
387
|
+
args: ["-x264-params", "scenecut=0"],
|
|
388
|
+
description: "Disable scene-change keyframes (predictable GOP)"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
group: "x264",
|
|
392
|
+
label: "-x264-params nal-hrd=cbr",
|
|
393
|
+
args: ["-x264-params", "nal-hrd=cbr"],
|
|
394
|
+
description: "Force CBR HRD signalling (HomeKit-friendly)"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
group: "x264",
|
|
398
|
+
label: "-aq-mode 3",
|
|
399
|
+
args: ["-aq-mode", "3"],
|
|
400
|
+
description: "Auto-variance adaptive quantisation (mode 3)"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
group: "x265",
|
|
404
|
+
label: "-x265-params keyint=30",
|
|
405
|
+
args: ["-x265-params", "keyint=30"],
|
|
406
|
+
description: "Force maximum keyframe interval to 30 frames"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
group: "x265",
|
|
410
|
+
label: "-x265-params no-scenecut=1",
|
|
411
|
+
args: ["-x265-params", "no-scenecut=1"],
|
|
412
|
+
description: "Disable scene-change keyframes"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
group: "Global",
|
|
416
|
+
label: "-fps_mode passthrough",
|
|
417
|
+
args: ["-fps_mode", "passthrough"],
|
|
418
|
+
description: "Preserve source framerate exactly"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
group: "Global",
|
|
422
|
+
label: "-copyts",
|
|
423
|
+
args: ["-copyts"],
|
|
424
|
+
description: "Preserve source timestamps"
|
|
425
|
+
}
|
|
426
|
+
], se = {
|
|
427
|
+
video: { codec: "copy" },
|
|
428
|
+
audio: "passthrough"
|
|
429
|
+
}, P = "w-full rounded border border-border bg-surface-2 px-2 py-1.5 text-[11px] font-mono text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 read-only:opacity-60 min-h-[60px] resize-y", F = "flex items-center justify-between gap-3 py-1.5", I = "text-[11px] uppercase tracking-wider text-foreground-subtle font-medium", L = "rounded-lg border border-border bg-surface overflow-hidden", R = "border-b border-border px-3 py-1.5 flex items-center justify-between bg-surface-hover/30", z = "text-[11px] font-semibold text-foreground uppercase tracking-wider";
|
|
430
|
+
function ce({ config: t, value: n, onSave: i }) {
|
|
431
|
+
let [a, o] = r(!1), s = n ?? se, [c, l] = r(() => (s.inputArgs ?? []).join("\n")), [u, d] = r(() => (s.outputArgs ?? []).join("\n")), f = e(s);
|
|
432
|
+
f.current !== s && (f.current = s, l((s.inputArgs ?? []).join("\n")), d((s.outputArgs ?? []).join("\n")));
|
|
433
|
+
let p = (e) => {
|
|
434
|
+
i(e(s));
|
|
435
|
+
}, m = (e) => p((t) => ({
|
|
436
|
+
...t,
|
|
437
|
+
video: {
|
|
438
|
+
...t.video,
|
|
439
|
+
codec: e
|
|
440
|
+
}
|
|
441
|
+
})), h = (e) => p((t) => ({
|
|
442
|
+
...t,
|
|
443
|
+
video: {
|
|
444
|
+
...t.video,
|
|
445
|
+
width: e
|
|
446
|
+
}
|
|
447
|
+
})), y = (e) => p((t) => ({
|
|
448
|
+
...t,
|
|
449
|
+
video: {
|
|
450
|
+
...t.video,
|
|
451
|
+
height: e
|
|
452
|
+
}
|
|
453
|
+
})), b = (e) => p((t) => ({
|
|
454
|
+
...t,
|
|
455
|
+
video: {
|
|
456
|
+
...t.video,
|
|
457
|
+
fps: e
|
|
458
|
+
}
|
|
459
|
+
})), x = (e) => p((t) => ({
|
|
460
|
+
...t,
|
|
461
|
+
video: {
|
|
462
|
+
...t.video,
|
|
463
|
+
bitrateKbps: e
|
|
464
|
+
}
|
|
465
|
+
})), S = () => p((e) => ({
|
|
466
|
+
...e,
|
|
467
|
+
audio: "passthrough"
|
|
468
|
+
})), C = (e) => p((t) => ({
|
|
469
|
+
...t,
|
|
470
|
+
audio: typeof t.audio == "object" ? {
|
|
471
|
+
...t.audio,
|
|
472
|
+
codec: e
|
|
473
|
+
} : { codec: e }
|
|
474
|
+
})), w = (e) => p((t) => ({
|
|
475
|
+
...t,
|
|
476
|
+
audio: typeof t.audio == "object" ? {
|
|
477
|
+
...t.audio,
|
|
478
|
+
bitrateKbps: e
|
|
479
|
+
} : {
|
|
480
|
+
codec: "opus",
|
|
481
|
+
bitrateKbps: e
|
|
482
|
+
}
|
|
483
|
+
})), T = (e) => p((t) => ({
|
|
484
|
+
...t,
|
|
485
|
+
inputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
486
|
+
})), E = (e) => p((t) => ({
|
|
487
|
+
...t,
|
|
488
|
+
outputArgs: e.split("\n").map((e) => e.trim()).filter((e) => e.length > 0)
|
|
489
|
+
})), D = (e, t) => {
|
|
490
|
+
let n = t.args.join(" ");
|
|
491
|
+
if (e === "input") {
|
|
492
|
+
let e = c.length === 0 ? n : `${c}\n${n}`;
|
|
493
|
+
l(e), T(e);
|
|
494
|
+
} else {
|
|
495
|
+
let e = u.length === 0 ? n : `${u}\n${n}`;
|
|
496
|
+
d(e), E(e);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ _("div", {
|
|
500
|
+
className: "space-y-3",
|
|
501
|
+
children: [
|
|
502
|
+
t.sourceParams !== void 0 && /* @__PURE__ */ _("div", {
|
|
503
|
+
className: L,
|
|
504
|
+
children: [/* @__PURE__ */ _("div", {
|
|
505
|
+
className: R,
|
|
506
|
+
children: [/* @__PURE__ */ g("h3", {
|
|
507
|
+
className: z,
|
|
508
|
+
children: "Source (probed)"
|
|
509
|
+
}), /* @__PURE__ */ g("span", {
|
|
510
|
+
className: "text-[10px] text-foreground-subtle italic",
|
|
511
|
+
children: "From the publisher"
|
|
512
|
+
})]
|
|
513
|
+
}), /* @__PURE__ */ g("div", {
|
|
514
|
+
className: "px-3 py-2 flex flex-wrap gap-1.5",
|
|
515
|
+
children: /* @__PURE__ */ g(le, { profile: t.sourceParams })
|
|
516
|
+
})]
|
|
517
|
+
}),
|
|
518
|
+
/* @__PURE__ */ g("div", {
|
|
519
|
+
className: "@container",
|
|
520
|
+
children: /* @__PURE__ */ _("div", {
|
|
521
|
+
className: "grid grid-cols-1 @[480px]:grid-cols-2 gap-3",
|
|
522
|
+
children: [/* @__PURE__ */ _("div", {
|
|
523
|
+
className: L,
|
|
524
|
+
children: [/* @__PURE__ */ g("div", {
|
|
525
|
+
className: R,
|
|
526
|
+
children: /* @__PURE__ */ g("h3", {
|
|
527
|
+
className: z,
|
|
528
|
+
children: "Video"
|
|
529
|
+
})
|
|
530
|
+
}), /* @__PURE__ */ _("div", {
|
|
531
|
+
className: "px-3 py-2 divide-y divide-border/30",
|
|
532
|
+
children: [/* @__PURE__ */ _("div", {
|
|
533
|
+
className: F,
|
|
534
|
+
children: [/* @__PURE__ */ g("label", {
|
|
535
|
+
htmlFor: `${t.fieldKey}-video-codec`,
|
|
536
|
+
className: I,
|
|
537
|
+
children: "Codec"
|
|
538
|
+
}), /* @__PURE__ */ _("select", {
|
|
539
|
+
id: `${t.fieldKey}-video-codec`,
|
|
540
|
+
value: s.video.codec,
|
|
541
|
+
onChange: (e) => m(e.target.value),
|
|
542
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
543
|
+
children: [
|
|
544
|
+
/* @__PURE__ */ g("option", {
|
|
545
|
+
value: "h264",
|
|
546
|
+
children: "h264"
|
|
547
|
+
}),
|
|
548
|
+
/* @__PURE__ */ g("option", {
|
|
549
|
+
value: "h265",
|
|
550
|
+
children: "h265"
|
|
551
|
+
}),
|
|
552
|
+
/* @__PURE__ */ g("option", {
|
|
553
|
+
value: "copy",
|
|
554
|
+
children: "copy (passthrough)"
|
|
555
|
+
})
|
|
556
|
+
]
|
|
557
|
+
})]
|
|
558
|
+
}), s.video.codec !== "copy" && /* @__PURE__ */ _(v, { children: [
|
|
559
|
+
/* @__PURE__ */ _("div", {
|
|
560
|
+
className: F,
|
|
561
|
+
children: [/* @__PURE__ */ g("label", {
|
|
562
|
+
htmlFor: `${t.fieldKey}-video-width`,
|
|
563
|
+
className: I,
|
|
564
|
+
children: "Width"
|
|
565
|
+
}), /* @__PURE__ */ g("input", {
|
|
566
|
+
id: `${t.fieldKey}-video-width`,
|
|
567
|
+
type: "number",
|
|
568
|
+
"aria-label": "Width",
|
|
569
|
+
value: s.video.width ?? "",
|
|
570
|
+
onChange: (e) => h(Number(e.target.value)),
|
|
571
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
572
|
+
})]
|
|
573
|
+
}),
|
|
574
|
+
/* @__PURE__ */ _("div", {
|
|
575
|
+
className: F,
|
|
576
|
+
children: [/* @__PURE__ */ g("label", {
|
|
577
|
+
htmlFor: `${t.fieldKey}-video-height`,
|
|
578
|
+
className: I,
|
|
579
|
+
children: "Height"
|
|
580
|
+
}), /* @__PURE__ */ g("input", {
|
|
581
|
+
id: `${t.fieldKey}-video-height`,
|
|
582
|
+
type: "number",
|
|
583
|
+
value: s.video.height ?? "",
|
|
584
|
+
onChange: (e) => y(Number(e.target.value)),
|
|
585
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
586
|
+
})]
|
|
587
|
+
}),
|
|
588
|
+
/* @__PURE__ */ _("div", {
|
|
589
|
+
className: F,
|
|
590
|
+
children: [/* @__PURE__ */ g("label", {
|
|
591
|
+
htmlFor: `${t.fieldKey}-video-fps`,
|
|
592
|
+
className: I,
|
|
593
|
+
children: "FPS"
|
|
594
|
+
}), /* @__PURE__ */ g("input", {
|
|
595
|
+
id: `${t.fieldKey}-video-fps`,
|
|
596
|
+
type: "number",
|
|
597
|
+
value: s.video.fps ?? "",
|
|
598
|
+
onChange: (e) => b(Number(e.target.value)),
|
|
599
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
600
|
+
})]
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ _("div", {
|
|
603
|
+
className: F,
|
|
604
|
+
children: [/* @__PURE__ */ g("label", {
|
|
605
|
+
htmlFor: `${t.fieldKey}-video-bitrate`,
|
|
606
|
+
className: I,
|
|
607
|
+
children: "Bitrate (kbps)"
|
|
608
|
+
}), /* @__PURE__ */ g("input", {
|
|
609
|
+
id: `${t.fieldKey}-video-bitrate`,
|
|
610
|
+
type: "number",
|
|
611
|
+
value: s.video.bitrateKbps ?? "",
|
|
612
|
+
onChange: (e) => x(Number(e.target.value)),
|
|
613
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
614
|
+
})]
|
|
615
|
+
})
|
|
616
|
+
] })]
|
|
617
|
+
})]
|
|
618
|
+
}), /* @__PURE__ */ _("div", {
|
|
619
|
+
className: L,
|
|
620
|
+
children: [/* @__PURE__ */ g("div", {
|
|
621
|
+
className: R,
|
|
622
|
+
children: /* @__PURE__ */ g("h3", {
|
|
623
|
+
className: z,
|
|
624
|
+
children: "Audio"
|
|
625
|
+
})
|
|
626
|
+
}), /* @__PURE__ */ g("div", {
|
|
627
|
+
className: "px-3 py-2",
|
|
628
|
+
children: s.audio === "passthrough" ? /* @__PURE__ */ _("div", {
|
|
629
|
+
className: "flex items-center justify-between gap-3",
|
|
630
|
+
children: [/* @__PURE__ */ g("span", {
|
|
631
|
+
className: "text-[11px] text-foreground-subtle italic",
|
|
632
|
+
children: "Source audio forwarded without re-encode."
|
|
633
|
+
}), /* @__PURE__ */ g("button", {
|
|
634
|
+
type: "button",
|
|
635
|
+
onClick: () => C("opus"),
|
|
636
|
+
className: "rounded-md border border-border bg-surface-hover px-2 py-1 text-[11px] text-foreground hover:bg-surface-hover/70 transition-colors",
|
|
637
|
+
children: "Switch to custom encode"
|
|
638
|
+
})]
|
|
639
|
+
}) : /* @__PURE__ */ _("div", {
|
|
640
|
+
className: "divide-y divide-border/30",
|
|
641
|
+
children: [
|
|
642
|
+
/* @__PURE__ */ _("div", {
|
|
643
|
+
className: F,
|
|
644
|
+
children: [/* @__PURE__ */ g("label", {
|
|
645
|
+
htmlFor: `${t.fieldKey}-audio-codec`,
|
|
646
|
+
className: I,
|
|
647
|
+
children: "Codec"
|
|
648
|
+
}), /* @__PURE__ */ _("select", {
|
|
649
|
+
id: `${t.fieldKey}-audio-codec`,
|
|
650
|
+
value: s.audio.codec,
|
|
651
|
+
onChange: (e) => C(e.target.value),
|
|
652
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed appearance-none pr-6 min-w-[120px]",
|
|
653
|
+
children: [
|
|
654
|
+
/* @__PURE__ */ g("option", {
|
|
655
|
+
value: "opus",
|
|
656
|
+
children: "opus"
|
|
657
|
+
}),
|
|
658
|
+
/* @__PURE__ */ g("option", {
|
|
659
|
+
value: "aac",
|
|
660
|
+
children: "aac"
|
|
661
|
+
}),
|
|
662
|
+
/* @__PURE__ */ g("option", {
|
|
663
|
+
value: "pcmu",
|
|
664
|
+
children: "pcmu"
|
|
665
|
+
}),
|
|
666
|
+
/* @__PURE__ */ g("option", {
|
|
667
|
+
value: "pcma",
|
|
668
|
+
children: "pcma"
|
|
669
|
+
}),
|
|
670
|
+
/* @__PURE__ */ g("option", {
|
|
671
|
+
value: "copy",
|
|
672
|
+
children: "copy (passthrough)"
|
|
673
|
+
})
|
|
674
|
+
]
|
|
675
|
+
})]
|
|
676
|
+
}),
|
|
677
|
+
/* @__PURE__ */ _("div", {
|
|
678
|
+
className: F,
|
|
679
|
+
children: [/* @__PURE__ */ g("label", {
|
|
680
|
+
htmlFor: `${t.fieldKey}-audio-bitrate`,
|
|
681
|
+
className: I,
|
|
682
|
+
children: "Bitrate (kbps)"
|
|
683
|
+
}), /* @__PURE__ */ g("input", {
|
|
684
|
+
id: `${t.fieldKey}-audio-bitrate`,
|
|
685
|
+
type: "number",
|
|
686
|
+
value: s.audio.bitrateKbps ?? "",
|
|
687
|
+
onChange: (e) => w(Number(e.target.value)),
|
|
688
|
+
className: "rounded border border-border bg-surface-2 px-2 py-1 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed read-only:opacity-60 read-only:cursor-not-allowed w-24 text-right"
|
|
689
|
+
})]
|
|
690
|
+
}),
|
|
691
|
+
/* @__PURE__ */ g("div", {
|
|
692
|
+
className: "pt-2",
|
|
693
|
+
children: /* @__PURE__ */ g("button", {
|
|
694
|
+
type: "button",
|
|
695
|
+
onClick: S,
|
|
696
|
+
className: "text-[11px] text-foreground-subtle hover:text-foreground underline-offset-2 hover:underline",
|
|
697
|
+
children: "Switch back to passthrough"
|
|
698
|
+
})
|
|
699
|
+
})
|
|
700
|
+
]
|
|
701
|
+
})
|
|
702
|
+
})]
|
|
703
|
+
})]
|
|
704
|
+
})
|
|
705
|
+
}),
|
|
706
|
+
/* @__PURE__ */ _("div", {
|
|
707
|
+
className: L,
|
|
708
|
+
children: [/* @__PURE__ */ _("button", {
|
|
709
|
+
type: "button",
|
|
710
|
+
onClick: () => o((e) => !e),
|
|
711
|
+
className: "w-full px-3 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
712
|
+
children: [/* @__PURE__ */ _("span", {
|
|
713
|
+
className: "inline-flex items-center gap-1.5 text-[11px] font-semibold text-foreground uppercase tracking-wider",
|
|
714
|
+
children: [g(a ? A : j, { className: "h-3 w-3" }), "Advanced — raw ffmpeg args"]
|
|
715
|
+
}), /* @__PURE__ */ _("span", {
|
|
716
|
+
className: "text-[10px] text-foreground-subtle italic",
|
|
717
|
+
children: [(s.inputArgs?.length ?? 0) + (s.outputArgs?.length ?? 0), " args"]
|
|
718
|
+
})]
|
|
719
|
+
}), a && /* @__PURE__ */ _("div", {
|
|
720
|
+
className: "px-3 py-2 space-y-3 border-t border-border/50",
|
|
721
|
+
children: [
|
|
722
|
+
/* @__PURE__ */ _("div", {
|
|
723
|
+
className: "space-y-1.5",
|
|
724
|
+
children: [/* @__PURE__ */ _("div", {
|
|
725
|
+
className: "flex items-center justify-between",
|
|
726
|
+
children: [/* @__PURE__ */ _("label", {
|
|
727
|
+
htmlFor: `${t.fieldKey}-input-args`,
|
|
728
|
+
className: I,
|
|
729
|
+
children: ["Input args", /* @__PURE__ */ g("span", {
|
|
730
|
+
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
731
|
+
children: "one per line · inserted between globals and -i"
|
|
732
|
+
})]
|
|
733
|
+
}), /* @__PURE__ */ g(B, {
|
|
734
|
+
id: `${t.fieldKey}-input-picker`,
|
|
735
|
+
disabled: !1,
|
|
736
|
+
catalogue: N,
|
|
737
|
+
onPick: (e) => D("input", e)
|
|
738
|
+
})]
|
|
739
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
740
|
+
id: `${t.fieldKey}-input-args`,
|
|
741
|
+
value: c,
|
|
742
|
+
onChange: (e) => l(e.target.value),
|
|
743
|
+
onBlur: (e) => T(e.target.value),
|
|
744
|
+
placeholder: "-thread_queue_size 1024",
|
|
745
|
+
className: P
|
|
746
|
+
})]
|
|
747
|
+
}),
|
|
748
|
+
/* @__PURE__ */ g(ae, {
|
|
749
|
+
outputArgs: s.outputArgs ?? [],
|
|
750
|
+
onChange: (e) => {
|
|
751
|
+
d(e.join("\n")), E(e.join("\n"));
|
|
752
|
+
}
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ _("div", {
|
|
755
|
+
className: "space-y-1.5",
|
|
756
|
+
children: [/* @__PURE__ */ _("div", {
|
|
757
|
+
className: "flex items-center justify-between",
|
|
758
|
+
children: [/* @__PURE__ */ _("label", {
|
|
759
|
+
htmlFor: `${t.fieldKey}-output-args`,
|
|
760
|
+
className: I,
|
|
761
|
+
children: ["Output args", /* @__PURE__ */ g("span", {
|
|
762
|
+
className: "ml-2 text-[10px] normal-case text-foreground-subtle italic",
|
|
763
|
+
children: "one per line · inserted before the final muxer"
|
|
764
|
+
})]
|
|
765
|
+
}), /* @__PURE__ */ g(B, {
|
|
766
|
+
id: `${t.fieldKey}-output-picker`,
|
|
767
|
+
disabled: !1,
|
|
768
|
+
catalogue: oe,
|
|
769
|
+
onPick: (e) => D("output", e)
|
|
770
|
+
})]
|
|
771
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
772
|
+
id: `${t.fieldKey}-output-args`,
|
|
773
|
+
value: u,
|
|
774
|
+
onChange: (e) => d(e.target.value),
|
|
775
|
+
onBlur: (e) => E(e.target.value),
|
|
776
|
+
placeholder: "-bsf:v h264_mp4toannexb",
|
|
777
|
+
className: P
|
|
778
|
+
})]
|
|
779
|
+
})
|
|
780
|
+
]
|
|
781
|
+
})]
|
|
782
|
+
})
|
|
783
|
+
]
|
|
784
|
+
});
|
|
568
785
|
}
|
|
569
|
-
function
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
786
|
+
function le({ profile: e }) {
|
|
787
|
+
let t = "inline-flex items-center gap-1 rounded-full bg-foreground-subtle/10 border border-border px-2 py-0.5 text-[11px] font-mono text-foreground-subtle", { video: n, audio: r } = e, i = n.width !== void 0 && n.height !== void 0 ? `${n.width}×${n.height}` : void 0;
|
|
788
|
+
return /* @__PURE__ */ _(v, { children: [
|
|
789
|
+
/* @__PURE__ */ _("span", {
|
|
790
|
+
className: t,
|
|
791
|
+
children: [/* @__PURE__ */ g("span", {
|
|
792
|
+
className: "opacity-60",
|
|
793
|
+
children: "codec"
|
|
794
|
+
}), n.codec]
|
|
795
|
+
}),
|
|
796
|
+
i !== void 0 && /* @__PURE__ */ _("span", {
|
|
797
|
+
className: t,
|
|
798
|
+
children: [/* @__PURE__ */ g("span", {
|
|
799
|
+
className: "opacity-60",
|
|
800
|
+
children: "res"
|
|
801
|
+
}), i]
|
|
802
|
+
}),
|
|
803
|
+
n.fps !== void 0 && /* @__PURE__ */ _("span", {
|
|
804
|
+
className: t,
|
|
805
|
+
children: [/* @__PURE__ */ g("span", {
|
|
806
|
+
className: "opacity-60",
|
|
807
|
+
children: "fps"
|
|
808
|
+
}), n.fps]
|
|
809
|
+
}),
|
|
810
|
+
n.bitrateKbps !== void 0 && /* @__PURE__ */ _("span", {
|
|
811
|
+
className: t,
|
|
812
|
+
children: [
|
|
813
|
+
/* @__PURE__ */ g("span", {
|
|
814
|
+
className: "opacity-60",
|
|
815
|
+
children: "bitrate"
|
|
816
|
+
}),
|
|
817
|
+
n.bitrateKbps,
|
|
818
|
+
"k"
|
|
819
|
+
]
|
|
820
|
+
}),
|
|
821
|
+
r === "passthrough" ? /* @__PURE__ */ _("span", {
|
|
822
|
+
className: t,
|
|
823
|
+
children: [/* @__PURE__ */ g("span", {
|
|
824
|
+
className: "opacity-60",
|
|
825
|
+
children: "audio"
|
|
826
|
+
}), "passthrough"]
|
|
827
|
+
}) : /* @__PURE__ */ _(v, { children: [
|
|
828
|
+
/* @__PURE__ */ _("span", {
|
|
829
|
+
className: t,
|
|
830
|
+
children: [/* @__PURE__ */ g("span", {
|
|
831
|
+
className: "opacity-60",
|
|
832
|
+
children: "audio"
|
|
833
|
+
}), r.codec]
|
|
834
|
+
}),
|
|
835
|
+
r.bitrateKbps !== void 0 && /* @__PURE__ */ _("span", {
|
|
836
|
+
className: t,
|
|
837
|
+
children: [
|
|
838
|
+
/* @__PURE__ */ g("span", {
|
|
839
|
+
className: "opacity-60",
|
|
840
|
+
children: "a-bitrate"
|
|
841
|
+
}),
|
|
842
|
+
r.bitrateKbps,
|
|
843
|
+
"k"
|
|
844
|
+
]
|
|
845
|
+
}),
|
|
846
|
+
r.sampleRateHz !== void 0 && /* @__PURE__ */ _("span", {
|
|
847
|
+
className: t,
|
|
848
|
+
children: [
|
|
849
|
+
/* @__PURE__ */ g("span", {
|
|
850
|
+
className: "opacity-60",
|
|
851
|
+
children: "a-sr"
|
|
852
|
+
}),
|
|
853
|
+
r.sampleRateHz,
|
|
854
|
+
"Hz"
|
|
855
|
+
]
|
|
856
|
+
}),
|
|
857
|
+
r.channels !== void 0 && /* @__PURE__ */ _("span", {
|
|
858
|
+
className: t,
|
|
859
|
+
children: [/* @__PURE__ */ g("span", {
|
|
860
|
+
className: "opacity-60",
|
|
861
|
+
children: "a-ch"
|
|
862
|
+
}), r.channels]
|
|
863
|
+
})
|
|
864
|
+
] })
|
|
865
|
+
] });
|
|
613
866
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
867
|
+
function ue(e) {
|
|
868
|
+
let t = e.config ?? {}, n = m(), [a, o] = r(() => t.initialValue), s = i((r) => {
|
|
869
|
+
if (o(r), e.deviceId === void 0) return;
|
|
870
|
+
let i = t.writerCapName, a = t.writerAddonId, s = t.fieldKey;
|
|
871
|
+
if (i === void 0 || a === void 0 || s === void 0) {
|
|
872
|
+
console.warn(`[ffmpeg-params] widgetConfig is missing writerCapName/writerAddonId/fieldKey — field ${s ?? "(unknown)"} cannot be saved. Fix the contribution builder.`);
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
n.mutate({
|
|
876
|
+
deviceId: e.deviceId,
|
|
877
|
+
writerCapName: i,
|
|
878
|
+
writerAddonId: a,
|
|
879
|
+
key: s,
|
|
880
|
+
value: r ?? null
|
|
881
|
+
});
|
|
882
|
+
}, [
|
|
883
|
+
e.deviceId,
|
|
884
|
+
t.fieldKey,
|
|
885
|
+
t.writerCapName,
|
|
886
|
+
t.writerAddonId,
|
|
887
|
+
n
|
|
888
|
+
]);
|
|
889
|
+
if (e.deviceId === void 0) return /* @__PURE__ */ g("div", {
|
|
890
|
+
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
891
|
+
children: "ffmpeg-params: no deviceId in widget context — this widget only renders inside a device tab."
|
|
892
|
+
});
|
|
893
|
+
let c = t.fieldKey;
|
|
894
|
+
return c === void 0 || c.length === 0 ? /* @__PURE__ */ g("div", {
|
|
895
|
+
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
896
|
+
children: "ffmpeg-params: widgetConfig.fieldKey is required — fix the contribution builder."
|
|
897
|
+
}) : /* @__PURE__ */ g(ce, {
|
|
898
|
+
config: {
|
|
899
|
+
...t,
|
|
900
|
+
fieldKey: c
|
|
901
|
+
},
|
|
902
|
+
value: a,
|
|
903
|
+
onSave: s
|
|
904
|
+
});
|
|
645
905
|
}
|
|
646
|
-
function
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
))
|
|
694
|
-
] }, l))
|
|
695
|
-
}
|
|
696
|
-
)
|
|
697
|
-
] })
|
|
698
|
-
] });
|
|
906
|
+
function B({ id: e, disabled: n, catalogue: i, onPick: a }) {
|
|
907
|
+
let [o, s] = r(!1), c = t(() => {
|
|
908
|
+
let e = /* @__PURE__ */ new Map();
|
|
909
|
+
for (let t of i) {
|
|
910
|
+
let n = e.get(t.group) ?? [];
|
|
911
|
+
n.push(t), e.set(t.group, n);
|
|
912
|
+
}
|
|
913
|
+
return e;
|
|
914
|
+
}, [i]);
|
|
915
|
+
return /* @__PURE__ */ _("div", {
|
|
916
|
+
className: "relative",
|
|
917
|
+
children: [/* @__PURE__ */ _("button", {
|
|
918
|
+
id: e,
|
|
919
|
+
type: "button",
|
|
920
|
+
disabled: n,
|
|
921
|
+
onClick: () => s((e) => !e),
|
|
922
|
+
className: "inline-flex items-center gap-1 rounded-md border border-border bg-surface-hover px-2 py-0.5 text-[10px] font-medium text-foreground-subtle hover:bg-surface-hover/70 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
923
|
+
children: [/* @__PURE__ */ g(ee, { className: "h-3 w-3" }), "Add flag…"]
|
|
924
|
+
}), o && !n && /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g("div", {
|
|
925
|
+
className: "fixed inset-0 z-40",
|
|
926
|
+
onClick: () => s(!1),
|
|
927
|
+
"aria-hidden": "true"
|
|
928
|
+
}), /* @__PURE__ */ g("div", {
|
|
929
|
+
className: "absolute right-0 top-full z-50 mt-1 max-h-72 w-72 overflow-y-auto rounded-lg border border-border bg-surface shadow-lg",
|
|
930
|
+
role: "menu",
|
|
931
|
+
children: Array.from(c.entries()).map(([e, t]) => /* @__PURE__ */ _("div", {
|
|
932
|
+
className: "border-b border-border/30 last:border-b-0",
|
|
933
|
+
children: [/* @__PURE__ */ g("div", {
|
|
934
|
+
className: "sticky top-0 bg-surface-hover/80 backdrop-blur px-2 py-1 text-[9px] font-semibold uppercase tracking-wider text-foreground-subtle",
|
|
935
|
+
children: e
|
|
936
|
+
}), t.map((e) => /* @__PURE__ */ _("button", {
|
|
937
|
+
type: "button",
|
|
938
|
+
onClick: () => {
|
|
939
|
+
a(e), s(!1);
|
|
940
|
+
},
|
|
941
|
+
className: "w-full text-left px-2 py-1.5 hover:bg-surface-hover transition-colors group",
|
|
942
|
+
children: [/* @__PURE__ */ g("div", {
|
|
943
|
+
className: "font-mono text-[11px] text-foreground",
|
|
944
|
+
children: e.label
|
|
945
|
+
}), e.description !== void 0 && /* @__PURE__ */ g("div", {
|
|
946
|
+
className: "text-[10px] text-foreground-subtle leading-snug mt-0.5",
|
|
947
|
+
children: e.description
|
|
948
|
+
})]
|
|
949
|
+
}, e.label))]
|
|
950
|
+
}, e))
|
|
951
|
+
})] })]
|
|
952
|
+
});
|
|
699
953
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
954
|
+
//#endregion
|
|
955
|
+
//#region src/stream-broker/widgets/format-ua.ts
|
|
956
|
+
var V = 24;
|
|
957
|
+
function H(e) {
|
|
958
|
+
return /\bEdg\b|\bEdgA\b|\bEdgiOS\b|Edge\//.test(e) ? "Edge" : /\bOPR\b|Opera/.test(e) ? "Opera" : /Firefox\/|\bFxiOS\b/.test(e) ? "Firefox" : /Chrome\/|\bCriOS\b/.test(e) ? "Chrome" : /Safari\//.test(e) ? "Safari" : null;
|
|
703
959
|
}
|
|
704
|
-
function
|
|
705
|
-
|
|
960
|
+
function de(e) {
|
|
961
|
+
return /iPhone|iPad|iPod|\biOS\b|CriOS|FxiOS/.test(e) ? "iOS" : /Mac OS X|Macintosh/.test(e) ? "macOS" : /Windows/.test(e) ? "Windows" : /Android/.test(e) ? "Android" : /Linux/.test(e) ? "Linux" : null;
|
|
706
962
|
}
|
|
707
|
-
function
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
963
|
+
function fe(e) {
|
|
964
|
+
let t = e.trim();
|
|
965
|
+
if (t.length === 0) return "";
|
|
966
|
+
let n = H(t), r = de(t);
|
|
967
|
+
return n && r ? `${n}/${r}` : n || r || (t.length > V ? `${t.slice(0, V)}…` : t);
|
|
712
968
|
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region src/stream-broker/widgets/StreamBrokerPanel.tsx
|
|
971
|
+
function pe(e) {
|
|
972
|
+
let t = Math.floor(e / 1e3);
|
|
973
|
+
if (t < 60) return `${t}s`;
|
|
974
|
+
let n = Math.floor(t / 60);
|
|
975
|
+
return n < 60 ? `${n}m` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
718
976
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
977
|
+
var U = {
|
|
978
|
+
high: "High",
|
|
979
|
+
mid: "Mid",
|
|
980
|
+
low: "Low"
|
|
981
|
+
}, W = [
|
|
982
|
+
"high",
|
|
983
|
+
"mid",
|
|
984
|
+
"low"
|
|
985
|
+
], me = {
|
|
986
|
+
alexa: "bg-blue-500/15 text-blue-400",
|
|
987
|
+
homekit: "bg-purple-500/15 text-purple-400",
|
|
988
|
+
"webrtc-browser": "bg-emerald-500/15 text-emerald-400",
|
|
989
|
+
"webrtc-mobile": "bg-emerald-500/15 text-emerald-400",
|
|
990
|
+
"webrtc-whep": "bg-emerald-500/15 text-emerald-400",
|
|
991
|
+
"rtsp-listen": "bg-warning/15 text-warning",
|
|
992
|
+
"derived-broker": "bg-amber-500/15 text-amber-400",
|
|
993
|
+
recording: "bg-rose-500/15 text-rose-400",
|
|
994
|
+
pipeline: "bg-cyan-500/15 text-cyan-400",
|
|
995
|
+
snapshot: "bg-cyan-500/15 text-cyan-400",
|
|
996
|
+
warmup: "bg-foreground-subtle/10 text-foreground-subtle",
|
|
997
|
+
unknown: "bg-foreground-subtle/10 text-foreground-subtle"
|
|
998
|
+
}, G = {
|
|
999
|
+
alexa: "ALEXA",
|
|
1000
|
+
homekit: "HOMEKIT",
|
|
1001
|
+
"webrtc-browser": "BROWSER",
|
|
1002
|
+
"webrtc-mobile": "MOBILE",
|
|
1003
|
+
"webrtc-whep": "WHEP",
|
|
1004
|
+
"rtsp-listen": "RTSP",
|
|
1005
|
+
"derived-broker": "DERIVED",
|
|
1006
|
+
recording: "RECORD",
|
|
1007
|
+
pipeline: "PIPELINE",
|
|
1008
|
+
snapshot: "SNAP",
|
|
1009
|
+
warmup: "WARMUP",
|
|
1010
|
+
unknown: "—"
|
|
749
1011
|
};
|
|
750
|
-
function
|
|
751
|
-
|
|
1012
|
+
function he(e) {
|
|
1013
|
+
return G[e] ?? e.toUpperCase().slice(0, 8);
|
|
752
1014
|
}
|
|
753
|
-
function
|
|
754
|
-
|
|
1015
|
+
function ge(e) {
|
|
1016
|
+
return G[e] ?? e;
|
|
755
1017
|
}
|
|
756
|
-
function
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
1018
|
+
function _e(e) {
|
|
1019
|
+
let t = e.config ?? {};
|
|
1020
|
+
return e.deviceId === void 0 ? /* @__PURE__ */ g("div", {
|
|
1021
|
+
className: "rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning",
|
|
1022
|
+
children: "StreamBrokerPanel requires a deviceId"
|
|
1023
|
+
}) : /* @__PURE__ */ g(ve, {
|
|
1024
|
+
deviceId: e.deviceId,
|
|
1025
|
+
title: t.title,
|
|
1026
|
+
variant: t.variant,
|
|
1027
|
+
hideEmpty: t.hideEmpty
|
|
1028
|
+
});
|
|
767
1029
|
}
|
|
768
|
-
function
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
camStreams: u
|
|
832
|
-
}
|
|
833
|
-
)
|
|
834
|
-
] });
|
|
1030
|
+
function ve({ deviceId: e, title: t = "Stream Brokers", variant: n = "full", hideEmpty: r = !1 }) {
|
|
1031
|
+
f(["streamBroker", "listAllProfileSlots"], [
|
|
1032
|
+
"device.streams-registered",
|
|
1033
|
+
"device.streams-unregistered",
|
|
1034
|
+
"device.registered",
|
|
1035
|
+
"device.unregistered"
|
|
1036
|
+
]);
|
|
1037
|
+
let { data: i } = s(void 0, { staleTime: 3e4 }), a = (i ?? []).filter((t) => t.deviceId === e && t.sourceCamStreamId !== null).slice().toSorted((e, t) => W.indexOf(e.profile) - W.indexOf(t.profile)), o = u(h().trpcClient, e), { data: c } = b({
|
|
1038
|
+
queryKey: [
|
|
1039
|
+
"device",
|
|
1040
|
+
e,
|
|
1041
|
+
"cameraStreams.getCameraStreams"
|
|
1042
|
+
],
|
|
1043
|
+
queryFn: () => o?.cameraStreams?.getCameraStreams({}) ?? [],
|
|
1044
|
+
enabled: !!o,
|
|
1045
|
+
staleTime: 3e4
|
|
1046
|
+
}), l = /* @__PURE__ */ new Map();
|
|
1047
|
+
for (let e of c ?? []) l.set(e.camStreamId, e);
|
|
1048
|
+
let d = new Set(a.map((e) => e.sourceCamStreamId).filter((e) => e !== null)), p = (c ?? []).filter((e) => !d.has(e.camStreamId)), m = a.length > 0, v = p.length > 0;
|
|
1049
|
+
return r && !m && !v ? null : n === "compact" ? m ? /* @__PURE__ */ g("div", {
|
|
1050
|
+
className: "divide-y divide-border/30",
|
|
1051
|
+
children: a.map((e) => /* @__PURE__ */ g(q, {
|
|
1052
|
+
slot: e,
|
|
1053
|
+
camStreams: l,
|
|
1054
|
+
compact: !0
|
|
1055
|
+
}, e.brokerId))
|
|
1056
|
+
}) : /* @__PURE__ */ g("div", {
|
|
1057
|
+
className: "text-[11px] text-foreground-subtle italic px-2 py-1",
|
|
1058
|
+
children: "No active profile slots"
|
|
1059
|
+
}) : /* @__PURE__ */ _("div", {
|
|
1060
|
+
className: "rounded-lg border border-border bg-surface overflow-hidden",
|
|
1061
|
+
children: [
|
|
1062
|
+
/* @__PURE__ */ _("div", {
|
|
1063
|
+
className: "border-b border-border px-4 py-2 flex items-center justify-between",
|
|
1064
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
1065
|
+
className: "text-xs font-semibold text-foreground uppercase tracking-wider",
|
|
1066
|
+
children: t
|
|
1067
|
+
}), m && /* @__PURE__ */ _("span", {
|
|
1068
|
+
className: "inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border",
|
|
1069
|
+
children: [a.length, " assigned"]
|
|
1070
|
+
})]
|
|
1071
|
+
}),
|
|
1072
|
+
m ? /* @__PURE__ */ g("div", {
|
|
1073
|
+
className: "divide-y divide-border/30",
|
|
1074
|
+
children: a.map((e) => /* @__PURE__ */ g(q, {
|
|
1075
|
+
slot: e,
|
|
1076
|
+
camStreams: l,
|
|
1077
|
+
compact: !1
|
|
1078
|
+
}, e.brokerId))
|
|
1079
|
+
}) : /* @__PURE__ */ _("div", {
|
|
1080
|
+
className: "px-4 py-6 flex flex-col items-center text-center text-foreground-subtle",
|
|
1081
|
+
children: [/* @__PURE__ */ g(te, { className: "h-5 w-5 mb-2 opacity-30" }), /* @__PURE__ */ g("p", {
|
|
1082
|
+
className: "text-xs",
|
|
1083
|
+
children: "No profile slots assigned for this device"
|
|
1084
|
+
})]
|
|
1085
|
+
}),
|
|
1086
|
+
v && /* @__PURE__ */ g(ye, {
|
|
1087
|
+
deviceId: e,
|
|
1088
|
+
camStreamIds: p.map((e) => e.camStreamId),
|
|
1089
|
+
camStreams: l
|
|
1090
|
+
})
|
|
1091
|
+
]
|
|
1092
|
+
});
|
|
835
1093
|
}
|
|
836
|
-
function
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
deviceId: t,
|
|
862
|
-
camStreamId: s,
|
|
863
|
-
camStreams: n
|
|
864
|
-
},
|
|
865
|
-
s
|
|
866
|
-
)) })
|
|
867
|
-
] });
|
|
1094
|
+
function ye({ deviceId: e, camStreamIds: t, camStreams: n }) {
|
|
1095
|
+
let [i, a] = r(!1);
|
|
1096
|
+
return /* @__PURE__ */ _("div", {
|
|
1097
|
+
className: "border-t border-border/50",
|
|
1098
|
+
children: [/* @__PURE__ */ _("button", {
|
|
1099
|
+
type: "button",
|
|
1100
|
+
onClick: () => a((e) => !e),
|
|
1101
|
+
className: "w-full px-4 py-1.5 flex items-center justify-between bg-surface-hover/30 hover:bg-surface-hover transition-colors",
|
|
1102
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1103
|
+
className: "inline-flex items-center gap-1.5 text-[11px] uppercase tracking-wider text-foreground-subtle",
|
|
1104
|
+
children: [g(i ? A : j, { className: "h-3 w-3" }), "Other active streams"]
|
|
1105
|
+
}), /* @__PURE__ */ g("span", {
|
|
1106
|
+
className: "rounded-full px-2 py-0.5 text-[10px] font-medium bg-foreground-subtle/10 text-foreground-subtle border border-border",
|
|
1107
|
+
children: t.length
|
|
1108
|
+
})]
|
|
1109
|
+
}), i && /* @__PURE__ */ g("div", {
|
|
1110
|
+
className: "divide-y divide-border/30",
|
|
1111
|
+
children: t.map((t) => /* @__PURE__ */ g(be, {
|
|
1112
|
+
deviceId: e,
|
|
1113
|
+
camStreamId: t,
|
|
1114
|
+
camStreams: n
|
|
1115
|
+
}, t))
|
|
1116
|
+
})]
|
|
1117
|
+
});
|
|
868
1118
|
}
|
|
869
|
-
function
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1119
|
+
function be({ deviceId: e, camStreamId: t, camStreams: n }) {
|
|
1120
|
+
let r = x(e, t), i = c("stream-broker.metrics-snapshot", (e) => e.brokerId === r)?.stats, a = n.get(t), o = i?.status === "streaming";
|
|
1121
|
+
return /* @__PURE__ */ _("div", {
|
|
1122
|
+
className: "px-4 py-2",
|
|
1123
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1124
|
+
className: "flex items-center justify-between mb-1",
|
|
1125
|
+
children: /* @__PURE__ */ _("div", {
|
|
1126
|
+
className: "flex items-center gap-1.5",
|
|
1127
|
+
children: [
|
|
1128
|
+
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${o ? "bg-success" : "bg-foreground-subtle/40"}` }),
|
|
1129
|
+
/* @__PURE__ */ g("span", {
|
|
1130
|
+
className: "text-[11px] font-medium text-foreground",
|
|
1131
|
+
children: a?.label ?? t
|
|
1132
|
+
}),
|
|
1133
|
+
a?.resolution && /* @__PURE__ */ _("span", {
|
|
1134
|
+
className: "text-[10px] text-foreground-subtle",
|
|
1135
|
+
children: [
|
|
1136
|
+
a.resolution.width,
|
|
1137
|
+
"×",
|
|
1138
|
+
a.resolution.height
|
|
1139
|
+
]
|
|
1140
|
+
}),
|
|
1141
|
+
/* @__PURE__ */ g("span", {
|
|
1142
|
+
className: `text-[10px] ${o ? "text-success" : "text-foreground-subtle"}`,
|
|
1143
|
+
children: i?.status ?? "idle"
|
|
1144
|
+
})
|
|
1145
|
+
]
|
|
1146
|
+
})
|
|
1147
|
+
}), i && o && /* @__PURE__ */ _("div", {
|
|
1148
|
+
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ _("span", {
|
|
1151
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1152
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1153
|
+
className: "text-foreground-subtle",
|
|
1154
|
+
children: "FPS:"
|
|
1155
|
+
}), /* @__PURE__ */ g("span", {
|
|
1156
|
+
className: "text-foreground",
|
|
1157
|
+
children: i.inputFps.toFixed(1)
|
|
1158
|
+
})]
|
|
1159
|
+
}),
|
|
1160
|
+
/* @__PURE__ */ _("span", {
|
|
1161
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1162
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1163
|
+
className: "text-foreground-subtle",
|
|
1164
|
+
children: "Bitrate:"
|
|
1165
|
+
}), /* @__PURE__ */ g("span", {
|
|
1166
|
+
className: "text-foreground",
|
|
1167
|
+
children: i.bitrateKbps >= 1e3 ? `${(i.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${i.bitrateKbps} kbps`
|
|
1168
|
+
})]
|
|
1169
|
+
}),
|
|
1170
|
+
/* @__PURE__ */ _("span", {
|
|
1171
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1172
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1173
|
+
className: "text-foreground-subtle",
|
|
1174
|
+
children: "Codec:"
|
|
1175
|
+
}), /* @__PURE__ */ g("span", {
|
|
1176
|
+
className: "text-foreground",
|
|
1177
|
+
children: i.codec?.toUpperCase() ?? "—"
|
|
1178
|
+
})]
|
|
1179
|
+
}),
|
|
1180
|
+
/* @__PURE__ */ _("span", {
|
|
1181
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1182
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1183
|
+
className: "text-foreground-subtle",
|
|
1184
|
+
children: "Pkts:"
|
|
1185
|
+
}), /* @__PURE__ */ g("span", {
|
|
1186
|
+
className: "text-foreground",
|
|
1187
|
+
children: i.packetCount > 1e3 ? `${(i.packetCount / 1e3).toFixed(1)}k` : i.packetCount
|
|
1188
|
+
})]
|
|
1189
|
+
})
|
|
1190
|
+
]
|
|
1191
|
+
})]
|
|
1192
|
+
});
|
|
906
1193
|
}
|
|
907
|
-
function
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
if (Array.isArray(o.fields))
|
|
928
|
-
for (const c of o.fields) {
|
|
929
|
-
const s = n(c);
|
|
930
|
-
if (s !== void 0) return s;
|
|
931
|
-
}
|
|
1194
|
+
function K(e, t) {
|
|
1195
|
+
let n = (e) => {
|
|
1196
|
+
if (!e || typeof e != "object") return;
|
|
1197
|
+
let r = e;
|
|
1198
|
+
if (typeof r.key == "string" && r.key === t && "value" in r) return r.value;
|
|
1199
|
+
if (r.type === "group" && Array.isArray(r.fields)) for (let e of r.fields) {
|
|
1200
|
+
let t = n(e);
|
|
1201
|
+
if (t !== void 0) return t;
|
|
1202
|
+
}
|
|
1203
|
+
else if (r.type === "sub-tabs" && Array.isArray(r.tabs)) {
|
|
1204
|
+
for (let e of r.tabs) if (Array.isArray(e.fields)) for (let t of e.fields) {
|
|
1205
|
+
let e = n(t);
|
|
1206
|
+
if (e !== void 0) return e;
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
for (let t of e?.sections ?? []) if (Array.isArray(t.fields)) for (let e of t.fields) {
|
|
1211
|
+
let t = n(e);
|
|
1212
|
+
if (t !== void 0) return t;
|
|
1213
|
+
}
|
|
932
1214
|
}
|
|
933
|
-
function
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1215
|
+
function q({ slot: e, camStreams: t, compact: n }) {
|
|
1216
|
+
let r = y(), a = c("stream-broker.metrics-snapshot", (t) => t.brokerId === e.brokerId)?.stats;
|
|
1217
|
+
f(["streamBroker", "listClients"], ["stream-broker.metrics-snapshot"]);
|
|
1218
|
+
let { data: s } = l({ brokerId: e.brokerId }, {
|
|
1219
|
+
enabled: a?.status === "streaming",
|
|
1220
|
+
staleTime: 2e3
|
|
1221
|
+
}), { data: u } = d({ deviceId: e.deviceId }, { staleTime: 15e3 }), m = e.sourceCamStreamId ?? e.profile, h = !!(K(u, `preBufferEnabled:${m}`) ?? !0), b = K(u, `preBufferSec:${m}`), x = o({ onSuccess: () => {
|
|
1222
|
+
r.invalidateQueries({ queryKey: [["streamBroker", "getDeviceSettingsContribution"]] });
|
|
1223
|
+
} }), S = (t) => {
|
|
1224
|
+
x.mutate({
|
|
1225
|
+
deviceId: e.deviceId,
|
|
1226
|
+
patch: { [`preBufferEnabled:${m}`]: t }
|
|
1227
|
+
});
|
|
1228
|
+
}, C = p({ onSuccess: () => {
|
|
1229
|
+
r.invalidateQueries({ queryKey: [["streamBroker", "listClients"]] });
|
|
1230
|
+
} }), w = i((t) => {
|
|
1231
|
+
C.mutate({
|
|
1232
|
+
brokerId: e.brokerId,
|
|
1233
|
+
...t
|
|
1234
|
+
});
|
|
1235
|
+
}, [C, e.brokerId]), T = (e.sourceCamStreamId ? t.get(e.sourceCamStreamId) : void 0)?.resolution ?? e.resolution, E = a?.status === "streaming", D = T ? `${U[e.profile]} (${T.width}×${T.height})` : U[e.profile], O = a ? a.encodedSubscribers + a.decodedSubscribers + (a.rtspClients ?? 0) + (a.pipeClients ?? 0) : 0;
|
|
1236
|
+
return /* @__PURE__ */ _("div", {
|
|
1237
|
+
className: `@container ${n ? "px-3 py-1.5" : "px-4 py-2"}`,
|
|
1238
|
+
style: { containerType: "inline-size" },
|
|
1239
|
+
children: [
|
|
1240
|
+
/* @__PURE__ */ _("div", {
|
|
1241
|
+
className: "flex items-center justify-between mb-1.5",
|
|
1242
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1243
|
+
className: "flex items-center gap-1.5",
|
|
1244
|
+
children: [
|
|
1245
|
+
/* @__PURE__ */ g("span", { className: `h-1.5 w-1.5 rounded-full ${E ? e.profile === "high" ? "bg-success" : e.profile === "mid" ? "bg-warning" : "bg-foreground-subtle" : "bg-foreground-subtle/40"}` }),
|
|
1246
|
+
/* @__PURE__ */ g("span", {
|
|
1247
|
+
className: "text-[11px] font-medium text-foreground",
|
|
1248
|
+
children: D
|
|
1249
|
+
}),
|
|
1250
|
+
/* @__PURE__ */ g("span", {
|
|
1251
|
+
className: `text-[10px] ${E ? "text-success" : "text-foreground-subtle"}`,
|
|
1252
|
+
children: a?.status ?? "loading"
|
|
1253
|
+
}),
|
|
1254
|
+
e.sourceCamStreamId && /* @__PURE__ */ _("span", {
|
|
1255
|
+
className: "text-[10px] text-foreground-subtle",
|
|
1256
|
+
children: ["← ", e.sourceCamStreamId]
|
|
1257
|
+
})
|
|
1258
|
+
]
|
|
1259
|
+
}), /* @__PURE__ */ g("span", {
|
|
1260
|
+
className: "text-[10px] text-foreground-subtle",
|
|
1261
|
+
children: a && a.uptimeMs > 0 ? pe(a.uptimeMs) : "—"
|
|
1262
|
+
})]
|
|
1263
|
+
}),
|
|
1264
|
+
a && E ? n ? /* @__PURE__ */ _("div", {
|
|
1265
|
+
className: "flex flex-wrap gap-x-3 gap-y-0.5 text-[10px]",
|
|
1266
|
+
children: [
|
|
1267
|
+
/* @__PURE__ */ _("span", {
|
|
1268
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1269
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1270
|
+
className: "text-foreground-subtle",
|
|
1271
|
+
children: "FPS:"
|
|
1272
|
+
}), /* @__PURE__ */ _("span", {
|
|
1273
|
+
className: "text-foreground",
|
|
1274
|
+
children: [
|
|
1275
|
+
a.inputFps.toFixed(1),
|
|
1276
|
+
"/",
|
|
1277
|
+
a.decodeFps.toFixed(1)
|
|
1278
|
+
]
|
|
1279
|
+
})]
|
|
1280
|
+
}),
|
|
1281
|
+
/* @__PURE__ */ _("span", {
|
|
1282
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1283
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1284
|
+
className: "text-foreground-subtle",
|
|
1285
|
+
children: "Bitrate:"
|
|
1286
|
+
}), /* @__PURE__ */ g("span", {
|
|
1287
|
+
className: "text-foreground",
|
|
1288
|
+
children: a.bitrateKbps >= 1e3 ? `${(a.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${a.bitrateKbps} kbps`
|
|
1289
|
+
})]
|
|
1290
|
+
}),
|
|
1291
|
+
/* @__PURE__ */ _("span", {
|
|
1292
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1293
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1294
|
+
className: "text-foreground-subtle",
|
|
1295
|
+
children: "Codec:"
|
|
1296
|
+
}), /* @__PURE__ */ g("span", {
|
|
1297
|
+
className: "text-foreground",
|
|
1298
|
+
children: a.codec?.toUpperCase() ?? "—"
|
|
1299
|
+
})]
|
|
1300
|
+
}),
|
|
1301
|
+
/* @__PURE__ */ _("span", {
|
|
1302
|
+
className: "inline-flex items-center whitespace-nowrap gap-1",
|
|
1303
|
+
children: [
|
|
1304
|
+
/* @__PURE__ */ g("span", {
|
|
1305
|
+
className: "text-foreground-subtle",
|
|
1306
|
+
children: "Clients:"
|
|
1307
|
+
}),
|
|
1308
|
+
/* @__PURE__ */ g("span", {
|
|
1309
|
+
className: "text-foreground font-semibold",
|
|
1310
|
+
children: O
|
|
1311
|
+
}),
|
|
1312
|
+
/* @__PURE__ */ g("span", {
|
|
1313
|
+
className: "text-foreground-subtle/70",
|
|
1314
|
+
children: "("
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ g(Ce, {
|
|
1317
|
+
count: a.encodedSubscribers + a.decodedSubscribers,
|
|
1318
|
+
clients: s,
|
|
1319
|
+
onKill: w
|
|
1320
|
+
}),
|
|
1321
|
+
/* @__PURE__ */ g("span", {
|
|
1322
|
+
className: "text-foreground-subtle/70",
|
|
1323
|
+
children: "·"
|
|
1324
|
+
}),
|
|
1325
|
+
/* @__PURE__ */ g(Te, {
|
|
1326
|
+
count: a.rtspClients ?? 0,
|
|
1327
|
+
clients: s,
|
|
1328
|
+
onKill: w
|
|
1329
|
+
}),
|
|
1330
|
+
/* @__PURE__ */ _("span", {
|
|
1331
|
+
className: "text-foreground-subtle/70",
|
|
1332
|
+
children: [
|
|
1333
|
+
"· pipe ",
|
|
1334
|
+
a.pipeClients ?? 0,
|
|
1335
|
+
")"
|
|
1336
|
+
]
|
|
1337
|
+
})
|
|
1338
|
+
]
|
|
1339
|
+
})
|
|
1340
|
+
]
|
|
1341
|
+
}) : /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ _("div", {
|
|
1342
|
+
className: "flex flex-wrap gap-x-3 gap-y-1 text-[10px]",
|
|
1343
|
+
children: [
|
|
1344
|
+
/* @__PURE__ */ _("span", {
|
|
1345
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1346
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1347
|
+
className: "text-foreground-subtle",
|
|
1348
|
+
children: "In:"
|
|
1349
|
+
}), /* @__PURE__ */ _("span", {
|
|
1350
|
+
className: "text-foreground",
|
|
1351
|
+
children: [a.inputFps.toFixed(1), " fps"]
|
|
1352
|
+
})]
|
|
1353
|
+
}),
|
|
1354
|
+
/* @__PURE__ */ _("span", {
|
|
1355
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1356
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1357
|
+
className: "text-foreground-subtle",
|
|
1358
|
+
children: "Dec:"
|
|
1359
|
+
}), /* @__PURE__ */ _("span", {
|
|
1360
|
+
className: "text-foreground",
|
|
1361
|
+
children: [a.decodeFps.toFixed(1), " fps"]
|
|
1362
|
+
})]
|
|
1363
|
+
}),
|
|
1364
|
+
/* @__PURE__ */ _("span", {
|
|
1365
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1366
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1367
|
+
className: "text-foreground-subtle",
|
|
1368
|
+
children: "Bitrate:"
|
|
1369
|
+
}), /* @__PURE__ */ g("span", {
|
|
1370
|
+
className: "text-foreground",
|
|
1371
|
+
children: a.bitrateKbps >= 1e3 ? `${(a.bitrateKbps / 1e3).toFixed(1)} Mbps` : `${a.bitrateKbps} kbps`
|
|
1372
|
+
})]
|
|
1373
|
+
}),
|
|
1374
|
+
/* @__PURE__ */ _("span", {
|
|
1375
|
+
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1",
|
|
1376
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1377
|
+
className: "text-foreground-subtle",
|
|
1378
|
+
children: "IDR:"
|
|
1379
|
+
}), /* @__PURE__ */ g("span", {
|
|
1380
|
+
className: "text-foreground",
|
|
1381
|
+
children: a.idrIntervalMs > 0 ? `${(a.idrIntervalMs / 1e3).toFixed(1)}s` : "—"
|
|
1382
|
+
})]
|
|
1383
|
+
}),
|
|
1384
|
+
/* @__PURE__ */ _("span", {
|
|
1385
|
+
className: "inline-flex whitespace-nowrap gap-1",
|
|
1386
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1387
|
+
className: "text-foreground-subtle",
|
|
1388
|
+
children: "Codec:"
|
|
1389
|
+
}), /* @__PURE__ */ g("span", {
|
|
1390
|
+
className: "text-foreground",
|
|
1391
|
+
children: a.codec?.toUpperCase() ?? "—"
|
|
1392
|
+
})]
|
|
1393
|
+
}),
|
|
1394
|
+
/* @__PURE__ */ _("span", {
|
|
1395
|
+
className: "hidden @[480px]:inline-flex whitespace-nowrap gap-1 max-w-full overflow-hidden",
|
|
1396
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1397
|
+
className: "text-foreground-subtle",
|
|
1398
|
+
children: "Decoder:"
|
|
1399
|
+
}), /* @__PURE__ */ g("span", {
|
|
1400
|
+
className: "text-foreground font-mono truncate",
|
|
1401
|
+
children: a.decoderNodeId ?? /* @__PURE__ */ g("span", {
|
|
1402
|
+
className: "text-foreground-subtle italic",
|
|
1403
|
+
children: "deferred"
|
|
1404
|
+
})
|
|
1405
|
+
})]
|
|
1406
|
+
}),
|
|
1407
|
+
/* @__PURE__ */ _("span", {
|
|
1408
|
+
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1409
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1410
|
+
className: "text-foreground-subtle",
|
|
1411
|
+
children: "Pipe:"
|
|
1412
|
+
}), /* @__PURE__ */ g("span", {
|
|
1413
|
+
className: "text-foreground",
|
|
1414
|
+
children: a.pipeClients ?? 0
|
|
1415
|
+
})]
|
|
1416
|
+
}),
|
|
1417
|
+
/* @__PURE__ */ _("span", {
|
|
1418
|
+
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1419
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1420
|
+
className: "text-foreground-subtle",
|
|
1421
|
+
children: "Packets:"
|
|
1422
|
+
}), /* @__PURE__ */ g("span", {
|
|
1423
|
+
className: "text-foreground",
|
|
1424
|
+
children: a.packetCount > 1e3 ? `${(a.packetCount / 1e3).toFixed(1)}k` : a.packetCount
|
|
1425
|
+
})]
|
|
1426
|
+
}),
|
|
1427
|
+
/* @__PURE__ */ _("span", {
|
|
1428
|
+
className: "hidden @[640px]:inline-flex whitespace-nowrap gap-1",
|
|
1429
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1430
|
+
className: "text-foreground-subtle",
|
|
1431
|
+
children: "Data:"
|
|
1432
|
+
}), /* @__PURE__ */ g("span", {
|
|
1433
|
+
className: "text-foreground",
|
|
1434
|
+
children: a.totalBytes > 1048576 ? `${(a.totalBytes / 1048576).toFixed(1)} MB` : `${(a.totalBytes / 1024).toFixed(0)} KB`
|
|
1435
|
+
})]
|
|
1436
|
+
}),
|
|
1437
|
+
a.audio && /* @__PURE__ */ _("div", {
|
|
1438
|
+
className: "basis-full flex flex-wrap items-center gap-x-1.5 gap-y-0.5",
|
|
1439
|
+
children: [
|
|
1440
|
+
/* @__PURE__ */ g("span", {
|
|
1441
|
+
className: "text-foreground-subtle whitespace-nowrap",
|
|
1442
|
+
children: "Audio:"
|
|
1443
|
+
}),
|
|
1444
|
+
/* @__PURE__ */ _("span", {
|
|
1445
|
+
className: "inline-flex whitespace-nowrap items-center gap-1.5",
|
|
1446
|
+
children: [
|
|
1447
|
+
/* @__PURE__ */ g("span", {
|
|
1448
|
+
className: "text-foreground",
|
|
1449
|
+
children: a.audio.codec.toUpperCase()
|
|
1450
|
+
}),
|
|
1451
|
+
/* @__PURE__ */ g("span", {
|
|
1452
|
+
className: "text-foreground-subtle",
|
|
1453
|
+
children: "·"
|
|
1454
|
+
}),
|
|
1455
|
+
/* @__PURE__ */ g("span", {
|
|
1456
|
+
className: "text-foreground",
|
|
1457
|
+
children: a.audio.sampleRate >= 1e3 ? `${(a.audio.sampleRate / 1e3).toFixed(a.audio.sampleRate % 1e3 == 0 ? 0 : 1)}kHz` : `${a.audio.sampleRate}Hz`
|
|
1458
|
+
}),
|
|
1459
|
+
/* @__PURE__ */ g("span", {
|
|
1460
|
+
className: "text-foreground-subtle",
|
|
1461
|
+
children: "·"
|
|
1462
|
+
}),
|
|
1463
|
+
/* @__PURE__ */ g("span", {
|
|
1464
|
+
className: "text-foreground",
|
|
1465
|
+
children: a.audio.channels === 1 ? "mono" : a.audio.channels === 2 ? "stereo" : `${a.audio.channels}ch`
|
|
1466
|
+
})
|
|
1467
|
+
]
|
|
1468
|
+
}),
|
|
1469
|
+
/* @__PURE__ */ g("span", {
|
|
1470
|
+
className: `px-1 py-px rounded text-[8px] font-medium whitespace-nowrap ${a.audio.supported ? "bg-success/15 text-success" : "bg-amber-500/15 text-amber-500"}`,
|
|
1471
|
+
children: a.audio.supported ? "decoded" : "no decoder"
|
|
1472
|
+
})
|
|
1473
|
+
]
|
|
1474
|
+
})
|
|
1475
|
+
]
|
|
1476
|
+
}), /* @__PURE__ */ g(Se, {
|
|
1477
|
+
clients: s,
|
|
1478
|
+
encodedCount: a.encodedSubscribers,
|
|
1479
|
+
onKill: w
|
|
1480
|
+
})] }) : /* @__PURE__ */ g("p", {
|
|
1481
|
+
className: "text-[10px] text-foreground-subtle italic",
|
|
1482
|
+
children: "No demand — stream suspended"
|
|
1483
|
+
}),
|
|
1484
|
+
/* @__PURE__ */ _("div", {
|
|
1485
|
+
className: "mt-1.5 flex items-center gap-1.5 text-[10px]",
|
|
1486
|
+
children: [
|
|
1487
|
+
/* @__PURE__ */ g("span", {
|
|
1488
|
+
className: "text-foreground-subtle",
|
|
1489
|
+
children: "Buffer:"
|
|
1490
|
+
}),
|
|
1491
|
+
/* @__PURE__ */ g(we, {
|
|
1492
|
+
enabled: h,
|
|
1493
|
+
onToggle: (e) => S(e),
|
|
1494
|
+
disabled: x.isPending
|
|
1495
|
+
}),
|
|
1496
|
+
/* @__PURE__ */ _("span", {
|
|
1497
|
+
className: "text-foreground",
|
|
1498
|
+
children: [
|
|
1499
|
+
b ?? a?.preBufferSec ?? 0,
|
|
1500
|
+
"s",
|
|
1501
|
+
a && E ? ` (${a.preBufferPackets}p)` : ""
|
|
1502
|
+
]
|
|
1503
|
+
})
|
|
1504
|
+
]
|
|
1505
|
+
})
|
|
1506
|
+
]
|
|
1507
|
+
});
|
|
1091
1508
|
}
|
|
1092
|
-
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
className: `absolute left-0 ${l ? "bottom-full mb-1" : "top-full mt-1"} z-50 ${n} rounded-md border border-border bg-surface shadow-xl p-2 text-[10px] normal-case`,
|
|
1120
|
-
onMouseEnter: u,
|
|
1121
|
-
onMouseLeave: d,
|
|
1122
|
-
children: a
|
|
1123
|
-
}
|
|
1124
|
-
)
|
|
1125
|
-
]
|
|
1126
|
-
}
|
|
1127
|
-
);
|
|
1509
|
+
var xe = 280, J = 120;
|
|
1510
|
+
function Y({ trigger: t, content: n, widthClass: a }) {
|
|
1511
|
+
let o = e(null), s = e(null), [c, l] = r(!1), [u, d] = r(!1), f = i(() => {
|
|
1512
|
+
s.current &&= (clearTimeout(s.current), null);
|
|
1513
|
+
}, []), p = i(() => {
|
|
1514
|
+
f(), s.current = setTimeout(() => l(!1), J);
|
|
1515
|
+
}, [f]);
|
|
1516
|
+
return /* @__PURE__ */ _("span", {
|
|
1517
|
+
ref: o,
|
|
1518
|
+
className: "relative inline-block",
|
|
1519
|
+
onMouseEnter: i(() => {
|
|
1520
|
+
f();
|
|
1521
|
+
let e = o.current;
|
|
1522
|
+
if (e) {
|
|
1523
|
+
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = t.top;
|
|
1524
|
+
d(n < xe && r > n);
|
|
1525
|
+
}
|
|
1526
|
+
l(!0);
|
|
1527
|
+
}, [f]),
|
|
1528
|
+
onMouseLeave: p,
|
|
1529
|
+
children: [t, c && /* @__PURE__ */ g("div", {
|
|
1530
|
+
className: `absolute left-0 ${u ? "bottom-full mb-1" : "top-full mt-1"} z-50 ${a} rounded-md border border-border bg-surface shadow-xl p-2 text-[10px] normal-case`,
|
|
1531
|
+
onMouseEnter: f,
|
|
1532
|
+
onMouseLeave: p,
|
|
1533
|
+
children: n
|
|
1534
|
+
})]
|
|
1535
|
+
});
|
|
1128
1536
|
}
|
|
1129
|
-
function
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1537
|
+
function X(e) {
|
|
1538
|
+
if (e < 1e3) return `${e}ms`;
|
|
1539
|
+
let t = Math.floor(e / 1e3);
|
|
1540
|
+
if (t < 60) return `${t}s`;
|
|
1541
|
+
let n = Math.floor(t / 60);
|
|
1542
|
+
return n < 60 ? `${n}m ${t % 60}s` : `${Math.floor(n / 60)}h ${n % 60}m`;
|
|
1135
1543
|
}
|
|
1136
|
-
function
|
|
1137
|
-
|
|
1544
|
+
function Z(e) {
|
|
1545
|
+
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : e < 1073741824 ? `${(e / 1048576).toFixed(1)} MB` : `${(e / 1073741824).toFixed(2)} GB`;
|
|
1138
1546
|
}
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1547
|
+
function Se({ clients: e, encodedCount: t, onKill: n }) {
|
|
1548
|
+
let i = e?.decoded ?? [], a = e?.audio ?? [], o = e?.rtsp ?? [], s = e?.encoded ?? [], c = i.length + a.length + o.length + s.length, [l, u] = r(!0);
|
|
1549
|
+
return c === 0 ? /* @__PURE__ */ g("div", {
|
|
1550
|
+
className: "mt-1.5 text-[10px] text-foreground-subtle italic",
|
|
1551
|
+
children: "No active subscribers"
|
|
1552
|
+
}) : /* @__PURE__ */ _("div", {
|
|
1553
|
+
className: "mt-1.5 border-t border-border/30 pt-1.5",
|
|
1554
|
+
children: [/* @__PURE__ */ _("button", {
|
|
1555
|
+
type: "button",
|
|
1556
|
+
onClick: () => u((e) => !e),
|
|
1557
|
+
className: "flex items-center gap-1 text-[10px] text-foreground-subtle hover:text-foreground transition-colors",
|
|
1558
|
+
children: [g(l ? A : j, { className: "h-3 w-3" }), /* @__PURE__ */ _("span", {
|
|
1559
|
+
className: "uppercase tracking-wider",
|
|
1560
|
+
children: [
|
|
1561
|
+
"Subscribers (",
|
|
1562
|
+
c,
|
|
1563
|
+
")"
|
|
1564
|
+
]
|
|
1565
|
+
})]
|
|
1566
|
+
}), l && /* @__PURE__ */ _("div", {
|
|
1567
|
+
className: "mt-1 divide-y divide-border/20",
|
|
1568
|
+
children: [
|
|
1569
|
+
i.map((e, t) => /* @__PURE__ */ g(Q, {
|
|
1570
|
+
kind: "DECODED",
|
|
1571
|
+
kindClass: "bg-success/10 text-success",
|
|
1572
|
+
tag: e.tag || "unknown",
|
|
1573
|
+
metrics: [
|
|
1574
|
+
`${e.maxFps.toFixed(0)}fps`,
|
|
1575
|
+
`${e.framesDelivered} del`,
|
|
1576
|
+
...e.framesDropped > 0 ? [{
|
|
1577
|
+
text: `${e.framesDropped} drop`,
|
|
1578
|
+
warn: !0
|
|
1579
|
+
}] : []
|
|
1580
|
+
],
|
|
1581
|
+
age: Date.now() - e.subscribedAt,
|
|
1582
|
+
onKill: n && e.tag ? () => n({
|
|
1583
|
+
channel: "decoded",
|
|
1584
|
+
handle: e.tag
|
|
1585
|
+
}) : void 0
|
|
1586
|
+
}, `d-${t}`)),
|
|
1587
|
+
a.map((e, t) => /* @__PURE__ */ g(Q, {
|
|
1588
|
+
kind: "AUDIO",
|
|
1589
|
+
kindClass: "bg-info/10 text-info",
|
|
1590
|
+
tag: e.tag || "unknown",
|
|
1591
|
+
metrics: [`${e.chunksDelivered} chunks`],
|
|
1592
|
+
age: Date.now() - e.subscribedAt,
|
|
1593
|
+
onKill: n && e.tag ? () => n({
|
|
1594
|
+
channel: "audio",
|
|
1595
|
+
handle: e.tag
|
|
1596
|
+
}) : void 0
|
|
1597
|
+
}, `a-${t}`)),
|
|
1598
|
+
o.map((e) => {
|
|
1599
|
+
let t = Date.now() - e.lastRtpAt, r = t > 5e3, i = e.playing ? r ? "stalled" : "playing" : "paused", a = e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle";
|
|
1600
|
+
return /* @__PURE__ */ g(Q, {
|
|
1601
|
+
kind: "RTSP",
|
|
1602
|
+
kindClass: "bg-warning/10 text-warning",
|
|
1603
|
+
tag: e.remoteAddr,
|
|
1604
|
+
state: {
|
|
1605
|
+
text: i + (e.muted ? " · muted" : ""),
|
|
1606
|
+
className: a
|
|
1607
|
+
},
|
|
1608
|
+
metrics: [Z(e.bytesSent), `last rtp ${X(t)} ago`],
|
|
1609
|
+
age: Date.now() - e.connectedAt,
|
|
1610
|
+
onKill: n ? () => n({
|
|
1611
|
+
channel: "rtsp",
|
|
1612
|
+
handle: e.sessionId
|
|
1613
|
+
}) : void 0
|
|
1614
|
+
}, `r-${e.sessionId}`);
|
|
1615
|
+
}),
|
|
1616
|
+
s.map((e) => {
|
|
1617
|
+
let t = e.attribution, n = me[t.kind] ?? "bg-foreground-subtle/10 text-foreground-subtle", r = t.sessionId ? t.sessionId.slice(0, 8) : null, i = [];
|
|
1618
|
+
t.label && i.push(t.label), r && i.push(`sess ${r}`), t.userId && i.push(`user ${t.userId.slice(0, 8)}`), t.remoteAddr && i.push(`@${t.remoteAddr}`), t.userAgent && i.push(fe(t.userAgent));
|
|
1619
|
+
let a = i.length > 0 ? i.join(" · ") : ge(t.kind), o = [];
|
|
1620
|
+
return t.media && o.push({ text: t.media }), t.targetCodec && o.push(t.targetCodec), t.transport && o.push(t.transport), o.push(`${e.packetsDelivered} pkts`), /* @__PURE__ */ g(Q, {
|
|
1621
|
+
kind: he(t.kind),
|
|
1622
|
+
kindClass: n,
|
|
1623
|
+
tag: a,
|
|
1624
|
+
metrics: o,
|
|
1625
|
+
age: Date.now() - e.subscribedAt
|
|
1626
|
+
}, e.id);
|
|
1627
|
+
}),
|
|
1628
|
+
s.length === 0 && t > 0 && /* @__PURE__ */ _("div", {
|
|
1629
|
+
className: "py-0.5 text-[10px] text-foreground-subtle",
|
|
1630
|
+
children: [
|
|
1631
|
+
/* @__PURE__ */ g("span", {
|
|
1632
|
+
className: "inline-block px-1 rounded text-[9px] font-bold bg-foreground-subtle/10 text-foreground-subtle mr-2",
|
|
1633
|
+
children: "ENCODED"
|
|
1634
|
+
}),
|
|
1635
|
+
t,
|
|
1636
|
+
" callback subscriber(s)"
|
|
1637
|
+
]
|
|
1638
|
+
})
|
|
1639
|
+
]
|
|
1640
|
+
})]
|
|
1641
|
+
});
|
|
1226
1642
|
}
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1643
|
+
function Q({ kind: e, kindClass: t, tag: n, state: r, metrics: i, age: a, onKill: o }) {
|
|
1644
|
+
return /* @__PURE__ */ _("div", {
|
|
1645
|
+
className: "flex items-center gap-2 py-0.5 text-[10px]",
|
|
1646
|
+
children: [
|
|
1647
|
+
/* @__PURE__ */ g("span", {
|
|
1648
|
+
className: `inline-block px-1 rounded text-[9px] font-bold shrink-0 w-14 text-center ${t}`,
|
|
1649
|
+
children: e
|
|
1650
|
+
}),
|
|
1651
|
+
/* @__PURE__ */ g("span", {
|
|
1652
|
+
className: "text-foreground font-medium truncate flex-1",
|
|
1653
|
+
children: n
|
|
1654
|
+
}),
|
|
1655
|
+
r && /* @__PURE__ */ g("span", {
|
|
1656
|
+
className: `text-[9px] px-1 rounded shrink-0 ${r.className}`,
|
|
1657
|
+
children: r.text
|
|
1658
|
+
}),
|
|
1659
|
+
/* @__PURE__ */ _("span", {
|
|
1660
|
+
className: "text-foreground-subtle flex items-center gap-1.5 shrink-0",
|
|
1661
|
+
children: [i.map((e, t) => /* @__PURE__ */ _("span", { children: [t > 0 && /* @__PURE__ */ g("span", {
|
|
1662
|
+
className: "mr-1.5 text-foreground-subtle/50",
|
|
1663
|
+
children: "·"
|
|
1664
|
+
}), typeof e == "string" ? e : /* @__PURE__ */ g("span", {
|
|
1665
|
+
className: e.warn ? "text-amber-400" : "",
|
|
1666
|
+
children: e.text
|
|
1667
|
+
})] }, t)), /* @__PURE__ */ _("span", {
|
|
1668
|
+
className: "text-foreground-subtle/70",
|
|
1669
|
+
children: ["· ", X(a)]
|
|
1670
|
+
})]
|
|
1671
|
+
}),
|
|
1672
|
+
/* @__PURE__ */ g("div", {
|
|
1673
|
+
className: "w-5 flex-shrink-0 flex items-center justify-end",
|
|
1674
|
+
children: o ? /* @__PURE__ */ g($, { onClick: o }) : null
|
|
1675
|
+
})
|
|
1676
|
+
]
|
|
1677
|
+
});
|
|
1244
1678
|
}
|
|
1245
|
-
function
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1679
|
+
function Ce({ count: e, clients: t, onKill: n }) {
|
|
1680
|
+
let r = t?.decoded ?? [], i = t?.audio ?? [], a = t ? t.encodedSubscribers : 0, o = r.length > 0 || i.length > 0 || a > 0, s = /* @__PURE__ */ g("span", {
|
|
1681
|
+
className: `text-foreground ${o ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1682
|
+
children: e
|
|
1683
|
+
});
|
|
1684
|
+
return o ? /* @__PURE__ */ g(Y, {
|
|
1685
|
+
trigger: s,
|
|
1686
|
+
content: /* @__PURE__ */ _(v, { children: [
|
|
1687
|
+
r.length > 0 && /* @__PURE__ */ _("div", {
|
|
1688
|
+
className: "mb-2",
|
|
1689
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1690
|
+
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1691
|
+
children: "Decoded subscribers"
|
|
1692
|
+
}), r.map((e, t) => /* @__PURE__ */ _("div", {
|
|
1693
|
+
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1694
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1695
|
+
className: "text-foreground font-medium truncate",
|
|
1696
|
+
children: e.tag || "unknown"
|
|
1697
|
+
}), /* @__PURE__ */ _("span", {
|
|
1698
|
+
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1699
|
+
children: [
|
|
1700
|
+
/* @__PURE__ */ _("span", { children: [e.maxFps.toFixed(0), "fps"] }),
|
|
1701
|
+
/* @__PURE__ */ g("span", { children: "·" }),
|
|
1702
|
+
/* @__PURE__ */ _("span", { children: [e.framesDelivered, " del"] }),
|
|
1703
|
+
e.framesDropped > 0 && /* @__PURE__ */ _("span", {
|
|
1704
|
+
className: "text-amber-400",
|
|
1705
|
+
children: [
|
|
1706
|
+
"· ",
|
|
1707
|
+
e.framesDropped,
|
|
1708
|
+
" drop"
|
|
1709
|
+
]
|
|
1710
|
+
}),
|
|
1711
|
+
/* @__PURE__ */ g("span", { children: "·" }),
|
|
1712
|
+
/* @__PURE__ */ g("span", { children: X(Date.now() - e.subscribedAt) }),
|
|
1713
|
+
n && e.tag && /* @__PURE__ */ g($, { onClick: () => n({
|
|
1714
|
+
channel: "decoded",
|
|
1715
|
+
handle: e.tag
|
|
1716
|
+
}) })
|
|
1717
|
+
]
|
|
1718
|
+
})]
|
|
1719
|
+
}, `d-${t}`))]
|
|
1720
|
+
}),
|
|
1721
|
+
i.length > 0 && /* @__PURE__ */ _("div", {
|
|
1722
|
+
className: "mb-2",
|
|
1723
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1724
|
+
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1725
|
+
children: "Audio subscribers"
|
|
1726
|
+
}), i.map((e, t) => /* @__PURE__ */ _("div", {
|
|
1727
|
+
className: "flex items-center justify-between gap-2 py-0.5",
|
|
1728
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1729
|
+
className: "text-foreground font-medium truncate",
|
|
1730
|
+
children: e.tag || "unknown"
|
|
1731
|
+
}), /* @__PURE__ */ _("span", {
|
|
1732
|
+
className: "text-foreground-subtle text-[9px] flex items-center gap-1.5 shrink-0",
|
|
1733
|
+
children: [
|
|
1734
|
+
/* @__PURE__ */ _("span", { children: [e.chunksDelivered, " chunks"] }),
|
|
1735
|
+
/* @__PURE__ */ g("span", { children: "·" }),
|
|
1736
|
+
/* @__PURE__ */ g("span", { children: X(Date.now() - e.subscribedAt) }),
|
|
1737
|
+
n && e.tag && /* @__PURE__ */ g($, { onClick: () => n({
|
|
1738
|
+
channel: "audio",
|
|
1739
|
+
handle: e.tag
|
|
1740
|
+
}) })
|
|
1741
|
+
]
|
|
1742
|
+
})]
|
|
1743
|
+
}, `a-${t}`))]
|
|
1744
|
+
}),
|
|
1745
|
+
a > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
|
|
1746
|
+
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1747
|
+
children: "Encoded"
|
|
1748
|
+
}), /* @__PURE__ */ _("div", {
|
|
1749
|
+
className: "text-foreground",
|
|
1750
|
+
children: [a, " callback subscriber(s)"]
|
|
1751
|
+
})] })
|
|
1752
|
+
] }),
|
|
1753
|
+
widthClass: "min-w-[260px] max-w-[360px]"
|
|
1754
|
+
}) : s;
|
|
1298
1755
|
}
|
|
1299
|
-
function
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
disabled: n,
|
|
1311
|
-
onClick: () => a(!t),
|
|
1312
|
-
className: `relative inline-flex h-3 w-6 shrink-0 items-center rounded-full transition-colors ${t ? "bg-success/60" : "bg-foreground-subtle/30"} ${n ? "opacity-50 cursor-wait" : "cursor-pointer"}`,
|
|
1313
|
-
title: t ? "Pre-buffer enabled — click to disable" : "Pre-buffer disabled — click to enable",
|
|
1314
|
-
children: /* @__PURE__ */ e(
|
|
1315
|
-
"span",
|
|
1316
|
-
{
|
|
1317
|
-
className: `inline-block h-2.5 w-2.5 rounded-full bg-white shadow transition-transform ${t ? "translate-x-3" : "translate-x-0.5"}`
|
|
1318
|
-
}
|
|
1319
|
-
)
|
|
1320
|
-
}
|
|
1321
|
-
);
|
|
1756
|
+
function we({ enabled: e, onToggle: t, disabled: n }) {
|
|
1757
|
+
return /* @__PURE__ */ g("button", {
|
|
1758
|
+
type: "button",
|
|
1759
|
+
role: "switch",
|
|
1760
|
+
"aria-checked": e,
|
|
1761
|
+
disabled: n,
|
|
1762
|
+
onClick: () => t(!e),
|
|
1763
|
+
className: `relative inline-flex h-3 w-6 shrink-0 items-center rounded-full transition-colors ${e ? "bg-success/60" : "bg-foreground-subtle/30"} ${n ? "opacity-50 cursor-wait" : "cursor-pointer"}`,
|
|
1764
|
+
title: e ? "Pre-buffer enabled — click to disable" : "Pre-buffer disabled — click to enable",
|
|
1765
|
+
children: /* @__PURE__ */ g("span", { className: `inline-block h-2.5 w-2.5 rounded-full bg-white shadow transition-transform ${e ? "translate-x-3" : "translate-x-0.5"}` })
|
|
1766
|
+
});
|
|
1322
1767
|
}
|
|
1323
|
-
function
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
children: /* @__PURE__ */ e(Ke, { className: "h-2.5 w-2.5" })
|
|
1334
|
-
}
|
|
1335
|
-
);
|
|
1768
|
+
function $({ onClick: e }) {
|
|
1769
|
+
return /* @__PURE__ */ g("button", {
|
|
1770
|
+
type: "button",
|
|
1771
|
+
title: "Force-disconnect this client",
|
|
1772
|
+
onClick: (t) => {
|
|
1773
|
+
t.stopPropagation(), e();
|
|
1774
|
+
},
|
|
1775
|
+
className: "inline-flex items-center justify-center h-4 w-4 rounded-sm border border-border/60 text-foreground-subtle hover:bg-red-500/10 hover:text-red-400 hover:border-red-500/40 transition-colors",
|
|
1776
|
+
children: /* @__PURE__ */ g(ne, { className: "h-2.5 w-2.5" })
|
|
1777
|
+
});
|
|
1336
1778
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1779
|
+
function Te({ count: e, clients: t, onKill: n }) {
|
|
1780
|
+
let r = t?.rtsp ?? [], i = r.length > 0, a = /* @__PURE__ */ g("span", {
|
|
1781
|
+
className: `text-foreground ${i ? "underline decoration-dotted decoration-foreground-subtle/50 underline-offset-2 cursor-help" : ""}`,
|
|
1782
|
+
children: e
|
|
1783
|
+
});
|
|
1784
|
+
return i ? /* @__PURE__ */ g(Y, {
|
|
1785
|
+
trigger: a,
|
|
1786
|
+
content: /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g("div", {
|
|
1787
|
+
className: "text-foreground-subtle uppercase text-[9px] tracking-wider mb-1",
|
|
1788
|
+
children: "RTSP sessions"
|
|
1789
|
+
}), r.map((e) => {
|
|
1790
|
+
let t = Date.now() - e.lastRtpAt, r = t > 5e3;
|
|
1791
|
+
return /* @__PURE__ */ _("div", {
|
|
1792
|
+
className: "py-1 border-b border-border/40 last:border-b-0",
|
|
1793
|
+
children: [/* @__PURE__ */ _("div", {
|
|
1794
|
+
className: "flex items-center justify-between gap-2",
|
|
1795
|
+
children: [/* @__PURE__ */ g("span", {
|
|
1796
|
+
className: "text-foreground font-mono",
|
|
1797
|
+
children: e.remoteAddr
|
|
1798
|
+
}), /* @__PURE__ */ _("span", {
|
|
1799
|
+
className: "flex items-center gap-1 shrink-0",
|
|
1800
|
+
children: [/* @__PURE__ */ _("span", {
|
|
1801
|
+
className: `text-[9px] px-1 rounded ${e.playing ? r ? "bg-amber-400/10 text-amber-400" : "bg-success/10 text-success" : "bg-foreground-subtle/10 text-foreground-subtle"}`,
|
|
1802
|
+
children: [e.playing ? r ? "stalled" : "playing" : "paused", e.muted && " · muted"]
|
|
1803
|
+
}), n && /* @__PURE__ */ g($, { onClick: () => n({
|
|
1804
|
+
channel: "rtsp",
|
|
1805
|
+
handle: e.sessionId
|
|
1806
|
+
}) })]
|
|
1807
|
+
})]
|
|
1808
|
+
}), /* @__PURE__ */ _("div", {
|
|
1809
|
+
className: "flex items-center justify-between gap-2 text-foreground-subtle text-[9px] mt-0.5",
|
|
1810
|
+
children: [
|
|
1811
|
+
/* @__PURE__ */ _("span", { children: [Z(e.bytesSent), " sent"] }),
|
|
1812
|
+
/* @__PURE__ */ _("span", { children: [
|
|
1813
|
+
"connected ",
|
|
1814
|
+
X(Date.now() - e.connectedAt),
|
|
1815
|
+
" ago"
|
|
1816
|
+
] }),
|
|
1817
|
+
/* @__PURE__ */ _("span", { children: [
|
|
1818
|
+
"last rtp ",
|
|
1819
|
+
X(t),
|
|
1820
|
+
" ago"
|
|
1821
|
+
] })
|
|
1822
|
+
]
|
|
1823
|
+
})]
|
|
1824
|
+
}, e.sessionId);
|
|
1825
|
+
})] }),
|
|
1826
|
+
widthClass: "min-w-[300px] max-w-[420px]"
|
|
1827
|
+
}) : a;
|
|
1375
1828
|
}
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
gt as default
|
|
1829
|
+
//#endregion
|
|
1830
|
+
//#region src/stream-broker/widgets/index.tsx
|
|
1831
|
+
var Ee = {
|
|
1832
|
+
"stream-broker-panel": _e,
|
|
1833
|
+
"ffmpeg-params": ue
|
|
1382
1834
|
};
|
|
1835
|
+
//#endregion
|
|
1836
|
+
export { Ee as default };
|