Browse Source

Rename --vo-route parameter to --vo-input.

Georgi Chorbadzhiyski 9 years ago
parent
commit
96aab1363d
7 changed files with 48 additions and 50 deletions
  1. 1
    0
      ChangeLog
  2. 7
    9
      README
  3. 1
    1
      display.c
  4. 12
    12
      test/run
  5. 16
    16
      test/test-02.ok
  6. 4
    4
      videohubctrl.1
  7. 7
    8
      videohubctrl.c

+ 1
- 0
ChangeLog View File

7
    in text file by using -T / --test-input option.
7
    in text file by using -T / --test-input option.
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
 
11
 
11
 2014-11-28 : Version 0.3
12
 2014-11-28 : Version 0.3
12
  * Rename -v / --verbose parameter to -d / --debug.
13
  * Rename -v / --verbose parameter to -d / --debug.

+ 7
- 9
README View File

54
  --list-vinputs             | List device video inputs.
54
  --list-vinputs             | List device video inputs.
55
  --list-voutputs            | List device video outputs.
55
  --list-voutputs            | List device video outputs.
56
 
56
 
57
-Video input/output configuration:
57
+Video inputs configuration:
58
  --vi-name <in_X> <name>    | Set video input port X name.
58
  --vi-name <in_X> <name>    | Set video input port X name.
59
+
60
+Video outputs configuration:
59
  --vo-name <out_X> <name>   | Set video output port X name.
61
  --vo-name <out_X> <name>   | Set video output port X name.
60
-
61
- --vo-route <out_X> <in_Y>  | Connect video output X to video input Y
62
-
62
+ --vo-input <out_X> <in_Y>  | Connect video output X to video input Y
63
  --vo-lock <out_X>          | Lock output port X.
63
  --vo-lock <out_X>          | Lock output port X.
64
  --vo-unlock <out_X>        | Unlock output port X.
64
  --vo-unlock <out_X>        | Unlock output port X.
65
 
65
 
66
-   For <in_X/out_X/in_Y> you may use port number or port name.
67
-
68
 Misc options:
66
 Misc options:
69
  -T --test-input <file>     | Read commands from <file>.
67
  -T --test-input <file>     | Read commands from <file>.
70
  -d --debug                 | Increase logging verbosity.
68
  -d --debug                 | Increase logging verbosity.
113
 
111
 
114
  # Set two outputs to receive from the same input using port names
112
  # Set two outputs to receive from the same input using port names
115
 
113
 
116
-   videohubctrl -h sdi --vo-route "Output 8" "Windows 4 HD"
117
-   videohubctrl -h sdi --vo-route "Output 7" "Windows 4 HD"
114
+   videohubctrl -h sdi --vo-input "Output 8" "Windows 4 HD"
115
+   videohubctrl -h sdi --vo-input "Output 7" "Windows 4 HD"
118
 
116
 
119
 
117
 
120
  # Run several commands at once
118
  # Run several commands at once
127
                 --vi-name 11 "Test input" \
125
                 --vi-name 11 "Test input" \
128
                 --vi-name 12 "Playout input" \
126
                 --vi-name 12 "Playout input" \
129
                 --vo-name 5 "Encoder h264" \
127
                 --vo-name 5 "Encoder h264" \
130
-                --vo-route 5 12 \
128
+                --vo-input 5 12 \
131
                 --vo-lock 5
129
                 --vo-lock 5
132
 
130
 
133
 
131
 

+ 1
- 1
display.c View File

136
 			printf("  --%s-name %2d \"%s\" \\\n", p, i + 1, s_port->port[i].name);
136
 			printf("  --%s-name %2d \"%s\" \\\n", p, i + 1, s_port->port[i].name);
137
 			break;
137
 			break;
138
 		case PARSE_ROUTE:
138
 		case PARSE_ROUTE:
139
-			printf("  --%s-route %2d %2d \\\n", p, i + 1, s_port->port[i].routed_to + 1);
139
+			printf("  --%s-input %2d %2d \\\n", p, i + 1, s_port->port[i].routed_to + 1);
140
 			break;
140
 			break;
141
 		case PARSE_LOCK:
141
 		case PARSE_LOCK:
142
 			last = i + 1 < s_port->num;
142
 			last = i + 1 < s_port->num;

+ 12
- 12
test/run View File

41
 	--vo-lock "Output 15" \
41
 	--vo-lock "Output 15" \
42
 	--vo-unlock 12 \
42
 	--vo-unlock 12 \
43
 	--vo-unlock "Enc2 1" \
43
 	--vo-unlock "Enc2 1" \
44
-	--vo-route "Output 5" "Windows 1" \
45
-	--vo-route 5 2 \
46
-	--vo-route 5 "Windows 3" \
44
+	--vo-input "Output 5" "Windows 1" \
45
+	--vo-input 5 2 \
46
+	--vo-input 5 "Windows 3" \
47
 $@ &> test/test-04.out
47
 $@ &> test/test-04.out
