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,6 +7,7 @@
7 7
    in text file by using -T / --test-input option.
8 8
  * Add support for port statuses (types) which are reported by
9 9
    Universal Videohub.
10
+ * Rename --vo-route parameter to --vo-input.
10 11
 
11 12
 2014-11-28 : Version 0.3
12 13
  * Rename -v / --verbose parameter to -d / --debug.

+ 7
- 9
README View File

@@ -54,17 +54,15 @@ Commands:
54 54
  --list-vinputs             | List device video inputs.
55 55
  --list-voutputs            | List device video outputs.
56 56
 
57
-Video input/output configuration:
57
+Video inputs configuration:
58 58
  --vi-name <in_X> <name>    | Set video input port X name.
59
+
60
+Video outputs configuration:
59 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 63
  --vo-lock <out_X>          | Lock output port X.
64 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 66
 Misc options:
69 67
  -T --test-input <file>     | Read commands from <file>.
70 68
  -d --debug                 | Increase logging verbosity.
@@ -113,8 +111,8 @@ Example usage
113 111
 
114 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 118
  # Run several commands at once
@@ -127,7 +125,7 @@ Example usage
127 125
                 --vi-name 11 "Test input" \
128 126
                 --vi-name 12 "Playout input" \
129 127
                 --vo-name 5 "Encoder h264" \
130
-                --vo-route 5 12 \
128
+                --vo-input 5 12 \
131 129
                 --vo-lock 5
132 130
 
133 131
 

+ 1
- 1
display.c View File

@@ -136,7 +136,7 @@ static void __print_opt(struct videohub_data *d, enum vcmd vcmd) {
136 136
 			printf("  --%s-name %2d \"%s\" \\\n", p, i + 1, s_port->port[i].name);
137 137
 			break;
138 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 140
 			break;
141 141
 		case PARSE_LOCK:
142 142
 			last = i + 1 < s_port->num;

+ 12
- 12
test/run View File

@@ -41,9 +41,9 @@ videohubctrl --test-input test/input-00.txt \
41 41
 	--vo-lock "Output 15" \
42 42
 	--vo-unlock 12 \
43 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 47
 $@ &> test/test-04.out
48 48
 check test/test-04 "Test multiple configuration commands"
49 49
 
@@ -60,15 +60,15 @@ check test/test-05 "Test if --backup restored correct config."
60 60
 ./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18"                  $@ &>> test/test-06.out
61 61
 ./videohubctrl --test-input test/input-00.txt --vo-unlock 18                         $@ &>> test/test-06.out
62 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 72
 check test/test-06 "Test errors on commands with invalid ports."
73 73
 
74 74
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out

+ 16
- 16
test/test-02.ok View File

@@ -31,22 +31,22 @@ videohubctrl \
31 31
   --vo-name 14 "Output 14" \
32 32
   --vo-name 15 "Output 15" \
33 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 50
   --vo-unlock  1 --vo-lock  1 \
51 51
   --vo-unlock  2 --vo-lock  2 \
52 52
   --vo-unlock  3 --vo-lock  3 \

+ 4
- 4
videohubctrl.1 View File

@@ -82,7 +82,7 @@ Set video input port X name.
82 82
 \fB\-\-vo\-name\fR <out_X> <name>
83 83
 Set video output port X name.
84 84
 .TP
85
-\fB\-\-vo\-route\fR <out_X> <in_Y>
85
+\fB\-\-vo\-input\fR <out_X> <in_Y>
86 86
 Connect video output X to video input Y.
87 87
 .TP
88 88
 \fB\-\-vo\-lock\fR <out_X>
@@ -139,8 +139,8 @@ To get a quick start here are some example command lines.
139 139
    videohubctrl --vo-unlock "Output 16"
140 140
 
141 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 145
  # Run several commands at once
146 146
  # Rename video input 11 and 12
@@ -151,7 +151,7 @@ To get a quick start here are some example command lines.
151 151
                 --vi-name 11 "Test input" \\
152 152
                 --vi-name 12 "Playout input" \\
153 153
                 --vo-name 5 "Encoder h264" \\
154
-                --vo-route 5 12 \\
154
+                --vo-input 5 12 \\
155 155
                 --vo-lock 5
156 156
 .fi
157 157
 .SH SEE ALSO

+ 7
- 8
videohubctrl.c View File

@@ -63,7 +63,8 @@ static const struct option long_options[] = {
63 63
 	{ "list-voutputs",		no_argument,       NULL, 903 },
64 64
 	{ "vi-name",			required_argument, NULL, 1001 },
65 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 68
 	{ "vo-lock",			required_argument, NULL, 2003 },
68 69
 	{ "vo-unlock",			required_argument, NULL, 2004 },
69 70
 	{ 0, 0, 0, 0 }
@@ -90,17 +91,15 @@ static void show_help(struct videohub_data *data) {
90 91
 	printf(" --list-vinputs             | List device video inputs.\n");
91 92
 	printf(" --list-voutputs            | List device video outputs.\n");
92 93
 	printf("\n");
93
-	printf("Video input/output configuration:\n");
94
+	printf("Video inputs configuration:\n");
94 95
 	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
96
+	printf("\n");
97
+	printf("Video outputs configuration:\n");
95 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 100
 	printf(" --vo-lock <out_X>          | Lock output port X.\n");
100 101
 	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
101 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 103
 	printf("Misc options:\n");
105 104
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");
106 105
 	printf(" -d --debug                 | Increase logging verbosity.\n");
@@ -194,7 +193,7 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
194 193
 			case 903: show_list |= action_list_voutputs; break; // --list-voutputs
195 194
 			case 1001: parse_cmd2(argc, argv, CMD_INPUT_LABELS); break; // --vi-name
196 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 197
 			case 2003: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, true); break; // --vo-lock
199 198
 			case 2004: parse_cmd1(argc, argv, CMD_VIDEO_OUTPUT_LOCKS, false); break; // --vo-unlock
200 199
 			case 'H': // --help

Loading…
Cancel
Save