Browse Source

Add full support for monitoring video outputs.

Georgi Chorbadzhiyski 9 years ago
parent
commit
74952e542a
18 changed files with 214 additions and 7 deletions
  1. 2
    0
      ChangeLog
  2. 18
    4
      README
  3. 20
    0
      cmd.c
  4. 4
    1
      cmd.h
  5. 20
    0
      display.c
  6. 1
    0
      display.h
  7. 19
    1
      test/input-00.txt
  8. 1
    1
      test/input-03.txt
  9. 15
    0
      test/run
  10. 11
    0
      test/test-01.ok
  11. 12
    0
      test/test-02.ok
  12. 25
    0
      test/test-03.ok
  13. 17
    0
      test/test-04.ok
  14. 11
    0
      test/test-05.ok
  15. 6
    0
      test/test-06.ok
  16. 1
    0
      test/test-07.ok
  17. 10
    0
      test/test-15.ok
  18. 21
    0
      videohubctrl.c

+ 2
- 0
ChangeLog View File

8
  * Add support for port statuses (types) which are reported by
8
  * Add support for port statuses (types) which are reported by
9
    Universal Videohub.
9
    Universal Videohub.
10
  * Rename --vo-route parameter to --vo-input.
10
  * Rename --vo-route parameter to --vo-input.
11
+ * Add support for video monitoring outputs (names, routing and locks),
12
+    --mo-name, mo-input, --mo-lock and --mo-unlock.
11
 
13
 
12
 2014-11-28 : Version 0.3
14
 2014-11-28 : Version 0.3
13
  * Rename -v / --verbose parameter to -d / --debug.
15
  * Rename -v / --verbose parameter to -d / --debug.

+ 18
- 4
README View File

9
 videohubctrl currently displays and can configure:
9
 videohubctrl currently displays and can configure:
10
 
10
 
11
   - Video input port names
11
   - Video input port names
12
-  - Video output port names
13
-  - Video output routing
14
-  - Video output locking
12
+  - Video output port names, routing and locking
15
   - Input/Output port statuses
13
   - Input/Output port statuses
14
+  - Monitoring video output port names, routing and locking
16
 
15
 
17
 The following features found in bigger Videohub models are currently
16
 The following features found in bigger Videohub models are currently
18
 not supported (I don't have the hardware):
17
 not supported (I don't have the hardware):
19
 
18
 
20
   - Configuration of video processing units
19
   - Configuration of video processing units
21
-  - Configuration of Video monitoring outputs
22
   - Configuration of Serial ports
20
   - Configuration of Serial ports
23
 
21
 
24
 Configuration of Videohub's network settings can be made using
22
 Configuration of Videohub's network settings can be made using
63
  --vo-lock <out_X>          | Lock output port X.
61
  --vo-lock <out_X>          | Lock output port X.
64
  --vo-unlock <out_X>        | Unlock output port X.
62
  --vo-unlock <out_X>        | Unlock output port X.
65
 
63
 
64
+Monitoring outputs configuration:
65
+ --mo-name <mout_X> <name>  | Set monitoring port X name.
66
+ --mo-route <mout_X> <in_Y> | Connect monitoring X to video input Y
67
+ --mo-lock <mout_X>         | Lock monitoring port X.
68
+ --mo-unlock <mout_X>       | Unlock monitoring port X.
69
+
66
 Misc options:
70
 Misc options:
67
  -T --test-input <file>     | Read commands from <file>.
71
  -T --test-input <file>     | Read commands from <file>.
68
  -d --debug                 | Increase logging verbosity.
72
  -d --debug                 | Increase logging verbosity.
199
   | 16 | O | Loopback                 | Loopback                 | o |
203
   | 16 | O | Loopback                 | Loopback                 | o |
200
   --------------------------------------------------------------------
204
   --------------------------------------------------------------------
201
 
205
 
206
+Monitoring outputs
207
+  ----------------------------------------------------------------
208
+  | ## | x | Monitoring output name   | Connected video input    |
209
+  ----------------------------------------------------------------
210
+  |  1 |   | Monitor 1                | Windows 1                |
211
+  |  2 | O | Monitor 2                | Windows 2                |
212
+  |  3 | L | Monitor 3                | Windows 3                |
213
+  |  4 |   | Monitor 4                | Windows 4 HD             |
214
+  ----------------------------------------------------------------
215
+
202
 |----------------------------------------------------------------------|
216
 |----------------------------------------------------------------------|
203
 
217
 
204
 
218
 

+ 20
- 0
cmd.c View File

28
 	[CMD_VIDEO_OUTPUT_ROUTING] = "VIDEO OUTPUT ROUTING",
28
 	[CMD_VIDEO_OUTPUT_ROUTING] = "VIDEO OUTPUT ROUTING",
29
 	[CMD_VIDEO_INPUT_STATUS]   = "VIDEO INPUT STATUS",
29
 	[CMD_VIDEO_INPUT_STATUS]   = "VIDEO INPUT STATUS",
30
 	[CMD_VIDEO_OUTPUT_STATUS]  = "VIDEO OUTPUT STATUS",
30
 	[CMD_VIDEO_OUTPUT_STATUS]  = "VIDEO OUTPUT STATUS",
31
+	[CMD_MONITORING_OUTPUT_LABELS]  = "MONITORING OUTPUT LABELS",
32
+	[CMD_MONITORING_OUTPUT_LOCKS]   = "MONITORING OUTPUT LOCKS",
33
+	[CMD_MONITORING_OUTPUT_ROUTING] = "VIDEO MONITORING OUTPUT ROUTING",
31
 	[CMD_PING]                 = "PING",
34
 	[CMD_PING]                 = "PING",
32
 	[CMD_ACK]                  = "ACK",
35
 	[CMD_ACK]                  = "ACK",
33
 	[CMD_NAK]                  = "NAK",
36
 	[CMD_NAK]                  = "NAK",
70
 		.port_id1 = "video output",
73
 		.port_id1 = "video output",
71
 		.opt_prefix = "vo",
74
 		.opt_prefix = "vo",
72
 	},
75
 	},