48
 check test/test-04 "Test multiple configuration commands"
48
 check test/test-04 "Test multiple configuration commands"
49
 
49
 
60
 ./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18"                  $@ &>> test/test-06.out
60
 ./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18"                  $@ &>> test/test-06.out
61
 ./videohubctrl --test-input test/input-00.txt --vo-unlock 18                         $@ &>> test/test-06.out
61
 ./videohubctrl --test-input test/input-00.txt --vo-unlock 18                         $@ &>> test/test-06.out
62
 ./videohubctrl --test-input test/input-00.txt --vo-unlock "Output 18"                $@ &>> test/test-06.out
62
 ./videohubctrl --test-input test/input-00.txt --vo-unlock "Output 18"                $@ &>> test/test-06.out
63
-./videohubctrl --test-input test/input-00.txt --vo-route 0 0                         $@ &>> test/test-06.out
64
-./videohubctrl --test-input test/input-00.txt --vo-route 0 18                        $@ &>> test/test-06.out
65
-./videohubctrl --test-input test/input-00.txt --vo-route 18 0                        $@ &>> test/test-06.out
66
-./videohubctrl --test-input test/input-00.txt --vo-route 18 18                       $@ &>> test/test-06.out
67
-./videohubctrl --test-input test/input-00.txt --vo-route 1  18                       $@ &>> test/test-06.out
68
-./videohubctrl --test-input test/input-00.txt --vo-route 18 1                        $@ &>> test/test-06.out
69
-./videohubctrl --test-input test/input-00.txt --vo-route "Input 10" "Output 10"      $@ &>> test/test-06.out
70
-./videohubctrl --test-input test/input-00.txt --vo-route "Err Output" "Input 10"     $@ &>> test/test-06.out
71
-./videohubctrl --test-input test/input-00.txt --vo-route "Output 10" "Err Input"     $@ &>> test/test-06.out
63
+./videohubctrl --test-input test/input-00.txt --vo-input 0 0                         $@ &>> test/test-06.out
64
+./videohubctrl --test-input test/input-00.txt --vo-input 0 18                        $@ &>> test/test-06.out
65
+./videohubctrl --test-input test/input-00.txt --vo-input 18 0                        $@ &>> test/test-06.out
66
+./videohubctrl --test-input test/input-00.txt --vo-input 18 18                       $@ &>> test/test-06.out
67
+./videohubctrl --test-input test/input-00.txt --vo-input 1  18                       $@ &>> test/test-06.out
68
+./videohubctrl --test-input test/input-00.txt --vo-input 18 1                        $@ &>> test/test-06.out
69
+./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
71
+./videohubctrl --test-input test/input-00.txt --vo-input "Output 10" "Err Input"     $@ &>> test/test-06.out
72
 check test/test-06 "Test errors on commands with invalid ports."
72
 check test/test-06 "Test errors on commands with invalid ports."
73
 
73
 
74
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
74
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out

+ 16
- 16
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
-  --vo-route  1  3 \
35
-  --vo-route  2  2 \
36
-  --vo-route  3  1 \
37
-  --vo-route  4  1 \
38
-  --vo-route  5  5 \
39
-  --vo-route  6  6 \
40
-  --vo-route  7  7 \
41
-  --vo-route  8  4 \
42
-  --vo-route  9  4 \
43
-  --vo-route 10 10 \
44
-  --vo-route 11 11 \
45
-  --vo-route 12 13 \
46
-  --vo-route 13 12 \
47
-  --vo-route 14 14 \
48
-  --vo-route 15 15 \
49
-  --vo-route 16 16 \
34
+  --vo-input  1  3 \
35
+  --vo-input  2  2 \
36
+  --vo-input  3  1 \
37
+  --vo-input  4  1 \
38
+  --vo-input  5  5 \
39
+  --vo-input  6  6 \
40
+  --vo-input  7  7 \
41
+  --vo-input  8  4 \
42
+  --vo-input  9  4 \
43
+  --vo-input 10 10 \
44
+  --vo-input 11 11 \
45
+  --vo-input 12 13 \
46
+  --vo-input 13 12 \
47
+  --vo-input 14 14 \
48
+  --vo-input 15 15 \
49
+  --vo-input 16 16 \
50
   --vo-unlock  1 --vo-lock  1 \
50
   --vo-unlock  1 --vo-lock  1 \
51
   --vo-unlock  2 --vo-lock  2 \
51
   --vo-unlock  2 --vo-lock  2 \
52
   --vo-unlock  3 --vo-lock  3 \
52
   --vo-unlock  3 --vo-lock  3 \

+ 4
- 4
videohubctrl.1 View File

82
 \fB\-\-vo\-name\fR <out_X> <name>
82
 \fB\-\-vo\-name\fR <out_X> <name>
83
 Set video output port X name.
83
 Set video output port X name.
84
 .TP
84
 .TP
85
-\fB\-\-vo\-route\fR <out_X> <in_Y>
85
+\fB\-\-vo\-input\fR <out_X> <in_Y>
86
 Connect video output X to video input Y.
