@norskvideo/norsk-studio-built-ins 1.0.8 → 1.1.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/client/info.js +398 -72
- package/lib/processor.fixedLadder/codec-editor.d.ts +7 -0
- package/lib/processor.fixedLadder/codec-editor.js +29 -0
- package/lib/processor.fixedLadder/codec-editor.js.map +1 -0
- package/lib/processor.fixedLadder/codec-view.d.ts +4 -0
- package/lib/processor.fixedLadder/codec-view.js +8 -0
- package/lib/processor.fixedLadder/codec-view.js.map +1 -0
- package/lib/processor.fixedLadder/info.js +294 -11
- package/lib/processor.fixedLadder/info.js.map +1 -1
- package/lib/processor.fixedLadder/newFile.d.ts +3 -0
- package/lib/processor.fixedLadder/newFile.js +145 -0
- package/lib/processor.fixedLadder/newFile.js.map +1 -0
- package/lib/processor.fixedLadder/rung-view.d.ts +2 -0
- package/lib/processor.fixedLadder/rung-view.js +8 -0
- package/lib/processor.fixedLadder/rung-view.js.map +1 -0
- package/lib/processor.fixedLadder/runtime.d.ts +25 -10
- package/lib/processor.fixedLadder/runtime.js +23 -167
- package/lib/processor.fixedLadder/runtime.js.map +1 -1
- package/lib/test/fixed-ladder.d.ts +0 -1
- package/lib/test/fixed-ladder.js +0 -99
- package/lib/test/fixed-ladder.js.map +1 -1
- package/package.json +2 -2
- package/shared/style.css +10 -0
package/client/info.js
CHANGED
@@ -1636,6 +1636,76 @@ var init_summary_view5 = __esm({
|
|
1636
1636
|
}
|
1637
1637
|
});
|
1638
1638
|
|
1639
|
+
// build/processor.fixedLadder/rung-view.js
|
1640
|
+
var rung_view_exports = {};
|
1641
|
+
__export(rung_view_exports, {
|
1642
|
+
default: () => rung_view_default
|
1643
|
+
});
|
1644
|
+
function rung_view_default(rung) {
|
1645
|
+
return (0, import_jsx_runtime33.jsx)("div", { className: "", children: rung.name });
|
1646
|
+
}
|
1647
|
+
var import_jsx_runtime33;
|
1648
|
+
var init_rung_view = __esm({
|
1649
|
+
"build/processor.fixedLadder/rung-view.js"() {
|
1650
|
+
"use strict";
|
1651
|
+
import_jsx_runtime33 = __toESM(require_jsx_runtime());
|
1652
|
+
}
|
1653
|
+
});
|
1654
|
+
|
1655
|
+
// build/processor.fixedLadder/codec-editor.js
|
1656
|
+
var codec_editor_exports = {};
|
1657
|
+
__export(codec_editor_exports, {
|
1658
|
+
default: () => CodecEditor
|
1659
|
+
});
|
1660
|
+
function CodecEditor(props) {
|
1661
|
+
(0, import_react36.useEffect)(() => {
|
1662
|
+
if (props.defaultValue)
|
1663
|
+
props.onChanged(props.defaultValue);
|
1664
|
+
}, [props.defaultValue]);
|
1665
|
+
const textAreaRef = (0, import_react36.useRef)(null);
|
1666
|
+
const [value, setValue] = (0, import_react36.useState)(props.defaultValue);
|
1667
|
+
(0, import_react36.useEffect)(() => {
|
1668
|
+
if (textAreaRef.current) {
|
1669
|
+
const target = textAreaRef.current;
|
1670
|
+
target.style.height = "";
|
1671
|
+
target.style.height = target.scrollHeight + "px";
|
1672
|
+
}
|
1673
|
+
}, []);
|
1674
|
+
return (0, import_jsx_runtime34.jsx)("textarea", { ref: textAreaRef, className: "w-full min-h-fit dark:text-white dark:bg-black", onChange: (e) => {
|
1675
|
+
const target = e.currentTarget;
|
1676
|
+
try {
|
1677
|
+
const codec = JSON.parse(target.value);
|
1678
|
+
setValue(codec);
|
1679
|
+
props.onChanged(codec);
|
1680
|
+
} catch (e2) {
|
1681
|
+
}
|
1682
|
+
}, defaultValue: JSON.stringify(value, void 0, 2) });
|
1683
|
+
}
|
1684
|
+
var import_jsx_runtime34, import_react36;
|
1685
|
+
var init_codec_editor = __esm({
|
1686
|
+
"build/processor.fixedLadder/codec-editor.js"() {
|
1687
|
+
"use strict";
|
1688
|
+
import_jsx_runtime34 = __toESM(require_jsx_runtime());
|
1689
|
+
import_react36 = __toESM(require_react());
|
1690
|
+
}
|
1691
|
+
});
|
1692
|
+
|
1693
|
+
// build/processor.fixedLadder/codec-view.js
|
1694
|
+
var codec_view_exports = {};
|
1695
|
+
__export(codec_view_exports, {
|
1696
|
+
default: () => CodecEditor2
|
1697
|
+
});
|
1698
|
+
function CodecEditor2(props) {
|
1699
|
+
return (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [props.width, "x", props.height] });
|
1700
|
+
}
|
1701
|
+
var import_jsx_runtime35;
|
1702
|
+
var init_codec_view = __esm({
|
1703
|
+
"build/processor.fixedLadder/codec-view.js"() {
|
1704
|
+
"use strict";
|
1705
|
+
import_jsx_runtime35 = __toESM(require_jsx_runtime());
|
1706
|
+
}
|
1707
|
+
});
|
1708
|
+
|
1639
1709
|
// build/processor.monetise/summary.js
|
1640
1710
|
var summary_exports3 = {};
|
1641
1711
|
__export(summary_exports3, {
|
@@ -1644,9 +1714,9 @@ __export(summary_exports3, {
|
|
1644
1714
|
function InlineView14({ state, config, sendCommand }) {
|
1645
1715
|
const url = state.url;
|
1646
1716
|
const id = config.id;
|
1647
|
-
const previewVideo = (0,
|
1648
|
-
const durationSlider = (0,
|
1649
|
-
(0,
|
1717
|
+
const previewVideo = (0, import_react38.useRef)(null);
|
1718
|
+
const durationSlider = (0, import_react38.useRef)(null);
|
1719
|
+
(0, import_react38.useEffect)(() => {
|
1650
1720
|
if (!url)
|
1651
1721
|
return;
|
1652
1722
|
setTimeout(() => {
|
@@ -1659,8 +1729,8 @@ function InlineView14({ state, config, sendCommand }) {
|
|
1659
1729
|
}, 1e3);
|
1660
1730
|
}, [state.url]);
|
1661
1731
|
if (!url)
|
1662
|
-
return (0,
|
1663
|
-
return (0,
|
1732
|
+
return (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children: "Starting up..." });
|
1733
|
+
return (0, import_jsx_runtime36.jsxs)("div", { className: "mb-5", children: [(0, import_jsx_runtime36.jsx)("div", { ref: previewVideo, className: "", id: `preview-${id}` }), state.currentAdvert ? (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: ["Advert currently playing: ", Math.floor(state.currentAdvert.timeLeftMs / 1e3), "s"] }) : (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [(0, import_jsx_runtime36.jsxs)("label", { htmlFor: "default-range", className: "block mb-2 text-sm font-medium text-gray-900 dark:text-white", children: ["Advert Duration (", durationSlider.current?.value ?? 16, "s)"] }), (0, import_jsx_runtime36.jsx)("input", { ref: durationSlider, id: "default-range", type: "range", defaultValue: "16", min: "16", max: "120", className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700" }), (0, import_jsx_runtime36.jsx)("button", { onClick: sendAdvertCommand, type: "button", className: "mt-2 mb-2 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800", children: "Inject Advert" })] })] });
|
1664
1734
|
function sendAdvertCommand() {
|
1665
1735
|
if (!previewVideo.current)
|
1666
1736
|
return;
|
@@ -1672,12 +1742,12 @@ function InlineView14({ state, config, sendCommand }) {
|
|
1672
1742
|
});
|
1673
1743
|
}
|
1674
1744
|
}
|
1675
|
-
var
|
1745
|
+
var import_jsx_runtime36, import_react38, import_webrtc_client2, summary_default3;
|
1676
1746
|
var init_summary3 = __esm({
|
1677
1747
|
"build/processor.monetise/summary.js"() {
|
1678
1748
|
"use strict";
|
1679
|
-
|
1680
|
-
|
1749
|
+
import_jsx_runtime36 = __toESM(require_jsx_runtime());
|
1750
|
+
import_react38 = __toESM(require_react());
|
1681
1751
|
import_webrtc_client2 = __toESM(require_webrtc_client());
|
1682
1752
|
summary_default3 = InlineView14;
|
1683
1753
|
}
|
@@ -16007,8 +16077,8 @@ __export(inline_view_exports9, {
|
|
16007
16077
|
default: () => inline_view_default9
|
16008
16078
|
});
|
16009
16079
|
function InlineView15({ state, config: _2 }) {
|
16010
|
-
const chartContainer = (0,
|
16011
|
-
const [chartControl, setChartControl] = (0,
|
16080
|
+
const chartContainer = (0, import_react40.useRef)(null);
|
16081
|
+
const [chartControl, setChartControl] = (0, import_react40.useState)(void 0);
|
16012
16082
|
function makeDataSet(key, color2, values) {
|
16013
16083
|
return {
|
16014
16084
|
label: key,
|
@@ -16025,7 +16095,7 @@ function InlineView15({ state, config: _2 }) {
|
|
16025
16095
|
datasets: [makeDataSet("latency", "rgba(255, 0, 0, 255)", state2.values)]
|
16026
16096
|
};
|
16027
16097
|
}
|
16028
|
-
(0,
|
16098
|
+
(0, import_react40.useEffect)(() => {
|
16029
16099
|
if (!chartContainer.current)
|
16030
16100
|
return;
|
16031
16101
|
auto_default.defaults.color = "#FFF";
|
@@ -16063,19 +16133,19 @@ function InlineView15({ state, config: _2 }) {
|
|
16063
16133
|
chart.update();
|
16064
16134
|
}, 100);
|
16065
16135
|
}, [chartContainer]);
|
16066
|
-
(0,
|
16136
|
+
(0, import_react40.useEffect)(() => {
|
16067
16137
|
if (!chartControl)
|
16068
16138
|
return;
|
16069
16139
|
chartControl.data = makeData(state);
|
16070
16140
|
}, [state]);
|
16071
|
-
return (0,
|
16141
|
+
return (0, import_jsx_runtime37.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime37.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
16072
16142
|
}
|
16073
|
-
var
|
16143
|
+
var import_jsx_runtime37, import_react40, inline_view_default9;
|
16074
16144
|
var init_inline_view9 = __esm({
|
16075
16145
|
"build/util.latency/inline-view.js"() {
|
16076
16146
|
"use strict";
|
16077
|
-
|
16078
|
-
|
16147
|
+
import_jsx_runtime37 = __toESM(require_jsx_runtime());
|
16148
|
+
import_react40 = __toESM(require_react());
|
16079
16149
|
init_auto();
|
16080
16150
|
inline_view_default9 = InlineView15;
|
16081
16151
|
}
|
@@ -16087,22 +16157,22 @@ __export(source_node_selection_exports, {
|
|
16087
16157
|
default: () => source_node_selection_default
|
16088
16158
|
});
|
16089
16159
|
function SourceNodeSelection(props) {
|
16090
|
-
return (0,
|
16160
|
+
return (0, import_jsx_runtime38.jsx)("div", { children: (0, import_jsx_runtime38.jsxs)("select", { defaultValue: props.defaultValue, className: `node-editor-select-input`, id: props.id, onChange: myOnChange, onBlur: myOnChange, children: [(0, import_jsx_runtime38.jsx)("option", { value: "", children: "---" }, "empty"), Object.values(props.latestDocument.nodes).map((o, i) => {
|
16091
16161
|
if (o.id == props.id)
|
16092
|
-
return (0,
|
16162
|
+
return (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, {});
|
16093
16163
|
if (o.info.category === "output")
|
16094
16164
|
return;
|
16095
|
-
return (0,
|
16165
|
+
return (0, import_jsx_runtime38.jsx)("option", { value: o.id, children: o.config.displayName }, i);
|
16096
16166
|
})] }) });
|
16097
16167
|
function myOnChange(e) {
|
16098
16168
|
props.onChanged(e.target.value);
|
16099
16169
|
}
|
16100
16170
|
}
|
16101
|
-
var
|
16171
|
+
var import_jsx_runtime38, source_node_selection_default;
|
16102
16172
|
var init_source_node_selection = __esm({
|
16103
16173
|
"build/util.latency/source-node-selection.js"() {
|
16104
16174
|
"use strict";
|
16105
|
-
|
16175
|
+
import_jsx_runtime38 = __toESM(require_jsx_runtime());
|
16106
16176
|
source_node_selection_default = SourceNodeSelection;
|
16107
16177
|
}
|
16108
16178
|
});
|
@@ -16113,8 +16183,8 @@ __export(inline_view_exports10, {
|
|
16113
16183
|
default: () => inline_view_default10
|
16114
16184
|
});
|
16115
16185
|
function InlineView16({ state, config: _2 }) {
|
16116
|
-
const chartContainer = (0,
|
16117
|
-
const [chartControl, setChartControl] = (0,
|
16186
|
+
const chartContainer = (0, import_react42.useRef)(null);
|
16187
|
+
const [chartControl, setChartControl] = (0, import_react42.useState)(void 0);
|
16118
16188
|
function makeDataSet(key, color2, values) {
|
16119
16189
|
return {
|
16120
16190
|
label: key,
|
@@ -16135,7 +16205,7 @@ function InlineView16({ state, config: _2 }) {
|
|
16135
16205
|
]
|
16136
16206
|
};
|
16137
16207
|
}
|
16138
|
-
(0,
|
16208
|
+
(0, import_react42.useEffect)(() => {
|
16139
16209
|
if (!chartContainer.current)
|
16140
16210
|
return;
|
16141
16211
|
auto_default.defaults.color = "#FFF";
|
@@ -16173,19 +16243,19 @@ function InlineView16({ state, config: _2 }) {
|
|
16173
16243
|
chart.update();
|
16174
16244
|
}, 100);
|
16175
16245
|
}, [chartContainer]);
|
16176
|
-
(0,
|
16246
|
+
(0, import_react42.useEffect)(() => {
|
16177
16247
|
if (!chartControl)
|
16178
16248
|
return;
|
16179
16249
|
chartControl.data = makeData(state);
|
16180
16250
|
}, [state]);
|
16181
|
-
return (0,
|
16251
|
+
return (0, import_jsx_runtime39.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime39.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
16182
16252
|
}
|
16183
|
-
var
|
16253
|
+
var import_jsx_runtime39, import_react42, inline_view_default10;
|
16184
16254
|
var init_inline_view10 = __esm({
|
16185
16255
|
"build/util.ma35d/inline-view.js"() {
|
16186
16256
|
"use strict";
|
16187
|
-
|
16188
|
-
|
16257
|
+
import_jsx_runtime39 = __toESM(require_jsx_runtime());
|
16258
|
+
import_react42 = __toESM(require_react());
|
16189
16259
|
init_auto();
|
16190
16260
|
inline_view_default10 = InlineView16;
|
16191
16261
|
}
|
@@ -16197,9 +16267,9 @@ __export(inline_view_exports11, {
|
|
16197
16267
|
default: () => inline_view_default11
|
16198
16268
|
});
|
16199
16269
|
function InlineView17({ state, config: _2 }) {
|
16200
|
-
const chartContainer = (0,
|
16201
|
-
const [chartControl, setChartControl] = (0,
|
16202
|
-
(0,
|
16270
|
+
const chartContainer = (0, import_react44.useRef)(null);
|
16271
|
+
const [chartControl, setChartControl] = (0, import_react44.useState)(void 0);
|
16272
|
+
(0, import_react44.useEffect)(() => {
|
16203
16273
|
if (!chartContainer.current)
|
16204
16274
|
return;
|
16205
16275
|
if (state.timestamps.length < 2)
|
@@ -16261,7 +16331,7 @@ function InlineView17({ state, config: _2 }) {
|
|
16261
16331
|
chart.update();
|
16262
16332
|
}, 100);
|
16263
16333
|
}, [chartContainer]);
|
16264
|
-
(0,
|
16334
|
+
(0, import_react44.useEffect)(() => {
|
16265
16335
|
if (!chartControl)
|
16266
16336
|
return;
|
16267
16337
|
chartControl.data = {
|
@@ -16284,14 +16354,14 @@ function InlineView17({ state, config: _2 }) {
|
|
16284
16354
|
})
|
16285
16355
|
};
|
16286
16356
|
}, [state]);
|
16287
|
-
return (0,
|
16357
|
+
return (0, import_jsx_runtime40.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime40.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) });
|
16288
16358
|
}
|
16289
|
-
var
|
16359
|
+
var import_jsx_runtime40, import_react44, inline_view_default11;
|
16290
16360
|
var init_inline_view11 = __esm({
|
16291
16361
|
"build/util.timestamps/inline-view.js"() {
|
16292
16362
|
"use strict";
|
16293
|
-
|
16294
|
-
|
16363
|
+
import_jsx_runtime40 = __toESM(require_jsx_runtime());
|
16364
|
+
import_react44 = __toESM(require_react());
|
16295
16365
|
init_auto();
|
16296
16366
|
inline_view_default11 = InlineView17;
|
16297
16367
|
}
|
@@ -17285,7 +17355,7 @@ function info_default15(R) {
|
|
17285
17355
|
// build/processor.actionReplay/info.js
|
17286
17356
|
var import_react24 = __toESM(require_react());
|
17287
17357
|
var import_config3 = __toESM(require_config());
|
17288
|
-
function info_default16({ defineComponent, assertUnreachable:
|
17358
|
+
function info_default16({ defineComponent, assertUnreachable: assertUnreachable17, Av }) {
|
17289
17359
|
const SummaryView8 = import_react24.default.lazy(async () => Promise.resolve().then(() => (init_summary2(), summary_exports2)));
|
17290
17360
|
return defineComponent({
|
17291
17361
|
identifier: "processor.transform.actionReplay",
|
@@ -17332,7 +17402,7 @@ function info_default16({ defineComponent, assertUnreachable: assertUnreachable1
|
|
17332
17402
|
case "replay-finished":
|
17333
17403
|
return { ...state, replaying: false };
|
17334
17404
|
default:
|
17335
|
-
return
|
17405
|
+
return assertUnreachable17(evType);
|
17336
17406
|
}
|
17337
17407
|
}
|
17338
17408
|
},
|
@@ -17631,9 +17701,9 @@ function info_default20({ defineComponent, Video, validation: { Z } }) {
|
|
17631
17701
|
}
|
17632
17702
|
|
17633
17703
|
// build/processor.cascadingSwitch/info.js
|
17634
|
-
function info_default21({ defineComponent, Av, React:
|
17635
|
-
const SourceSelection =
|
17636
|
-
const InlineView18 =
|
17704
|
+
function info_default21({ defineComponent, Av, React: React21, common: { Resolutions, FrameRates } }) {
|
17705
|
+
const SourceSelection = React21.lazy(async () => Promise.resolve().then(() => (init_source_selection(), source_selection_exports)));
|
17706
|
+
const InlineView18 = React21.lazy(async () => Promise.resolve().then(() => (init_inline_view8(), inline_view_exports8)));
|
17637
17707
|
return defineComponent({
|
17638
17708
|
identifier: "processor.control.cascadingSwitch",
|
17639
17709
|
category: "processor",
|
@@ -17852,8 +17922,12 @@ function assertUnreachable11(_) {
|
|
17852
17922
|
}
|
17853
17923
|
|
17854
17924
|
// build/processor.fixedLadder/info.js
|
17925
|
+
var import_react37 = __toESM(require_react());
|
17855
17926
|
var import_config6 = __toESM(require_config());
|
17856
17927
|
function info_default23({ defineComponent, Video }) {
|
17928
|
+
const RungView = import_react37.default.lazy(async () => Promise.resolve().then(() => (init_rung_view(), rung_view_exports)));
|
17929
|
+
const CodecEditor3 = import_react37.default.lazy(async () => Promise.resolve().then(() => (init_codec_editor(), codec_editor_exports)));
|
17930
|
+
const CodecView = import_react37.default.lazy(async () => Promise.resolve().then(() => (init_codec_view(), codec_view_exports)));
|
17857
17931
|
return defineComponent({
|
17858
17932
|
identifier: "processor.transform.fixedLadder",
|
17859
17933
|
category: "processor",
|
@@ -17870,8 +17944,8 @@ function info_default23({ defineComponent, Video }) {
|
|
17870
17944
|
keys: (cfg) => {
|
17871
17945
|
return cfg.rungs.map((r) => {
|
17872
17946
|
return {
|
17873
|
-
key: r,
|
17874
|
-
display: r,
|
17947
|
+
key: r.name,
|
17948
|
+
display: r.name,
|
17875
17949
|
media: Video
|
17876
17950
|
};
|
17877
17951
|
});
|
@@ -17887,7 +17961,7 @@ function info_default23({ defineComponent, Video }) {
|
|
17887
17961
|
display: (desc) => {
|
17888
17962
|
const result2 = {};
|
17889
17963
|
desc.config.rungs.forEach((r, i) => {
|
17890
|
-
result2[i] = r;
|
17964
|
+
result2[i] = r.name;
|
17891
17965
|
});
|
17892
17966
|
return result2;
|
17893
17967
|
},
|
@@ -17897,22 +17971,106 @@ function info_default23({ defineComponent, Video }) {
|
|
17897
17971
|
},
|
17898
17972
|
form: {
|
17899
17973
|
rungs: {
|
17900
|
-
help: "",
|
17974
|
+
help: "The rungs in this encode ladder",
|
17901
17975
|
hint: {
|
17902
|
-
type: "
|
17903
|
-
|
17904
|
-
|
17905
|
-
|
17906
|
-
|
17907
|
-
|
17908
|
-
|
17909
|
-
|
17910
|
-
|
17976
|
+
type: "form-list",
|
17977
|
+
envOverride: true,
|
17978
|
+
newForm: {
|
17979
|
+
form: {
|
17980
|
+
name: {
|
17981
|
+
help: "Unique name of the ladder rung (used in outputs)",
|
17982
|
+
hint: {
|
17983
|
+
type: "text",
|
17984
|
+
defaultValue: "default"
|
17985
|
+
}
|
17986
|
+
},
|
17987
|
+
width: {
|
17988
|
+
help: "Width in pixels of this rung",
|
17989
|
+
hint: {
|
17990
|
+
type: "numeric",
|
17991
|
+
defaultValue: 640
|
17992
|
+
}
|
17993
|
+
},
|
17994
|
+
height: {
|
17995
|
+
help: "Width in pixels of this rung",
|
17996
|
+
hint: {
|
17997
|
+
type: "numeric",
|
17998
|
+
defaultValue: 360
|
17999
|
+
}
|
18000
|
+
}
|
18001
|
+
},
|
18002
|
+
transform: (x) => ({
|
18003
|
+
name: x.name,
|
18004
|
+
software: createRungImpl({ name: `hack_${x.width}x${x.height}`, bitrate: 5e3, threads: 4 }),
|
18005
|
+
quadra: createQuadraRungImpl({ name: `hack_${x.width}x${x.height}`, bitrate: 5e6 }),
|
18006
|
+
logan: createLoganRungImpl({ name: `hack_${x.width}x${x.height}`, bitrate: 5e6 }),
|
18007
|
+
nvidia: createNvidiaRungImpl({ name: `hack_${x.width}x${x.height}`, bitrate: 5e6 }),
|
18008
|
+
ma35d: createMa35DH264RungImpl({ name: `hack_${x.width}x${x.height}`, bitrate: 5e6 })
|
18009
|
+
})
|
18010
|
+
},
|
18011
|
+
form: {
|
18012
|
+
name: {
|
18013
|
+
help: "Unique name of the ladder rung (used in outputs)",
|
18014
|
+
hint: {
|
18015
|
+
type: "text",
|
18016
|
+
defaultValue: "default"
|
18017
|
+
}
|
18018
|
+
},
|
18019
|
+
software: rungEditorForm("software"),
|
18020
|
+
quadra: rungEditorForm("quadra"),
|
18021
|
+
logan: rungEditorForm("logan"),
|
18022
|
+
nvidia: rungEditorForm("nvidia"),
|
18023
|
+
ma35d: rungEditorForm("ma35d")
|
18024
|
+
},
|
18025
|
+
view: RungView,
|
18026
|
+
defaultValue: rungNames.map((n) => {
|
18027
|
+
return {
|
18028
|
+
name: n,
|
18029
|
+
software: createSoftwareRung(n),
|
18030
|
+
quadra: createQuadraRung(n),
|
18031
|
+
logan: createLoganRung(n),
|
18032
|
+
nvidia: createNvidiaRung(n),
|
18033
|
+
ma35d: createMa35dRung(n)
|
18034
|
+
};
|
18035
|
+
})
|
17911
18036
|
}
|
17912
18037
|
}
|
17913
18038
|
}
|
17914
18039
|
}
|
17915
18040
|
});
|
18041
|
+
function rungEditorForm(mode) {
|
18042
|
+
const codecHint = {
|
18043
|
+
type: "custom",
|
18044
|
+
component: CodecEditor3
|
18045
|
+
};
|
18046
|
+
return {
|
18047
|
+
help: `Settings to use when encoding using ${mode} mode`,
|
18048
|
+
hint: {
|
18049
|
+
type: "form-item",
|
18050
|
+
view: CodecView,
|
18051
|
+
form: {
|
18052
|
+
width: {
|
18053
|
+
help: "Width in pixels of this rung",
|
18054
|
+
hint: {
|
18055
|
+
type: "numeric",
|
18056
|
+
defaultValue: 640
|
18057
|
+
}
|
18058
|
+
},
|
18059
|
+
height: {
|
18060
|
+
help: "Width in pixels of this rung",
|
18061
|
+
hint: {
|
18062
|
+
type: "numeric",
|
18063
|
+
defaultValue: 360
|
18064
|
+
}
|
18065
|
+
},
|
18066
|
+
codec: {
|
18067
|
+
help: "Codec settings for this rung",
|
18068
|
+
hint: codecHint
|
18069
|
+
}
|
18070
|
+
}
|
18071
|
+
}
|
18072
|
+
};
|
18073
|
+
}
|
17916
18074
|
}
|
17917
18075
|
var rungNames = [
|
17918
18076
|
"h264_1920x1080",
|
@@ -17920,13 +18078,181 @@ var rungNames = [
|
|
17920
18078
|
"h264_640x360",
|
17921
18079
|
"h264_320x180"
|
17922
18080
|
];
|
18081
|
+
function createSoftwareRung(rung) {
|
18082
|
+
switch (rung) {
|
18083
|
+
case "h264_1920x1080":
|
18084
|
+
return createRungImpl({ name: rung, threads: 8, bitrate: 5e3 });
|
18085
|
+
case "h264_1280x720":
|
18086
|
+
return createRungImpl({ name: rung, threads: 4, bitrate: 2500 });
|
18087
|
+
case "h264_640x360":
|
18088
|
+
return createRungImpl({ name: rung, threads: 2, bitrate: 1e3 });
|
18089
|
+
case "h264_320x180":
|
18090
|
+
return createRungImpl({ name: rung, threads: 1, bitrate: 800 });
|
18091
|
+
default:
|
18092
|
+
return assertUnreachable12(rung);
|
18093
|
+
}
|
18094
|
+
}
|
18095
|
+
function createMa35dRung(rung) {
|
18096
|
+
switch (rung) {
|
18097
|
+
case "h264_1920x1080":
|
18098
|
+
return createMa35DHevcRungImpl({ name: rung, bitrate: 1e4 });
|
18099
|
+
case "h264_1280x720":
|
18100
|
+
return createMa35DH264RungImpl({ name: rung, bitrate: 5e3 });
|
18101
|
+
case "h264_640x360":
|
18102
|
+
return createMa35DH264RungImpl({ name: rung, bitrate: 2e3 });
|
18103
|
+
case "h264_320x180":
|
18104
|
+
return createMa35DH264RungImpl({ name: rung, bitrate: 1e3 });
|
18105
|
+
default:
|
18106
|
+
return assertUnreachable12(rung);
|
18107
|
+
}
|
18108
|
+
}
|
18109
|
+
function createNvidiaRung(rung) {
|
18110
|
+
switch (rung) {
|
18111
|
+
case "h264_1920x1080":
|
18112
|
+
return createNvidiaRungImpl({ name: rung, bitrate: 5e6 });
|
18113
|
+
case "h264_1280x720":
|
18114
|
+
return createNvidiaRungImpl({ name: rung, bitrate: 25e5 });
|
18115
|
+
case "h264_640x360":
|
18116
|
+
return createNvidiaRungImpl({ name: rung, bitrate: 1e6 });
|
18117
|
+
case "h264_320x180":
|
18118
|
+
return createNvidiaRungImpl({ name: rung, bitrate: 8e5 });
|
18119
|
+
default:
|
18120
|
+
return assertUnreachable12(rung);
|
18121
|
+
}
|
18122
|
+
}
|
18123
|
+
function createQuadraRung(rung) {
|
18124
|
+
switch (rung) {
|
18125
|
+
case "h264_1920x1080":
|
18126
|
+
return createQuadraRungImpl({ name: rung, bitrate: 5e6 });
|
18127
|
+
case "h264_1280x720":
|
18128
|
+
return createQuadraRungImpl({ name: rung, bitrate: 25e5 });
|
18129
|
+
case "h264_640x360":
|
18130
|
+
return createQuadraRungImpl({ name: rung, bitrate: 1e6 });
|
18131
|
+
case "h264_320x180":
|
18132
|
+
return createQuadraRungImpl({ name: rung, bitrate: 8e5 });
|
18133
|
+
default:
|
18134
|
+
return assertUnreachable12(rung);
|
18135
|
+
}
|
18136
|
+
}
|
18137
|
+
function createLoganRung(rung) {
|
18138
|
+
switch (rung) {
|
18139
|
+
case "h264_1920x1080":
|
18140
|
+
return createLoganRungImpl({ name: rung, bitrate: 5e6 });
|
18141
|
+
case "h264_1280x720":
|
18142
|
+
return createLoganRungImpl({ name: rung, bitrate: 25e5 });
|
18143
|
+
case "h264_640x360":
|
18144
|
+
return createLoganRungImpl({ name: rung, bitrate: 1e6 });
|
18145
|
+
case "h264_320x180":
|
18146
|
+
return createLoganRungImpl({ name: rung, bitrate: 8e5 });
|
18147
|
+
default:
|
18148
|
+
return assertUnreachable12(rung);
|
18149
|
+
}
|
18150
|
+
}
|
18151
|
+
function createRungImpl({ name, threads, bitrate }) {
|
18152
|
+
const codec = {
|
18153
|
+
type: "x264",
|
18154
|
+
bitrateMode: { value: bitrate, mode: "abr" },
|
18155
|
+
keyFrameIntervalMax: 50,
|
18156
|
+
keyFrameIntervalMin: 50,
|
18157
|
+
sceneCut: 0,
|
18158
|
+
preset: "fast",
|
18159
|
+
tune: "zerolatency",
|
18160
|
+
threads,
|
18161
|
+
bframes: 0
|
18162
|
+
};
|
18163
|
+
return {
|
18164
|
+
width: rungWidth(name),
|
18165
|
+
height: rungHeight(name),
|
18166
|
+
codec,
|
18167
|
+
frameRate: { frames: 25, seconds: 1 }
|
18168
|
+
};
|
18169
|
+
}
|
18170
|
+
function createMa35DHevcRungImpl({ name, bitrate }) {
|
18171
|
+
const codec = {
|
18172
|
+
type: "amdMA35D-hevc",
|
18173
|
+
profile: "main",
|
18174
|
+
rateControl: { mode: "cbr", bitrate },
|
18175
|
+
gopSize: 50
|
18176
|
+
};
|
18177
|
+
return {
|
18178
|
+
width: rungWidth(name),
|
18179
|
+
height: rungHeight(name),
|
18180
|
+
codec,
|
18181
|
+
frameRate: { frames: 25, seconds: 1 }
|
18182
|
+
};
|
18183
|
+
}
|
18184
|
+
function createMa35DH264RungImpl({ name, bitrate }) {
|
18185
|
+
const codec = {
|
18186
|
+
type: "amdMA35D-h264",
|
18187
|
+
profile: "main",
|
18188
|
+
rateControl: { mode: "cbr", bitrate },
|
18189
|
+
gopSize: 50
|
18190
|
+
};
|
18191
|
+
return {
|
18192
|
+
width: rungWidth(name),
|
18193
|
+
height: rungHeight(name),
|
18194
|
+
codec,
|
18195
|
+
frameRate: { frames: 25, seconds: 1 }
|
18196
|
+
};
|
18197
|
+
}
|
18198
|
+
function createQuadraRungImpl({ name, bitrate }) {
|
18199
|
+
const codec = {
|
18200
|
+
type: "quadra-h264",
|
18201
|
+
intraPeriod: 50,
|
18202
|
+
bitrate
|
18203
|
+
};
|
18204
|
+
return {
|
18205
|
+
width: rungWidth(name),
|
18206
|
+
height: rungHeight(name),
|
18207
|
+
codec,
|
18208
|
+
frameRate: { frames: 25, seconds: 1 }
|
18209
|
+
};
|
18210
|
+
}
|
18211
|
+
function createLoganRungImpl({ name, bitrate }) {
|
18212
|
+
const codec = {
|
18213
|
+
type: "logan-h264",
|
18214
|
+
intraPeriod: 50,
|
18215
|
+
bitrate
|
18216
|
+
};
|
18217
|
+
return {
|
18218
|
+
width: rungWidth(name),
|
18219
|
+
height: rungHeight(name),
|
18220
|
+
codec,
|
18221
|
+
frameRate: { frames: 25, seconds: 1 }
|
18222
|
+
};
|
18223
|
+
}
|
18224
|
+
function createNvidiaRungImpl({ name, bitrate }) {
|
18225
|
+
const codec = {
|
18226
|
+
type: "nv-h264",
|
18227
|
+
idrPeriod: 50,
|
18228
|
+
rateControl: {
|
18229
|
+
mode: "vbr",
|
18230
|
+
averageBitrate: bitrate
|
18231
|
+
}
|
18232
|
+
};
|
18233
|
+
return {
|
18234
|
+
width: rungWidth(name),
|
18235
|
+
height: rungHeight(name),
|
18236
|
+
codec,
|
18237
|
+
frameRate: { frames: 25, seconds: 1 }
|
18238
|
+
};
|
18239
|
+
}
|
18240
|
+
function rungWidth(rungName) {
|
18241
|
+
return parseInt(rungName.split("_")[1].split(`x`)[0]);
|
18242
|
+
}
|
18243
|
+
function rungHeight(rungName) {
|
18244
|
+
return parseInt(rungName.split("_")[1].split(`x`)[1]);
|
18245
|
+
}
|
18246
|
+
function assertUnreachable12(_) {
|
18247
|
+
throw new Error("Didn't expect to get here");
|
18248
|
+
}
|
17923
18249
|
|
17924
18250
|
// build/processor.monetise/info.js
|
17925
|
-
var
|
18251
|
+
var import_react39 = __toESM(require_react());
|
17926
18252
|
var import_config7 = __toESM(require_config());
|
17927
18253
|
function info_default24(R) {
|
17928
18254
|
const { defineComponent, Av } = R;
|
17929
|
-
const SummaryView8 =
|
18255
|
+
const SummaryView8 = import_react39.default.lazy(async () => Promise.resolve().then(() => (init_summary3(), summary_exports3)));
|
17930
18256
|
return defineComponent({
|
17931
18257
|
identifier: "processor.monetise",
|
17932
18258
|
category: "output",
|
@@ -17966,7 +18292,7 @@ function info_default24(R) {
|
|
17966
18292
|
state.currentAdvert = void 0;
|
17967
18293
|
break;
|
17968
18294
|
default:
|
17969
|
-
|
18295
|
+
assertUnreachable13(evType);
|
17970
18296
|
}
|
17971
18297
|
return { ...state };
|
17972
18298
|
},
|
@@ -17981,7 +18307,7 @@ function info_default24(R) {
|
|
17981
18307
|
}
|
17982
18308
|
});
|
17983
18309
|
}
|
17984
|
-
function
|
18310
|
+
function assertUnreachable13(_) {
|
17985
18311
|
throw new Error("Didn't expect to get here");
|
17986
18312
|
}
|
17987
18313
|
|
@@ -18028,11 +18354,11 @@ function info_default25({ defineComponent, Av, Subtitle, validation: { Z } }) {
|
|
18028
18354
|
}
|
18029
18355
|
|
18030
18356
|
// build/util.latency/info.js
|
18031
|
-
var
|
18357
|
+
var import_react41 = __toESM(require_react());
|
18032
18358
|
function info_default26(R) {
|
18033
18359
|
const { defineComponent } = R;
|
18034
|
-
const InlineView18 =
|
18035
|
-
const SourceNodeSelection2 =
|
18360
|
+
const InlineView18 = import_react41.default.lazy(async () => Promise.resolve().then(() => (init_inline_view9(), inline_view_exports9)));
|
18361
|
+
const SourceNodeSelection2 = import_react41.default.lazy(async () => Promise.resolve().then(() => (init_source_node_selection(), source_node_selection_exports)));
|
18036
18362
|
return defineComponent({
|
18037
18363
|
identifier: "util.latency-stats",
|
18038
18364
|
category: "output",
|
@@ -18059,7 +18385,7 @@ function info_default26(R) {
|
|
18059
18385
|
break;
|
18060
18386
|
}
|
18061
18387
|
default:
|
18062
|
-
|
18388
|
+
assertUnreachable14(evType);
|
18063
18389
|
}
|
18064
18390
|
return { ...state };
|
18065
18391
|
},
|
@@ -18113,15 +18439,15 @@ function info_default26(R) {
|
|
18113
18439
|
}
|
18114
18440
|
});
|
18115
18441
|
}
|
18116
|
-
function
|
18442
|
+
function assertUnreachable14(_) {
|
18117
18443
|
throw new Error("Didn't expect to get here");
|
18118
18444
|
}
|
18119
18445
|
|
18120
18446
|
// build/util.ma35d/info.js
|
18121
|
-
var
|
18447
|
+
var import_react43 = __toESM(require_react());
|
18122
18448
|
function info_default27(R) {
|
18123
18449
|
const { defineComponent } = R;
|
18124
|
-
const InlineView18 =
|
18450
|
+
const InlineView18 = import_react43.default.lazy(async () => Promise.resolve().then(() => (init_inline_view10(), inline_view_exports10)));
|
18125
18451
|
return defineComponent({
|
18126
18452
|
identifier: "util.ma35d-stats",
|
18127
18453
|
category: "output",
|
@@ -18154,7 +18480,7 @@ function info_default27(R) {
|
|
18154
18480
|
break;
|
18155
18481
|
}
|
18156
18482
|
default:
|
18157
|
-
|
18483
|
+
assertUnreachable15(evType);
|
18158
18484
|
}
|
18159
18485
|
return { ...state };
|
18160
18486
|
},
|
@@ -18165,15 +18491,15 @@ function info_default27(R) {
|
|
18165
18491
|
}
|
18166
18492
|
});
|
18167
18493
|
}
|
18168
|
-
function
|
18494
|
+
function assertUnreachable15(_) {
|
18169
18495
|
throw new Error("Didn't expect to get here");
|
18170
18496
|
}
|
18171
18497
|
|
18172
18498
|
// build/util.timestamps/info.js
|
18173
|
-
var
|
18499
|
+
var import_react45 = __toESM(require_react());
|
18174
18500
|
function info_default28(R) {
|
18175
18501
|
const { defineComponent, All } = R;
|
18176
|
-
const InlineView18 =
|
18502
|
+
const InlineView18 = import_react45.default.lazy(async () => Promise.resolve().then(() => (init_inline_view11(), inline_view_exports11)));
|
18177
18503
|
return defineComponent({
|
18178
18504
|
identifier: "util.timestamps",
|
18179
18505
|
category: "output",
|
@@ -18208,7 +18534,7 @@ function info_default28(R) {
|
|
18208
18534
|
break;
|
18209
18535
|
}
|
18210
18536
|
default:
|
18211
|
-
|
18537
|
+
assertUnreachable16(evType);
|
18212
18538
|
}
|
18213
18539
|
return { ...state };
|
18214
18540
|
},
|
@@ -18219,7 +18545,7 @@ function info_default28(R) {
|
|
18219
18545
|
}
|
18220
18546
|
});
|
18221
18547
|
}
|
18222
|
-
function
|
18548
|
+
function assertUnreachable16(_) {
|
18223
18549
|
throw new Error("Didn't expect to get here");
|
18224
18550
|
}
|
18225
18551
|
|