76
+	[CMD_MONITORING_OUTPUT_LABELS]  = { .cmd = CMD_MONITORING_OUTPUT_LABELS , .type = PARSE_LABEL,
77
+		.ports1 = OFS(mon_outputs),
78
+		.port_id1 = "monitoring output",
79
+		.opt_prefix = "mo",
80
+	},
81
+	[CMD_MONITORING_OUTPUT_LOCKS]   = { .cmd = CMD_MONITORING_OUTPUT_LOCKS  , .type = PARSE_LOCK,
82
+		.ports1 = OFS(mon_outputs),
83
+		.port_id1 = "monitoring output",
84
+		.opt_prefix = "mo",
85
+	},
86
+	[CMD_MONITORING_OUTPUT_ROUTING] = { .cmd = CMD_MONITORING_OUTPUT_ROUTING, .type = PARSE_ROUTE,
87
+		.ports1 = OFS(mon_outputs),
88
+		.ports2 = OFS(inputs),
89
+		.port_id1 = "monitoring output",
90
+		.port_id2 = "video input",
91
+		.opt_prefix = "mo",
92
+	},
73
 	[CMD_PING]                 = { .cmd = CMD_PING                , .type = PARSE_NONE },
93
 	[CMD_PING]                 = { .cmd = CMD_PING                , .type = PARSE_NONE },
74
 	[CMD_ACK]                  = { .cmd = CMD_ACK                 , .type = PARSE_NONE },
94
 	[CMD_ACK]                  = { .cmd = CMD_ACK                 , .type = PARSE_NONE },
75
 	[CMD_NAK]                  = { .cmd = CMD_NAK                 , .type = PARSE_NONE },
95
 	[CMD_NAK]                  = { .cmd = CMD_NAK                 , .type = PARSE_NONE },

+ 4
- 1
cmd.h View File

15
 
15
 
16
 #include <stdbool.h>
16
 #include <stdbool.h>
17
 
17
 
18
-#define NUM_COMMANDS 11
18
+#define NUM_COMMANDS 14
19
 
19
 
20
 enum vcmd {
20
 enum vcmd {
21
 	CMD_PROTOCOL_PREAMBLE,
21
 	CMD_PROTOCOL_PREAMBLE,
26
 	CMD_VIDEO_OUTPUT_ROUTING,
26
 	CMD_VIDEO_OUTPUT_ROUTING,
27
 	CMD_VIDEO_INPUT_STATUS,
27
 	CMD_VIDEO_INPUT_STATUS,
28
 	CMD_VIDEO_OUTPUT_STATUS,
28
 	CMD_VIDEO_OUTPUT_STATUS,
29
+	CMD_MONITORING_OUTPUT_LABELS,
30
+	CMD_MONITORING_OUTPUT_LOCKS,
31
+	CMD_MONITORING_OUTPUT_ROUTING,
29
 	CMD_PING,
32
 	CMD_PING,
30
 	CMD_ACK,
33
 	CMD_ACK,
31
 	CMD_NAK = (NUM_COMMANDS - 1),
34
 	CMD_NAK = (NUM_COMMANDS - 1),

+ 20
- 0
display.c View File

125
 	printf("\n");
125
 	printf("\n");
126
 }
126
 }
