Browse Source

Add support for --list-proc-units and --list-frames options.

--list-proc-units was documented in 1.0 release but it was never
wired up to work. --list-frames was not documented in 1.0 and it
wasn't working either.
Georgi Chorbadzhiyski 9 years ago
parent
commit
e035d99753
5 changed files with 37 additions and 0 deletions
  1. 3
    0
      ChangeLog
  2. 6
    0
      test/run
  3. 10
    0
      test/test-18.ok
  4. 14
    0
      test/test-19.ok
  5. 4
    0
      videohubctrl.c

+ 3
- 0
ChangeLog View File

@@ -1,4 +1,7 @@
1 1
 |-----------------------------------------------------------------------|
2
+xxxx-xx-xx : Version -next
3
+ * Add support for --list-proc-units and --list-frames.
4
+
2 5
 2014-12-03 : Version 1.0
3 6
  * Add missing documentation for --list-moutputs parameter.
4 7
  * Add support for serial ports (names, routing, locks and directions),

+ 6
- 0
test/run View File

@@ -142,3 +142,9 @@ check test/test-16 "Test --list-serial option output"
142 142
 
143 143
 videohubctrl --test-input test/input-17.txt --info $@ &> test/test-17.out
144 144
 check test/test-17 "Test wider range of input commands"
145
+
146
+videohubctrl --test-input test/input-00.txt --list-proc-units $@ &> test/test-18.out
147
+check test/test-18 "Test --list-proc-units option output"
148
+
149
+videohubctrl --test-input test/input-00.txt --list-frames $@ &> test/test-19.out
150
+check test/test-19 "Test --list-frames option output"

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

@@ -0,0 +1,10 @@
1
+Processing units
2
+  --------------------------------------------
3
+  | Proc Unit | x | Connected video input    |
4
+  --------------------------------------------
5
+  |         1 | L | Windows 4 HD             |
6
+  |         2 |   | Windows 2                |
7
+  |         3 | O |                          |
8
+  |         4 |   | Windows 3                |
9
+  --------------------------------------------
10
+

+ 14
- 0
test/test-19.ok View File

@@ -0,0 +1,14 @@
1
+Frames
2
+  -----------------------------------------------------------------
3
+  | ### | x | Frame name               | Connected output         |
4
+  -----------------------------------------------------------------
5
+  |   1 |   | Frame 1                  | Output 13                |
6
+  |   2 | L | Frame 2                  | Output 14                |
7
+  |   3 | O | Frame 3                  | Output 15                |
8
+  |   4 |   | Frame 4                  |                          |
9
+  |   5 |   | Frame 5                  |                          |
10
+  |   6 |   | Frame 6                  |                          |
11
+  |   7 |   | Frame 7                  |                          |
12
+  |   8 |   | Frame 8                  |                          |
13
+  -----------------------------------------------------------------
14
+

+ 4
- 0
videohubctrl.c View File

@@ -67,6 +67,8 @@ static const struct option long_options[] = {
67 67
 	{ "list-voutputs",		no_argument,       NULL, 903 },
68 68
 	{ "list-moutputs",		no_argument,       NULL, 904 },
69 69
 	{ "list-serial",		no_argument,       NULL, 905 },
70
+	{ "list-proc-units",	no_argument,       NULL, 906 },
71
+	{ "list-frames",		no_argument,       NULL, 907 },
70 72
 	{ "vi-name",			required_argument, NULL, 1001 },
71 73
 	{ "vo-name",			required_argument, NULL, 2001 },
72 74
 	{ "vo-input",			required_argument, NULL, 2002 },
@@ -277,6 +279,8 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
277 279
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
278 280
 			case 904: show_list |= action_list_moutputs; break; // --list-moutputs
279 281
 			case 905: show_list |= action_list_serial; break; // --list-serial
282
+			case 906: show_list |= action_list_proc_units; break; // --list-proc-units
283
+			case 907: show_list |= action_list_frames; break; // --list-frames
280 284
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
281 285
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
282 286
 			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-input

Loading…
Cancel
Save