@joergmittaglawo/dmvconfig
Version:
DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.
101 lines • 3.64 kB
JavaScript
;
/**
* Runs the Sources Configuration
* @packageDocumentation
*
* @version 0.0.0-alpha.0
* @date 2020-04-18
* @author Mittag, Jörg (Lawo) <joerg.mittag@lawo.com>
* @license SPDX-License-Identifier: MIT
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.runSourcesConfig = void 0;
/**
* Runs the Sources Configuration
*
* @param config The DMV Configuration
* @param master An open VMatrix connection to the cluster master
*/
async function runSourcesConfig({ cluster: { sources: { offsets: { video2110_20, video2022_6, mipmaps: mipmap } } }, sources: { video: { st2110_20, st2022_6, mipmaps }, audio, metadata } }, master) {
console.log('Configuring Sources');
for (let i = video2110_20; i < st2110_20 + video2110_20; i++) {
await master.cluster.global.configuration.sources.ip.video.create_row({
name: `ST2110-20 ${i}`,
index: i,
});
}
for (let i = video2022_6; i < st2022_6 + video2022_6; i++) {
await master.cluster.global.configuration.sources.ip.video.create_row({
name: `ST2022-6 ${i}`,
index: i,
});
}
for (let i = mipmap; i < mipmaps + mipmap; i++) {
await master.cluster.global.configuration.sources.ip.video.create_row({
name: `Mipmap ${i}`,
index: i,
});
}
for (let i = 0; i < audio; i++) {
await master.cluster.global.configuration.sources.ip.audio.create_row({
name: `Audio ${i}`,
index: i,
});
}
for (let i = 0; i < metadata; i++) {
await master.cluster.global.configuration.sources.ip.metadata.create_row({
name: `Metadata ${i}`,
index: i,
});
}
// await Promise.all([
// Array.from(
// { "length": st2110_20 },
// (_, st2110_20) => master.cluster.global.configuration.sources.ip.video.create_row(
// {
// "name": `ST2110-20 ${st2110_20 + video2110_20}`,
// "index": st2110_20 + video2110_20,
// }
// )
// ),
// Array.from(
// { "length": st2022_6 },
// (_, st2022_6) => master.cluster.global.configuration.sources.ip.video.create_row(
// {
// "name": `ST2022-6 ${st2022_6 + video2022_6}`,
// "index": st2022_6 + video2022_6,
// }
// )
// ),
// Array.from(
// { "length": mipmaps },
// (_, mipmaps) => master.cluster.global.configuration.sources.ip.video.create_row(
// {
// "name": `Mipmap ${mipmaps + mipmap}`,
// "index": mipmaps + mipmap,
// }
// )
// ),
// Array.from(
// { "length": audio },
// (_, audio) => master.cluster.global.configuration.sources.ip.audio.create_row(
// {
// "name": `Audio ${audio}`,
// "index": audio,
// }
// )
// ),
// Array.from(
// { "length": metadata },
// (_, metadata) => master.cluster.global.configuration.sources.ip.metadata.create_row(
// {
// "name": `Metadata ${metadata}`,
// "index": metadata,
// }
// )
// )
// ].flat(999 /* Infinity */));
}
exports.runSourcesConfig = runSourcesConfig;
exports.default = runSourcesConfig;
//# sourceMappingURL=sources.js.map