127
 
127
 
128
+void print_device_monitoring_outputs(struct videohub_data *d) {
129
+	unsigned int i, len = 64;
130
+	if (!d->mon_outputs.num)
131
+		return;
132
+	printf("Monitoring outputs\n");
133
+	printf_line(len);
134
+	printf("  | ## | x | %-24s | %-24s |\n", "Monitoring output name", "Connected video input");
135
+	printf_line(len);
136
+	for(i = 0; i < d->mon_outputs.num; i++) {
137
+		printf("  | %2d | %c | %-24s | %-24s |\n",
138
+			i + 1,
139
+			port_lock_symbol(d->mon_outputs.port[i].lock),
140
+			d->mon_outputs.port[i].name,
141
+			d->inputs.port[d->mon_outputs.port[i].routed_to].name
142
+		);
143
+	}
144
+	printf_line(len);
145
+	printf("\n");
146
+}
147
+
128
 static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
148
 static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
129
 	unsigned int i, last = 0;
149
 	unsigned int i, last = 0;
130
 	struct videohub_commands *v = &videohub_commands[vcmd];
150
 	struct videohub_commands *v = &videohub_commands[vcmd];

+ 1
- 0
display.h View File

16
 void print_device_info(struct videohub_data *d);
16
 void print_device_info(struct videohub_data *d);
17
 void print_device_video_inputs(struct videohub_data *d);
17
 void print_device_video_inputs(struct videohub_data *d);
18
 void print_device_video_outputs(struct videohub_data *d);
18
 void print_device_video_outputs(struct videohub_data *d);
19
+void print_device_monitoring_outputs(struct videohub_data *d);
19
 
20
 
20
 void print_device_backup(struct videohub_data *d);
21
 void print_device_backup(struct videohub_data *d);
21
 
22
 

+ 19
- 1
test/input-00.txt View File

8
 Video inputs: 16
8
 Video inputs: 16
9
 Video processing units: 0
9
 Video processing units: 0
10
 Video outputs: 16
10
 Video outputs: 16
11
-Video monitoring outputs: 0
11
+Video monitoring outputs: 4
12
 Serial ports: 0
12
 Serial ports: 0
13
 
13
 
14
 INPUT LABELS:
14
 INPUT LABELS:
107
 13 Optical
107
 13 Optical
108
 14 Optical
108
 14 Optical
109
 15 Optical
109
 15 Optical
110
+
111
+MONITORING OUTPUT LABELS:
112
+0 Monitor 1
113
+1 Monitor 2
114
+2 Monitor 3
115
+3 Monitor 4
116
+
117
+VIDEO MONITORING OUTPUT ROUTING:
118
+0 0
119
+1 1
120
+2 2
121
+3 3
122
+
123
+MONITORING OUTPUT LOCKS:
124
+0 U
125
+1 O
126
+2 L
127
+3 U

+ 1
- 1
test/input-03.txt View File

8
 Video inputs: 16
8
 Video inputs: 16
9
 Video processing units: 0
9
 Video processing units: 0
10
 Video outputs: 16
10
 Video outputs: 16
11
-Video monitoring outputs: 0
11
+Video monitoring outputs: 4
12
 Serial ports: 0
12
 Serial ports: 0
13
 
13
 
14
 VIDEO INPUT STATUS:
14
 VIDEO INPUT STATUS:

+ 15
- 0
test/run View File

44
 	--vo-input "Output 5" "Windows 1" \
44
 	--vo-input "Output 5" "Windows 1" \
45
 	--vo-input 5 2 \
45
 	--vo-input 5 2 \
46
 	--vo-input 5 "Windows 3" \
46
 	--vo-input 5 "Windows 3" \
47
+	--mo-name 1 "PC 1 Mon" \
48
+	--mo-name "Monitor 4" "Decklink" \
49
+	--mo-unlock 2 \
50
+	--mo-lock 4 \
51
+	--mo-name 3 "Loopback" \
52
+	--mo-input 3 16 \
47
 $@ &> test/test-04.out
53
 $@ &> test/test-04.out
48
 check test/test-04 "Test multiple configuration commands"
54
 check test/test-04 "Test multiple configuration commands"
49
 
55
 
