UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

220 lines (219 loc) 7.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Enums = exports.All = exports.UDXStatistics = exports.ManifoldMemoryStatistics = exports.ManifoldCoreStatisticsAsArrayRow = exports.ManifoldCoreStatistics = exports.UDXOutputAsTableRow = exports.UDXOutput = exports.UDXFilter = exports.UDXTransform = exports.UDXVideoCrop = exports.lower = exports.lift = void 0; const VScript = require("vscript"); const _MetadataProcessor = require("./MetadataProcessor"); const _Video = require("./Video"); exports.lift = { UDXStatistics: (kwl, socket) => kwl ? (new UDXStatistics(new VScript.Subtree(socket, kwl))) : null, ManifoldMemoryStatistics: (kwl, socket) => kwl ? (new ManifoldMemoryStatistics(new VScript.Subtree(socket, kwl))) : null, ManifoldCoreStatistics: (kwl, socket) => kwl ? (new ManifoldCoreStatistics(new VScript.Subtree(socket, kwl))) : null, UDXOutput: (kwl, socket) => kwl ? (new UDXOutput(new VScript.Subtree(socket, kwl))) : null, UDXFilter: (kwl, socket) => kwl ? (new UDXFilter(new VScript.Subtree(socket, kwl))) : null, UDXTransform: (kwl, socket) => kwl ? (new UDXTransform(new VScript.Subtree(socket, kwl))) : null, UDXVideoCrop: (kwl, socket) => kwl ? (new UDXVideoCrop(new VScript.Subtree(socket, kwl))) : null }; exports.lower = { UDXStatistics: (ref) => ref ? ref.raw.kwl : null, ManifoldMemoryStatistics: (ref) => ref ? ref.raw.kwl : null, ManifoldCoreStatistics: (ref) => ref ? ref.raw.kwl : null, UDXOutput: (ref) => ref ? ref.raw.kwl : null, UDXFilter: (ref) => ref ? ref.raw.kwl : null, UDXTransform: (ref) => ref ? ref.raw.kwl : null, UDXVideoCrop: (ref) => ref ? ref.raw.kwl : null }; class UDXVideoCrop { constructor(raw) { this.raw = raw; } get crop_mode() { return new VScript.rwKeyword(this, "crop_mode"); } get left() { return new VScript.duplexKeyword(this, "left"); } get right() { return new VScript.duplexKeyword(this, "right"); } get top() { return new VScript.duplexKeyword(this, "top"); } get bottom() { return new VScript.duplexKeyword(this, "bottom"); } } exports.UDXVideoCrop = UDXVideoCrop; class UDXTransform { constructor(raw) { this.raw = raw; } get pos_mode() { return new VScript.rwKeyword(this, "pos_mode"); } get pos_x() { return new VScript.duplexKeyword(this, "pos_x"); } get pos_y() { return new VScript.duplexKeyword(this, "pos_y"); } get size_mode() { return new VScript.rwKeyword(this, "size_mode"); } get size_x() { return new VScript.duplexKeyword(this, "size_x"); } get size_y() { return new VScript.duplexKeyword(this, "size_y"); } } exports.UDXTransform = UDXTransform; class UDXFilter { constructor(raw) { this.raw = raw; } get mode() { return new VScript.rwKeyword(this, "mode"); } get window() { return new VScript.rwKeyword(this, "window"); } get h_filter_offset() { return new VScript.duplexKeyword(this, "h_filter_offset"); } get v_filter_offset() { return new VScript.duplexKeyword(this, "v_filter_offset"); } } exports.UDXFilter = UDXFilter; class UDXOutput { constructor(raw) { this.raw = raw; } get video_source() { return new VScript.rwKeyword(this, "video_source", { lift: _Video.lift.Essence, lower: _Video.lower.Essence }); } get video_standard() { return new VScript.rwKeyword(this, "video_standard"); } get aspect_ratio() { return new VScript.duplexKeyword(this, "aspect_ratio"); } get sd_active_pixels() { return new VScript.rwKeyword(this, "sd_active_pixels"); } get crop() { return new UDXVideoCrop(this.raw.find("crop")); } get transform() { return new UDXTransform(this.raw.find("transform")); } get filter() { return new UDXFilter(this.raw.find("filter")); } get signal() { return new _Video.Essence(this.raw.find("signal")); } get metadata_inserter() { return new _MetadataProcessor.MetadataInserter(this.raw.find("metadata_inserter")); } } exports.UDXOutput = UDXOutput; class UDXOutputAsTableRow extends UDXOutput { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.UDXOutputAsTableRow = UDXOutputAsTableRow; class ManifoldCoreStatistics { constructor(raw) { this.raw = raw; } get sync_length() { return new VScript.rKeyword(this, "sync_length"); } get sync_calc_length() { return new VScript.rKeyword(this, "sync_calc_length"); } get output_0_primitives_num() { return new VScript.rKeyword(this, "output_0_primitives_num"); } get output_1_primitives_num() { return new VScript.rKeyword(this, "output_1_primitives_num"); } get output_2_primitives_num() { return new VScript.rKeyword(this, "output_2_primitives_num"); } get output_3_primitives_num() { return new VScript.rKeyword(this, "output_3_primitives_num"); } get output_4_primitives_num() { return new VScript.rKeyword(this, "output_4_primitives_num"); } get output_5_primitives_num() { return new VScript.rKeyword(this, "output_5_primitives_num"); } get output_6_primitives_num() { return new VScript.rKeyword(this, "output_6_primitives_num"); } get output_7_primitives_num() { return new VScript.rKeyword(this, "output_7_primitives_num"); } get total_primitives_num() { return new VScript.rKeyword(this, "total_primitives_num"); } get core_total_clks() { return new VScript.rKeyword(this, "core_total_clks"); } get core_active_clks() { return new VScript.rKeyword(this, "core_active_clks"); } get core_load() { return new VScript.rKeyword(this, "core_load"); } } exports.ManifoldCoreStatistics = ManifoldCoreStatistics; class ManifoldCoreStatisticsAsArrayRow extends ManifoldCoreStatistics { constructor(st, index, parent) { super(st); this.index = index; this.parent = parent; } } exports.ManifoldCoreStatisticsAsArrayRow = ManifoldCoreStatisticsAsArrayRow; class ManifoldMemoryStatistics { constructor(raw) { this.raw = raw; } get mem_band_max_gbits() { return new VScript.rKeyword(this, "mem_band_max_gbits"); } get mem_band_write_gbits() { return new VScript.rKeyword(this, "mem_band_write_gbits"); } get mem_band_read_gbits() { return new VScript.rKeyword(this, "mem_band_read_gbits"); } } exports.ManifoldMemoryStatistics = ManifoldMemoryStatistics; class UDXStatistics { constructor(raw) { this.raw = raw; } get cores() { return new VScript.StronglyTypedArray(this, "cores", (st, index, parent) => new ManifoldCoreStatisticsAsArrayRow(st, index, parent)); } get memory() { return new ManifoldMemoryStatistics(this.raw.find("memory")); } } exports.UDXStatistics = UDXStatistics; class All { constructor(raw) { this.raw = raw; } get outputs() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("outputs")), (row, enclosing_table) => new UDXOutputAsTableRow(row, enclosing_table)); } get statistics() { return new UDXStatistics(this.raw.find("statistics")); } } exports.All = All; exports.Enums = { UDXFILTERWINDOW: ["HAMMING", "KAISER"], UDXOFFSETMODE: ["AUTO", "OFFSET_AUTO", "OFFSET_MANUAL"], UDXSDACTIVEWIDTH: ["W720", "W702"], UDXASPECTRATIO: ["ANAMORPHIC", "LETTERBOX", "PILLARBOX", "CENTERCUT"] };