2110-20 Rx
This commit is contained in:
@@ -11,7 +11,7 @@ interface PaletteGroup {
|
||||
}
|
||||
|
||||
const groups: PaletteGroup[] = [
|
||||
{ label: 'SOURCES', types: ['testpattern', 'ndiin', 'decklinkin', 'videoin'] },
|
||||
{ label: 'SOURCES', types: ['testpattern', 'ndiin', 'decklinkin', 'videoin', '2110'] },
|
||||
{ label: 'PROCESS', types: ['mix', 'pip', 'gaindb'] },
|
||||
{ label: 'SINKS', types: ['ndiout', 'decklinkout', 'fakesink'] },
|
||||
]
|
||||
@@ -27,6 +27,7 @@ const iconMap: Record<string, string> = {
|
||||
mix: '⊕',
|
||||
pip: '⊞',
|
||||
gaindb: '◎',
|
||||
2110: '◬',
|
||||
}
|
||||
|
||||
function onDragStart(event: DragEvent, nodeType: string) {
|
||||
|
||||
@@ -129,6 +129,13 @@ function onDeleteNode() {
|
||||
{{ opt.label }}
|
||||
</option>
|
||||
</select>
|
||||
<input
|
||||
v-else-if="param.type === 'input'"
|
||||
type="input"
|
||||
class="param-input"
|
||||
:value="data.params[param.key] ?? param.default"
|
||||
@change="setParam(param.key, String(($event.target as HTMLInputElement).value))"
|
||||
/>
|
||||
<input
|
||||
v-else-if="param.type === 'number'"
|
||||
type="number"
|
||||
@@ -139,7 +146,7 @@ function onDeleteNode() {
|
||||
@change="setParam(param.key, Number(($event.target as HTMLInputElement).value))"
|
||||
/>
|
||||
<input
|
||||
v-else-if="param.type === 'input'"
|
||||
v-else-if="param.type === 'file'"
|
||||
type="file"
|
||||
class="param-input-file"
|
||||
@change="handleFileChange(param.key, $event)"
|
||||
|
||||
+27
-1
@@ -51,6 +51,15 @@ export const SAMPLE_RATE_OPTIONS = [
|
||||
{ label: '96000', value: 96000 },
|
||||
]
|
||||
|
||||
export const NIC_OPTIONS = [
|
||||
{ label: 'lo', value: 'lo' },
|
||||
{ label: 'eno1', value: 'eno1' },
|
||||
{ label: 'enp119s0', value: 'enp119s0' },
|
||||
{ label: 'wlp10s0', value: 'wlp10s0' },
|
||||
{ label: 'eno1np0', value: 'eno1np0' },
|
||||
{ label: 'enp1s0f1np1', value: 'enp1s0f1np1' },
|
||||
]
|
||||
|
||||
// Format params shown on source nodes; values go into edge format (not node params)
|
||||
export const FORMAT_OPTIONS_VIDEO: ParamDef[] = [
|
||||
{ key: 'res', label: 'Resolution', type: 'select', options: RESOLUTION_OPTIONS, default: '1920x1080', isFormat: true, group: 'VIDEO' },
|
||||
@@ -137,7 +146,7 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
|
||||
{ id: 'audio-out', kind: 'audio', direction: 'out' },
|
||||
],
|
||||
params: [
|
||||
{ key: 'file', label: 'File', type: 'input', default: '0.ts' }
|
||||
{ key: 'file', label: 'File', type: 'file', default: '0.ts' }
|
||||
],
|
||||
},
|
||||
mix: {
|
||||
@@ -183,6 +192,23 @@ export const NODE_TYPES: Record<string, NodeTypeDef> = {
|
||||
{ key: 'gain_db', label: 'Gain (dB)', type: 'number', default: 0, min: -60, max: 20 },
|
||||
],
|
||||
},
|
||||
2110: {
|
||||
type: '2110',
|
||||
label: 'SMPTE 2110-20 Rx',
|
||||
ports: [
|
||||
{ id: 'video-out', kind: 'video', direction: 'out' },
|
||||
],
|
||||
params: [
|
||||
{ key: 'interface', label: 'NIC', type: 'select', options: NIC_OPTIONS, default: "eno1np0", group: 'NETWORK' },
|
||||
{ key: 'local_ip', label: 'NIC IP', type: 'input', default: "192.168.0.3", group: 'NETWORK' },
|
||||
{ key: 'source_ip', label: 'Src IP', type: 'input', default: "192.168.0.2", group: 'NETWORK' },
|
||||
{ key: 'mcast_ip', label: 'Mcast IP', type: 'input', default: "239.255.197.181", group: 'NETWORK' },
|
||||
{ key: 'udp_port', label: 'UDP Port', type: 'number', default: 16388, min: 1, max: 65536, group: 'NETWORK' },
|
||||
{ key: 'payload_type', label: 'Payload Type', type: 'number', default: 96, min: 1, max: 255, group: 'VIDEO' },
|
||||
{ key: 'res', label: 'Resolution', type: 'select', options: RESOLUTION_OPTIONS, default: '1920x1080', group: 'VIDEO' },
|
||||
{ key: 'fps', label: 'FPS', type: 'select', options: FPS_OPTIONS, default: '25', group: 'VIDEO' },
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// Default params for a new node of the given type
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export interface PortDef {
|
||||
export interface ParamDef {
|
||||
key: string
|
||||
label: string
|
||||
type: 'select' | 'number' | 'input'
|
||||
type: 'select' | 'number' | 'file' | 'input'
|
||||
options?: { label: string; value: string | number }[]
|
||||
default: string | number
|
||||
min?: number
|
||||
|
||||
Reference in New Issue
Block a user