69
 ./videohubctrl --test-input test/input-00.txt --vo-input "Input 10" "Output 10"      $@ &>> test/test-06.out
75
 ./videohubctrl --test-input test/input-00.txt --vo-input "Input 10" "Output 10"      $@ &>> test/test-06.out
70
 ./videohubctrl --test-input test/input-00.txt --vo-input "Err Output" "Input 10"     $@ &>> test/test-06.out
76
 ./videohubctrl --test-input test/input-00.txt --vo-input "Err Output" "Input 10"     $@ &>> test/test-06.out
71
 ./videohubctrl --test-input test/input-00.txt --vo-input "Output 10" "Err Input"     $@ &>> test/test-06.out
77
 ./videohubctrl --test-input test/input-00.txt --vo-input "Output 10" "Err Input"     $@ &>> test/test-06.out
78
+./videohubctrl --test-input test/input-00.txt --mo-name 18          "Test Output 18" $@ &>> test/test-06.out
79
+./videohubctrl --test-input test/input-00.txt --mo-name "Output 18" "Test Output 18" $@ &>> test/test-06.out
80
+./videohubctrl --test-input test/input-00.txt --mo-lock 18                           $@ &>> test/test-06.out
81
+./videohubctrl --test-input test/input-00.txt --mo-lock "Output 18"                  $@ &>> test/test-06.out
82
+./videohubctrl --test-input test/input-00.txt --mo-unlock 18                         $@ &>> test/test-06.out
83
+./videohubctrl --test-input test/input-00.txt --mo-unlock "Output 18"                $@ &>> test/test-06.out
72
 check test/test-06 "Test errors on commands with invalid ports."
84
 check test/test-06 "Test errors on commands with invalid ports."
73
 
85
 
74
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
86
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
91
 
103
 
92
 videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
104
 videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
93
 check test/test-14 "Test buggy input"
105
 check test/test-14 "Test buggy input"
106
+
107
+videohubctrl --test-input test/input-00.txt --list-moutputs $@ &> test/test-15.out
108
+check test/test-15 "Test --list-moutputs option output"

+ 11
- 0
test/test-01.ok View File

7
   | Protocol                   | 2.4                        |
7
   | Protocol                   | 2.4                        |
8
   | Video inputs               | 16                         |
8
   | Video inputs               | 16                         |
9
   | Video outputs              | 16                         |
9
   | Video outputs              | 16                         |
10
+  | Video monitoring outputs   | 4                          |
10
   -----------------------------------------------------------
11
   -----------------------------------------------------------
11
 
12
 
12
 Video inputs
13
 Video inputs
55
   | 16 | O | Loopback                 | Loopback                 | o |
56
   | 16 | O | Loopback                 | Loopback                 | o |
56
   --------------------------------------------------------------------
57
   --------------------------------------------------------------------
57
 
58
 
59
+Monitoring outputs
60
+  ----------------------------------------------------------------
61
+  | ## | x | Monitoring output name   | Connected video input    |
62
+  ----------------------------------------------------------------
63
+  |  1 |   | Monitor 1                | Windows 1                |
64
+  |  2 | O | Monitor 2                | Windows 2                |
65
+  |  3 | L | Monitor 3                | Windows 3                |
66
+  |  4 |   | Monitor 4                | Windows 4 HD             |
67
+  ----------------------------------------------------------------
68
+

+ 12
- 0
test/test-02.ok View File

31
   --vo-name 14 "Output 14" \
31
   --vo-name 14 "Output 14" \
32
   --vo-name 15 "Output 15" \
32
   --vo-name 15 "Output 15" \
33
   --vo-name 16 "Loopback" \
33
   --vo-name 16 "Loopback" \
34
+  --mo-name  1 "Monitor 1" \
35
+  --mo-name  2 "Monitor 2" \
36
+  --mo-name  3 "Monitor 3" \
37
+  --mo-name  4 "Monitor 4" \
34
   --vo-input  1  3 \
38
   --vo-input  1  3 \
35
   --vo-input  2  2 \
39
   --vo-input  2  2 \
36
   --vo-input  3  1 \
40
   --vo-input  3  1 \
47
   --vo-input 14 14 \
51
   --vo-input 14 14 \
48
   --vo-input 15 15 \
52
   --vo-input 15 15 \
49
   --vo-input 16 16 \
53
   --vo-input 16 16 \
54
+  --mo-input  1  1 \
55
+  --mo-input  2  2 \
56
+  --mo-input  3  3 \
57
+  --mo-input  4  4 \
50
   --vo-unlock  1 --vo-lock  1 \