86
 Connect video output X to video input Y.
87
 .TP
87
 .TP
88
 \fB\-\-vo\-lock\fR <out_X>
88
 \fB\-\-vo\-lock\fR <out_X>
139
    videohubctrl --vo-unlock "Output 16"
139
    videohubctrl --vo-unlock "Output 16"
140
 
140
 
141
  # Set two outputs to receive from the same input using port names
141
  # Set two outputs to receive from the same input using port names
142
-   videohubctrl -h sdi --vo-route "Output 8" "Windows 4 HD"
143
-   videohubctrl -h sdi --vo-route "Output 7" "Windows 4 HD"
142
+   videohubctrl -h sdi --vo-input "Output 8" "Windows 4 HD"
143
+   videohubctrl -h sdi --vo-input "Output 7" "Windows 4 HD"
144
 
144
 
145
  # Run several commands at once
145
  # Run several commands at once
146
  # Rename video input 11 and 12
146
  # Rename video input 11 and 12
151
                 --vi-name 11 "Test input" \\
151
                 --vi-name 11 "Test input" \\
152
                 --vi-name 12 "Playout input" \\
152
                 --vi-name 12 "Playout input" \\
153
                 --vo-name 5 "Encoder h264" \\
153
                 --vo-name 5 "Encoder h264" \\
154
-                --vo-route 5 12 \\
154
+                --vo-input 5 12 \\
155
                 --vo-lock 5
155
                 --vo-lock 5
156
 .fi
156
 .fi
157
 .SH SEE ALSO
157
 .SH SEE ALSO

+ 7
- 8
videohubctrl.c View File

63
 	{ "list-voutputs",		no_argument,       NULL, 903 },
63
 	{ "list-voutputs",		no_argument,       NULL, 903 },
64
 	{ "vi-name",			required_argument, NULL, 1001 },
64
 	{ "vi-name",			required_argument, NULL, 1001 },
65
 	{ "vo-name",			required_argument, NULL, 2001 },
65
 	{ "vo-name",			required_argument, NULL, 2001 },
66
-	{ "vo-route",			required_argument, NULL, 2002 },
66
+	{ "vo-input",			required_argument, NULL, 2002 },
67
+	{ "vo-route",			required_argument, NULL, 2002 }, // Alias of --vo-input
67
 	{ "vo-lock",			required_argument, NULL, 2003 },
68
 	{ "vo-lock",			required_argument, NULL, 2003 },
68
 	{ "vo-unlock",			required_argument, NULL, 2004 },
69
 	{ "vo-unlock",			required_argument, NULL, 2004 },
69
 	{ 0, 0, 0, 0 }
70
 	{ 0, 0, 0, 0 }
90
 	printf(" --list-vinputs             | List device video inputs.\n");
91
 	printf(" --list-vinputs             | List device video inputs.\n");
91
 	printf(" --list-voutputs            | List device video outputs.\n");
92
 	printf(" --list-voutputs            | List device video outputs.\n");
92
 	printf("\n");
93
 	printf("\n");
93
-	printf("Video input/output configuration:\n");
94
+	printf("Video inputs configuration:\n");
94
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
95
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
96
+	printf("\n");
97
+	printf("Video outputs configuration:\n");
95
 	printf(" --vo-name <out_X> <name>   | Set video output port X name.\n");
98
 	printf(" --vo-name <out_X> <name>   | Set video output port X name.\n");
96
-	printf("\n");
97
-	printf(" --vo-route <out_X> <in_Y>  | Connect video output X to video input Y\n");
98
-	printf("\n");
99
+	printf(" --vo-input <out_X> <in_Y>  | Connect video output X to video input Y\n");
99
 	printf(" --vo-lock <out_X>          | Lock output port X.\n");
100
 	printf(" --vo-lock <out_X>          | Lock output port X.\n");
100
 	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
101
 	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
101
 	printf("\n");
102
 	printf("\n");
102
-	printf("   For <in_X/out_X/in_Y> you may use port number or port name.\n");
103
-	printf("\n");
104
 	printf("Misc options:\n");
103
 	printf("Misc options:\n");
105
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
104
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
106
 	printf(" -d --debug                 | Increase logging verbosity.\n");
105
 	printf(" -d --debug                 | Increase logging verbosity.\n");
194
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
193
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
195
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
194
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
196
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
195
 			case 2001: parse_cmd2(argc, argv, CMD_OUTPUT_LABELS); break; // --vo-name
197
-			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-route
196
+			case 2002: parse_cmd2(argc, argv, CMD_VIDEO_OUTPUT_ROUTING); break; // --vo-input
198
 			case 2003: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, true); break; // --vo-lock
197
 			case 2003: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, true); break; // --vo-lock
199
 			case 2004: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, false); break; // --vo-unlock
198
 			case 2004: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, false); break; // --vo-unlock
200
 			case 'H': // --help
199
 			case 'H': // --help

Loading…
Cancel
Save