@joergmittaglawo/dmvconfig
Version:
DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.
141 lines (140 loc) • 6.97 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Enums = exports.EssenceAsArrayRow = exports.Essence = exports.ClosedCaption = exports.SignalAsTableRow = exports.Signal = exports.lower = exports.lift = void 0;
const VScript = require("vscript");
const _Time = require("./Time");
exports.lift = {
HSLCOLOURWITHOPACITY: (x, _) => { return x ? { hue: x[0], saturation: x[1], lightness: x[2], opacity: x[3] } : null; },
HSLCOLOUR: (x, _) => { return x ? { hue: x[0], saturation: x[1], lightness: x[2] } : null; },
Essence: (kwl, socket) => kwl ? (new Essence(new VScript.Subtree(socket, kwl))) : null,
AFD: (x, _) => { return x ? { ar: x[0], code: x[1], top: x[2], bottom: x[3], left: x[4], right: x[5] } : null; },
ClosedCaption: (kwl, socket) => kwl ? (new ClosedCaption(new VScript.Subtree(socket, kwl))) : null,
ClosedCaptionChannelsPresent: (x, _) => { return x ? { c_c0: x[0], c_c1: x[1], c_c2: x[2], c_c3: x[3] } : null; },
TimestampedSignature: (x, _) => { return x ? { free_running_counter: x[0], signature: x[1] } : null; },
Signal: (kwl, socket) => kwl ? (new Signal(new VScript.Subtree(socket, kwl))) : null,
SignalSubstream: (x, _) => { return x ? { stream: x[0], splitter: x[1] } : null; }
};
exports.lower = {
HSLCOLOURWITHOPACITY: (x) => x ? [x.hue, x.saturation, x.lightness, x.opacity] : null,
HSLCOLOUR: (x) => x ? [x.hue, x.saturation, x.lightness] : null,
Essence: (ref) => ref ? ref.raw.kwl : null,
AFD: (x) => x ? [x.ar, x.code, x.top, x.bottom, x.left, x.right] : null,
ClosedCaption: (ref) => ref ? ref.raw.kwl : null,
ClosedCaptionChannelsPresent: (x) => x ?
[x.c_c0, x.c_c1, x.c_c2, x.c_c3] : null,
TimestampedSignature: (x) => x ? [x.free_running_counter, x.signature] : null,
Signal: (ref) => ref ? ref.raw.kwl : null,
SignalSubstream: (x) => x ? [x.stream, x.splitter] : null
};
class Signal {
constructor(raw) {
this.raw = raw;
}
get alert_level() {
return new VScript.rKeyword(this, "alert_level");
}
get standard() {
return new VScript.rKeyword(this, "standard");
}
get colorspace() {
return new VScript.rKeyword(this, "colorspace");
}
get substream() {
return new VScript.rKeyword(this, "substream", { lift: exports.lift.SignalSubstream, lower: exports.lower.SignalSubstream });
}
get frozen() {
return new VScript.rKeyword(this, "frozen");
}
get black() {
return new VScript.rKeyword(this, "black");
}
get dt_node() {
return new VScript.rKeyword(this, "dt_node");
}
}
exports.Signal = Signal;
class SignalAsTableRow extends Signal {
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.SignalAsTableRow = SignalAsTableRow;
class ClosedCaption {
constructor(raw) {
this.raw = raw;
}
get mode() {
return new VScript.rKeyword(this, "mode");
}
get channels_present() {
return new VScript.rKeyword(this, "channels_present", { lift: exports.lift.ClosedCaptionChannelsPresent, lower: exports.lower.ClosedCaptionChannelsPresent });
}
get screen() {
return new VScript.rKeyword(this, "screen");
}
}
exports.ClosedCaption = ClosedCaption;
class Essence {
constructor(raw) {
this.raw = raw;
}
get brief() {
return new VScript.rKeyword(this, "brief");
}
get desc() {
return new VScript.rKeyword(this, "desc");
}
get afd() {
return new VScript.rKeyword(this, "afd", { lift: exports.lift.AFD, lower: exports.lower.AFD });
}
get cc() {
return new VScript.rKeyword(this, "cc", { lift: exports.lift.ClosedCaption, lower: exports.lower.ClosedCaption });
}
get signals() {
return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("signals")), (row, enclosing_table) => new SignalAsTableRow(row, enclosing_table));
}
/**
some signal sources, such as RTP audio/video streams, include a
well-defined offset to the PTP epoch (as seen by the sender). During
processing, these 'media clocks' may shift (e.g., as signals pass through
delay elements) or broaden into finite intervals (e.g., as audio channels
at different offsets to the PTP epoch are combined into a single audio
essence). Using the `media_clock` keyword, such changes are tracked
explicitly and forwarded to audio/video transmitters.
*/
get media_clock() {
return new _Time.Source(this.raw.find("media_clock"));
}
}
exports.Essence = Essence;
class EssenceAsArrayRow extends Essence {
constructor(st, index, parent) {
super(st);
this.index = index;
this.parent = parent;
}
}
exports.EssenceAsArrayRow = EssenceAsArrayRow;
exports.Enums = {
AspectRatio: ["AR_4_3", "AR_16_9"],
BNCInputFreq: ["ceDisable", "ceMADI", "ceSD", "ceHD", "ce3G", "ce12G"],
DiracCompression: ["C_2_5", "C_3_33", "C_4", "C_4_44", "C_6_66", "C_8"],
TransportFormat: ["ST2022_6", "ST2110_GPM", "ST2110_BPM", "ST2042_raw"],
GeneralizedTransportFormat: ["ST2022_6", "ST2110_GPM", "ST2110_BPM", "ST2042_raw", "RFC4175"],
ClosedCaptionChannel: ["CC0", "CC1", "CC2", "CC3"],
ClosedCaptionMode: ["CEA608", "CEA708", "OP47"],
ColorSpace: ["BT601", "BT709", "BT2020", "BT2100", "BT709_FULL", "BT2020_FULL", "BT2100_FULL"],
SubStream2SI: ["QUAD_2SI_1", "QUAD_2SI_2", "QUAD_2SI_3", "QUAD_2SI_4"],
SubStream: ["QUAD_SDQS_1", "QUAD_SDQS_2", "QUAD_SDQS_3", "QUAD_SDQS_4", "QUAD_2SI_1", "QUAD_2SI_2", "QUAD_2SI_3", "QUAD_2SI_4"],
Field: ["First", "Second"],
TransportStructure: ["Interlaced", "Segmented", "Progressive"],
Sampling: ["b8_422_YUV", "b10_422_YUV", "b12_422_YUV", "b10_444_YUV", "b10_444_GBR", "b12_444_YUV", "b12_444_GBR", "b12_444_XYZ", "b10_4444_YUVA", "b10_4444_GBRA", "b8_4444_YUVA"],
Refresh: ["fp23_98", "fsF23_98", "fp24", "fsF24", "fp25", "fsF25", "fp29_97", "fsF29_97", "fp30", "fsF30", "fp50", "fi50", "fp59_94", "fi59_94", "fp60", "fi60"],
FrameRate: ["f23_98", "f24", "f25", "f29_97", "f30", "f50", "f59_94", "f60"],
Raster: ["NTSC", "PAL", "r720", "r1080", "r2048", "r2160"],
Speed: ["SD", "HD", "s3G_A", "s3G_B", "s12G"],
PixelClockFrequency: ["F13_5MHz", "F74_175MHz", "F74_25MHz", "F148_35MHz", "F148_5MHz", "F296_7MHz", "F297MHz"],
Standard: ["PAL", "NTSC", "HD720p25", "HD720p29_97", "HD720p30", "HD720p50", "HD720p59_94", "HD720p60", "HD1080p23_98", "HD1080sF23_98", "HD1080p24", "HD1080sF24", "HD1080p25", "HD1080sF25", "HD1080p29_97", "HD1080sF29_97", "HD1080p30", "HD1080sF30", "HD1080i50", "HD1080i59_94", "HD1080i60", "HD1080p50", "HD1080p59_94", "HD1080p60", "HD2160p50", "HD2160p59_94", "HD2160p60", "HD1080p24_DCI", "HD1080sF25_DCI"]
};