58
   --vo-unlock  1 --vo-lock  1 \
51
   --vo-unlock  2 --vo-lock  2 \
59
   --vo-unlock  2 --vo-lock  2 \
52
   --vo-unlock  3 --vo-lock  3 \
60
   --vo-unlock  3 --vo-lock  3 \
63
   --vo-unlock 14 \
71
   --vo-unlock 14 \
64
   --vo-unlock 15 \
72
   --vo-unlock 15 \
65
   --vo-unlock 16 --vo-lock 16
73
   --vo-unlock 16 --vo-lock 16
74
+  --mo-unlock  1 \
75
+  --mo-unlock  2 --mo-lock  2 \
76
+  --mo-unlock  3 --mo-lock  3 \
77
+  --mo-unlock  4
66
 
78
 

+ 25
- 0
test/test-03.ok View File

30
 videohub: rename video output 14 "" to "Output 14"
30
 videohub: rename video output 14 "" to "Output 14"
31
 videohub: rename video output 15 "" to "Output 15"
31
 videohub: rename video output 15 "" to "Output 15"
32
 videohub: rename video output 16 "" to "Loopback"
32
 videohub: rename video output 16 "" to "Loopback"
33
+videohub: rename monitoring output 1 "" to "Monitor 1"
34
+videohub: rename monitoring output 2 "" to "Monitor 2"
35
+videohub: rename monitoring output 3 "" to "Monitor 3"
36
+videohub: rename monitoring output 4 "" to "Monitor 4"
33
 videohub: set video output 1 "Enc1 1" to read from video input 3 "Windows 3"
37
 videohub: set video output 1 "Enc1 1" to read from video input 3 "Windows 3"
34
 videohub: set video output 2 "Enc1 2" to read from video input 2 "Windows 2"
38
 videohub: set video output 2 "Enc1 2" to read from video input 2 "Windows 2"
35
 videohub: set video output 3 "Enc1 3" to read from video input 1 "Windows 1"
39
 videohub: set video output 3 "Enc1 3" to read from video input 1 "Windows 1"
46
 videohub: set video output 14 "Output 14" to read from video input 14 "Input 14"
50
 videohub: set video output 14 "Output 14" to read from video input 14 "Input 14"
47
 videohub: set video output 15 "Output 15" to read from video input 15 "Input 15"
51
 videohub: set video output 15 "Output 15" to read from video input 15 "Input 15"
48
 videohub: set video output 16 "Loopback" to read from video input 16 "Loopback"
52
 videohub: set video output 16 "Loopback" to read from video input 16 "Loopback"
53
+videohub: set monitoring output 1 "Monitor 1" to read from video input 1 "Windows 1"
54
+videohub: set monitoring output 2 "Monitor 2" to read from video input 2 "Windows 2"
55
+videohub: set monitoring output 3 "Monitor 3" to read from video input 3 "Windows 3"
56
+videohub: set monitoring output 4 "Monitor 4" to read from video input 4 "Windows 4 HD"
49
 videohub: unlock video output 1 "Enc1 1"
57
 videohub: unlock video output 1 "Enc1 1"
50
 videohub: lock video output 1 "Enc1 1"
58
 videohub: lock video output 1 "Enc1 1"
51
 videohub: unlock video output 2 "Enc1 2"
59
 videohub: unlock video output 2 "Enc1 2"
70
 videohub: unlock video output 15 "Output 15"
78
 videohub: unlock video output 15 "Output 15"
71
 videohub: unlock video output 16 "Loopback"
79
 videohub: unlock video output 16 "Loopback"
72
 videohub: lock video output 16 "Loopback"
80
 videohub: lock video output 16 "Loopback"
81
+videohub: unlock monitoring output 1 "Monitor 1"
82
+videohub: unlock monitoring output 2 "Monitor 2"
83
+videohub: lock monitoring output 2 "Monitor 2"
84
+videohub: unlock monitoring output 3 "Monitor 3"
85
+videohub: lock monitoring output 3 "Monitor 3"
86
+videohub: unlock monitoring output 4 "Monitor 4"
73
 Device info
87
 Device info
74
   -----------------------------------------------------------
88
   -----------------------------------------------------------
75
   | Device address             | sdi-matrix                 |
89
   | Device address             | sdi-matrix                 |
79
   | Protocol                   | 2.4                        |
93
   | Protocol                   | 2.4                        |
80
   | Video inputs               | 16                         |
94
   | Video inputs               | 16                         |
81
   | Video outputs              | 16                         |
95
   | Video outputs              | 16                         |
96
+  | Video monitoring outputs   | 4                          |
82
   -----------------------------------------------------------
97
   -----------------------------------------------------------
83
 
98
 
84
 Video inputs
99
 Video inputs
127
   | 16 | O | Loopback                 | Loopback                 | o |
142
   | 16 | O | Loopback                 | Loopback                 | o |
128
   --------------------------------------------------------------------
143
   --------------------------------------------------------------------
129
 
144
 
145
+Monitoring outputs
146
+  ----------------------------------------------------------------
147
+  | ## | x | Monitoring output name   | Connected video input    |
148
+  ----------------------------------------------------------------
149
+  |  1 |   | Monitor 1                | Windows 1                |
150
+  |  2 | O | Monitor 2                | Windows 2                |
151
+  |  3 | O | Monitor 3                | Windows 3                |
152
+  |  4 |   | Monitor 4                | Windows 4 HD             |
153
+  ----------------------------------------------------------------
154
+

+ 17
- 0
test/test-04.ok View File

10
 videohub: set video output 5 "Output 5" to read from video input 1 "Windows 1"
10
 videohub: set video output 5 "Output 5" to read from video input 1 "Windows 1"
11
 videohub: set video output 5 "Output 5" to read from video input 2 "Windows 2"
11
 videohub: set video output 5 "Output 5" to read from video input 2 "Windows 2"
12
 videohub: set video output 5 "Output 5" to read from video input 3 "Windows 3"
12
 videohub: set video output 5 "Output 5" to read from video input 3 "Windows 3"
13
+videohub: rename monitoring output 1 "Monitor 1" to "PC 1 Mon"
14
+videohub: rename monitoring output 4 "Monitor 4" to "Decklink"
15
+videohub: unlock monitoring output 2 "Monitor 2"
16
+videohub: lock monitoring output 4 "Decklink"
17
+videohub: rename monitoring output 3 "Monitor 3" to "Loopback"
18
+videohub: set monitoring output 3 "Loopback" to read from video input 16 "Loopback"
13
 Device info
19
 Device info
14
   -----------------------------------------------------------
20
   -----------------------------------------------------------
15
   | Device address             | sdi-matrix                 |
21
   | Device address             | sdi-matrix                 |
19
   | Protocol                   | 2.4                        |
25
   | Protocol                   | 2.4                        |
20
   | Video inputs               | 16                         |
26
   | Video inputs               | 16                         |
21
   | Video outputs              | 16                         |
27
   | Video outputs              | 16                         |
28
+  | Video monitoring outputs   | 4                          |
22
   -----------------------------------------------------------
29
   -----------------------------------------------------------
23
 
30
 
24
 Video inputs
31
 Video inputs
68
   | 16 | O | Dev-Lo                   | Loopback                 | o |
75
   | 16 | O | Dev-Lo                   | Loopback                 | o |
69
   --------------------------------------------------------------------
76
   --------------------------------------------------------------------
70
 
77
 
78
+Monitoring outputs
79
+  ----------------------------------------------------------------
80
+  | ## | x | Monitoring output name   | Connected video input    |
81
+  ----------------------------------------------------------------
82
+  |  1 |   | PC 1 Mon                 | Windows 1                |
83
+  |  2 |   | Monitor 2                | Windows 2                |
84
+  |  3 | L | Loopback                 | Loopback                 |
85
+  |  4 | O | Decklink                 | Windows 4 HighDef        |
86
+  ----------------------------------------------------------------
87
+

+ 11
- 0
test/test-05.ok View File

7
   | Protocol                   | 2.4                        |
7
   | Protocol                   | 2.4                        |
8
   | Video inputs               | 16                         |
8
   | Video inputs               | 16                         |
9
   | Video outputs              | 16                         |
9
   | Video outputs              | 16                         |
10
+  | Video monitoring outputs   | 4                          |
10
   -----------------------------------------------------------
11
   -----------------------------------------------------------
11
 
12
 
12
 Video inputs
13
 Video inputs
55
   | 16 | O | Loopback                 | Loopback                 | o |
56
   | 16 | O | Loopback                 | Loopback                 | o |
56
   --------------------------------------------------------------------
57
   --------------------------------------------------------------------
57
 
58
 
59
+Monitoring outputs
60
+  ----------------------------------------------------------------
61
+  | ## | x | Monitoring output name   | Connected video input    |
62
+  ----------------------------------------------------------------
63
+  |  1 |   | Monitor 1                | Windows 1                |
64
+  |  2 | O | Monitor 2                | Windows 2                |
65
+  |  3 | O | Monitor 3                | Windows 3                |
66
+  |  4 |   | Monitor 4                | Windows 4 HD             |
67
+  ----------------------------------------------------------------
68
+

+ 6
- 0
test/test-06.ok View File

16
 ERROR: Unknown video output port number/name: Input 10
16
 ERROR: Unknown video output port number/name: Input 10
17
 ERROR: Unknown video output port number/name: Err Output
17
 ERROR: Unknown video output port number/name: Err Output
18
 ERROR: Unknown video input port number/name: Err Input
18
 ERROR: Unknown video input port number/name: Err Input
19
+ERROR: Unknown monitoring output port number/name: 18
20
+ERROR: Unknown monitoring output port number/name: Output 18
21
+ERROR: Unknown monitoring output port number/name: 18
22
+ERROR: Unknown monitoring output port number/name: Output 18
23
+ERROR: Unknown monitoring output port number/name: 18
24
+ERROR: Unknown monitoring output port number/name: Output 18

+ 1
- 0
test/test-07.ok View File

7
   | Protocol                   | 2.4                        |
7
   | Protocol                   | 2.4                        |
8
   | Video inputs               | 16                         |
8
   | Video inputs               | 16                         |
9
   | Video outputs              | 16                         |
9
   | Video outputs              | 16                         |
10
+  | Video monitoring outputs   | 4                          |
10
   -----------------------------------------------------------
11
   -----------------------------------------------------------
11
 
12
 

+ 10
- 0
test/test-15.ok View File

1
+Monitoring outputs
2
+  ----------------------------------------------------------------
3
+  | ## | x | Monitoring output name   | Connected video input    |
4
+  ----------------------------------------------------------------
5
+  |  1 |   | Monitor 1                | Windows 1                |
6
+  |  2 | O | Monitor 2                | Windows 2                |
7
+  |  3 | L | Monitor 3                | Windows 3                |
8
+  |  4 |   | Monitor 4                | Windows 4 HD             |
9
+  ----------------------------------------------------------------
10
+

+ 21
- 0
videohubctrl.c View File

41
 	action_list_device		= (1 << 0),
41
 	action_list_device		= (1 << 0),
42
 	action_list_vinputs		= (1 << 1),
42
 	action_list_vinputs		= (1 << 1),
43
 	action_list_voutputs	= (1 << 2),
43
 	action_list_voutputs	= (1 << 2),
44
+	action_list_moutputs	= (1 << 3),
44
 };
45
 };
45
 
46
 
46
 static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
47
 static const char *program_id = PROGRAM_NAME " Version: " VERSION " Git: " GIT_VER;
61
 	{ "list-device",		no_argument,       NULL, 901 },
62
 	{ "list-device",		no_argument,       NULL, 901 },
62
 	{ "list-vinputs",		no_argument,       NULL, 902 },
63
 	{ "list-vinputs",		no_argument,       NULL, 902 },
63
 	{ "list-voutputs",		no_argument,       NULL, 903 },
64
 	{ "list-voutputs",		no_argument,       NULL, 903 },
65
+	{ "list-moutputs",		no_argument,       NULL, 904 },
64
 	{ "vi-name",			required_argument, NULL, 1001 },
66
 	{ "vi-name",			required_argument, NULL, 1001 },
65
 	{ "vo-name",			required_argument, NULL, 2001 },
67
 	{ "vo-name",			required_argument, NULL, 2001 },
66
 	{ "vo-input",			required_argument, NULL, 2002 },
68
 	{ "vo-input",			required_argument, NULL, 2002 },
67
 	{ "vo-route",			required_argument, NULL, 2002 }, // Alias of --vo-input
69
 	{ "vo-route",			required_argument, NULL, 2002 }, // Alias of --vo-input
68
 	{ "vo-lock",			required_argument, NULL, 2003 },
70
 	{ "vo-lock",			required_argument, NULL, 2003 },
69
 	{ "vo-unlock",			required_argument, NULL, 2004 },
71
 	{ "vo-unlock",			required_argument, NULL, 2004 },
72
+	{ "mo-name",			required_argument, NULL, 3001 },
73
+	{ "mo-input",			required_argument, NULL, 3002 },
74
+	{ "mo-route",			required_argument, NULL, 3002 }, // Alias of --mo-input
75
+	{ "mo-lock",			required_argument, NULL, 3003 },
76
+	{ "mo-unlock",			required_argument, NULL, 3004 },
70
 	{ 0, 0, 0, 0 }
77
 	{ 0, 0, 0, 0 }
71
 };
78
 };
72
 
79
 
90
 	printf(" --list-device              | Display device info.\n");
97
 	printf(" --list-device              | Display device info.\n");
91
 	printf(" --list-vinputs             | List device video inputs.\n");
98
 	printf(" --list-vinputs             | List device video inputs.\n");
92
 	printf(" --list-voutputs            | List device video outputs.\n");
99
 	printf(" --list-voutputs            | List device video outputs.\n");
100
+	printf(" --list-moutputs            | List device monitoring outputs.\n");
93
 	printf("\n");
101
 	printf("\n");
94
 	printf("Video inputs configuration:\n");
102
 	printf("Video inputs configuration:\n");
95
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
103
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
100
 	printf(" --vo-lock <out_X>          | Lock output port X.\n");
108
 	printf(" --vo-lock <out_X>          | Lock output port X.\n");
101
 	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
109
 	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
102
 	printf("\n");
110
 	printf("\n");
111
+	printf("Monitoring outputs configuration:\n");
112
+	printf(" --mo-name <mout_X> <name>  | Set monitoring port X name.\n");
113
+	printf(" --mo-route <mout_X> <in_Y> | Connect monitoring X to video input Y\n");
114
+	printf(" --mo-lock <mout_X>         | Lock monitoring port X.\n");
115
+	printf(" --mo-unlock <mout_X>       | Unlock monitoring port X.\n");
116
+	printf("\n");
103
 	printf("Misc options:\n");
117
 	printf("Misc options:\n");
104
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
118
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
105
 	printf(" -d --debug                 | Increase logging verbosity.\n");
119
 	printf(" -d --debug                 | Increase logging verbosity.\n");
191
 			case 901: show_list |= action_list_device; break; // --list-device
205
 			case 901: show_list |= action_list_device; break; // --list-device
192
 			case 902: show_list |= action_list_vinputs; break; // --list-vinputs
206
 			case 902: show_list |= action_list_vinputs; break; // --list-vinputs
193
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
207
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
208
+			case 904: show_list |= action_list_moutputs; break; // --list-moutputs
194
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
209
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
195
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
210
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
196
 			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-input
211
 			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-input
197
 			case 2003: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, true); break; // --vo-lock
212
 			case 2003: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, true); break; // --vo-lock
198
 			case 2004: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, false); break; // --vo-unlock
213
 			case 2004: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, false); break; // --vo-unlock
214
+			case 3001: parse_cmd2(argc, argv, CMD_MONITORING_OUTPUT_LABELS); break; // --mo-name
215
+			case 3002: parse_cmd2(argc, argv, CMD_MONITORING_OUTPUT_ROUTING); break; // --mo-route
216
+			case 3003: parse_cmd1(argc, argv, CMD_MONITORING_OUTPUT_LOCKS, true); break; // --mo-lock
217
+			case 3004: parse_cmd1(argc, argv, CMD_MONITORING_OUTPUT_LOCKS, false); break; // --mo-unlock
199
 			case 'H': // --help
218
 			case 'H': // --help
200
 				show_help(data);
219
 				show_help(data);
201
 				exit(EXIT_SUCCESS);
220
 				exit(EXIT_SUCCESS);
228
 	print_device_info(d);
247
 	print_device_info(d);
229
 	print_device_video_inputs(d);
248
 	print_device_video_inputs(d);
230
 	print_device_video_outputs(d);
249
 	print_device_video_outputs(d);
250
+	print_device_monitoring_outputs(d);
231
 	fflush(stdout);
251
 	fflush(stdout);
232
 }
252
 }
233
 
253
 
330
 		if (show_list & action_list_device)		print_device_info(data);
350
 		if (show_list & action_list_device)		print_device_info(data);
331
 		if (show_list & action_list_vinputs)	print_device_video_inputs(data);
351
 		if (show_list & action_list_vinputs)	print_device_video_inputs(data);
332
 		if (show_list & action_list_voutputs)	print_device_video_outputs(data);
352
 		if (show_list & action_list_voutputs)	print_device_video_outputs(data);
353
+		if (show_list & action_list_moutputs)	print_device_monitoring_outputs(data);
333
 		fflush(stdout);
354
 		fflush(stdout);
334
 	} else if (show_backup) {
355
 	} else if (show_backup) {
335
 		print_device_backup(data);
356
 		print_device_backup(data);

Loading…
Cancel
Save