Browse Source

Rename configuration parameters.

  --list-vinputs   ->  --list-inputs
  --list-voutputs  ->  --list-outputs
  --list-moutputs  ->  --list-monitor
  --vi-X           ->  --in-X
  --vo-X           ->  --out-X
  --mo-X           ->  --mon-X
  --se-X           ->  --ser-X
Georgi Chorbadzhiyski 9 years ago
parent
commit
42a6e7e3ac
7 changed files with 357 additions and 317 deletions
  1. 9
    1
      ChangeLog
  2. 51
    51
      README
  3. 14
    14
      cmd.c
  4. 77
    77
      test/run
  5. 102
    102
      test/test-02.ok
  6. 40
    40
      videohubctrl.1
  7. 64
    32
      videohubctrl.c

+ 9
- 1
ChangeLog View File

@@ -3,7 +3,15 @@ xxxx-xx-xx : Version -next
3 3
  * Add support for --list-proc-units and --list-frames.
4 4
  * Add support for setting device friendly name using --set-name option.
5 5
  * Add support for routing inputs to outputs/mon_ports using
6
-  --vi-output and --vi-monitor parameters.
6
+   --vi-output and --vi-monitor parameters.
7
+ * Rename configuration parameters (the old ones continue to work):
8
+   --list-vinputs   ->  --list-inputs
9
+   --list-voutputs  ->  --list-outputs
10
+   --list-moutputs  ->  --list-monitor
11
+   --vi-X           ->  --in-X
12
+   --vo-X           ->  --out-X
13
+   --mo-X           ->  --mon-X
14
+   --se-X           ->  --ser-X
7 15
 
8 16
 2014-12-03 : Version 1.0
9 17
  * Add missing documentation for --list-moutputs parameter.

+ 51
- 51
README View File

@@ -52,53 +52,53 @@ Commands:
52 52
                             . the device to the current configuration.
53 53
 
54 54
  --list-device              | Display device info.
55
- --list-vinputs             | List device video inputs.
56
- --list-voutputs            | List device video outputs.
57
- --list-moutputs            | List device monitoring outputs.
55
+ --list-inputs              | List device input ports.
56
+ --list-outputs             | List device output ports.
57
+ --list-monitor             | List device monitoring outputs.
58 58
  --list-serial              | List device serial ports.
59 59
  --list-proc-units          | List device processing units.
60 60
  --list-frames              | List device frame buffers.
61 61
 
62 62
  --set-name <name>          | Set the device "friendly name".
63 63
 
64
-Video inputs configuration:
65
- --vi-name <in_X> <name>    | Set video input port X name.
66
- --vi-output <in_X> <out_Y> | Route video input X to output Y.
67
- --vi-monitor <in_X> <mout_Y> | Route video input X to mon port Y.
64
+Inputs configuration:
65
+ --in-name <in_X> <name>       | Set input port X name.
66
+ --in-output <in_X> <out_Y>    | Route input X to output Y.
67
+ --in-monitor <in_X> <mout_Y>  | Route input X to monitor port Y.
68 68
 
69
-Video outputs configuration:
70
- --vo-name <out_X> <name>   | Set video output port X name.
71
- --vo-input <out_X> <in_Y>  | Connect video output X to input Y.
72
- --vo-lock <out_X>          | Lock output port X.
73
- --vo-unlock <out_X>        | Unlock output port X.
69
+Outputs configuration:
70
+ --out-name <out_X> <name>     | Set output port X name.
71
+ --out-input <out_X> <in_Y>    | Connect output X to input Y.
72
+ --out-lock <out_X>            | Lock output port X.
73
+ --out-unlock <out_X>          | Unlock output port X.
74 74
 
75 75
 Monitoring outputs configuration:
76
- --mo-name <mout_X> <name>  | Set monitoring port X name.
77
- --mo-input <mout_X> <in_Y> | Connect monitoring X to input Y.
78
- --mo-lock <mout_X>         | Lock monitoring port X.
79
- --mo-unlock <mout_X>       | Unlock monitoring port X.
76
+ --mon-name <mout_X> <name>    | Set monitoring port X name.
77
+ --mon-input <mout_X> <in_Y>   | Connect monitoring X to input Y.
78
+ --mon-lock <mout_X>           | Lock monitoring port X.
79
+ --mon-unlock <mout_X>         | Unlock monitoring port X.
80 80
 
81 81
 Serial ports configuration:
82
- --se-name <ser_X> <name>   | Set serial port X name.
83
- --se-connect <ser_X> <ser_Y> | Connect serial X to serial Y.
84
- --se-clear <ser_X>         | Disconnect serial port X from serial Y.
85
- --se-lock <ser_X>          | Lock serial port X.
86
- --se-unlock <ser_X>        | Unlock serial port X.
87
- --se-dir <ser_X> <dir>     | Set serial port X direction.
88
-                            . <dir> can be 'auto', 'in' or 'out'.
82
+ --ser-name <ser_X> <name>     | Set serial port X name.
83
+ --ser-connect <ser_X> <ser_Y> | Connect serial X to serial Y.
84
+ --ser-clear <ser_X>           | Disconnect serial port X from serial Y.
85
+ --ser-lock <ser_X>            | Lock serial port X.
86
+ --ser-unlock <ser_X>          | Unlock serial port X.
87
+ --ser-dir <ser_X> <dir>       | Set serial port X direction.
88
+                               . <dir> can be 'auto', 'in' or 'out'.
89 89
 
90 90
 Processing units configuration:
91
- --pu-input <pu_X> <in_Y>   | Connect processing unit X to input Y.
92
- --pu-clear <pu_X>          | Disconnect unit X from input Y.
93
- --pu-lock <pu_X>           | Lock processing unit X.
94
- --pu-unlock <pu_X>         | Unlock processing unit X.
91
+ --pu-input <pu_X> <in_Y>      | Connect processing unit X to input Y.
92
+ --pu-clear <pu_X>             | Disconnect unit X from input Y.
93
+ --pu-lock <pu_X>              | Lock processing unit X.
94
+ --pu-unlock <pu_X>            | Unlock processing unit X.
95 95
 
96 96
 Frames configuration:
97
- --fr-name <fr_X> <name>    | Set frame X name.
98
- --fr-output <fr_X> <out_Y> | Output frame X to output Y.
99
- --fr-clear <fr_X>          | Stop outputing frame X to the output.
100
- --fr-lock <fr_X>           | Lock frame X.
101
- --fr-unlock <rf_X>         | Unlock frame X.
97
+ --fr-name <fr_X> <name>       | Set frame X name.
98
+ --fr-output <fr_X> <out_Y>    | Output frame X to output Y.
99
+ --fr-clear <fr_X>             | Stop outputing frame X to the output.
100
+ --fr-lock <fr_X>              | Lock frame X.
101
+ --fr-unlock <rf_X>            | Unlock frame X.
102 102
 
103 103
 Misc options:
104 104
  -T --test-input <file>     | Read commands from <file>.
@@ -128,36 +128,36 @@ Example usage
128 128
 
129 129
  # Rename video output
130 130
 
131
-   videohubctrl -h sdi --vo-name 8 "Output 8 - test"
132
-   videohubctrl -h sdi --vo-name "Output 8 - test" "Output 8"
131
+   videohubctrl -h sdi --out-name 8 "Output 8 - test"
132
+   videohubctrl -h sdi --out-name "Output 8 - test" "Output 8"
133 133
 
134 134
 
135 135
  # Rename video input
136 136
 
137
-   videohubctrl -h sdi --vi-name 4 "Windows 4 HD"
138
-   videohubctrl -h sdi --vi-name "Windows 4 HD" "CPlay4"
137
+   videohubctrl -h sdi --in-name 4 "Windows 4 HD"
138
+   videohubctrl -h sdi --in-name "Windows 4 HD" "CPlay4"
139 139
 
140 140
 
141 141
  # Lock and then unlock output 16 (unlock assumes that the port is
142 142
  # named Output 16). The host name is set via env variable.
143 143
 
144 144
    export VIDEOHUB_HOST=sdi
145
-   videohubctrl --vo-lock 16
146
-   videohubctrl --vo-unlock "Output 16"
145
+   videohubctrl --out-lock 16
146
+   videohubctrl --out-unlock "Output 16"
147 147
 
148 148
 
149 149
  # Set two outputs to receive from the same input using port names
150 150
 
151
-   videohubctrl -h sdi --vo-input "Output 8" "Windows 4 HD"
152
-   videohubctrl -h sdi --vo-input "Output 7" "Windows 4 HD"
151
+   videohubctrl -h sdi --out-input "Output 8" "Windows 4 HD"
152
+   videohubctrl -h sdi --out-input "Output 7" "Windows 4 HD"
153 153
 
154 154
 
155 155
  # Set one input to go out two outputs and two monitoring ports
156 156
 
157
-   videohubctrl -h sdi --vi-output  "Windows 4 HD" "Output 8" \
158
-                       --vi-output  "Windows 4 HD" "Output 7" \
159
-                       --vi-monitor "Windows 4 HD" "Monitor 1" \
160
-                       --vi-monitor "Windows 4 HD" "Monitor 2"
157
+   videohubctrl -h sdi --in-output  "Windows 4 HD" "Output 8" \
158
+                       --in-output  "Windows 4 HD" "Output 7" \
159
+                       --in-monitor "Windows 4 HD" "Monitor 1" \
160
+                       --in-monitor "Windows 4 HD" "Monitor 2"
161 161
 
162 162
 
163 163
  # Run several commands at once
@@ -167,16 +167,16 @@ Example usage
167 167
  # Lock output 5
168 168
 
169 169
    videohubctrl --host sdi \
170
-                --vi-name 11 "Test input" \
171
-                --vi-name 12 "Playout input" \
172
-                --vo-name 5 "Encoder h264" \
173
-                --vo-input 5 12 \
174
-                --vo-lock 5
170
+                --in-name 11 "Test input" \
171
+                --in-name 12 "Playout input" \
172
+                --out-name 5 "Encoder h264" \
173
+                --out-input 5 12 \
174
+                --out-lock 5
175 175
 
176 176
  # This fails. It tries to use name that is not previously configured.
177 177
 
178
-   videohubctrl -h sdi --vo-name 1 "Test output" \
179
-                       --vo-name "Test output" "Other name"
178
+   videohubctrl -h sdi --out-name 1 "Test output" \
179
+                       --out-name "Test output" "Other name"
180 180
 
181 181
 
182 182
 Example output

+ 14
- 14
cmd.c View File

@@ -54,79 +54,79 @@ struct videohub_commands videohub_commands[NUM_COMMANDS] = {
54 54
 	[CMD_INPUT_LABELS]         = { .cmd = CMD_INPUT_LABELS        , .type = PARSE_LABEL,
55 55
 		.ports1 = OFS(inputs),
56 56
 		.port_id1 = "video input",
57
-		.opt_prefix = "vi",
57
+		.opt_prefix = "in",
58 58
 	},
59 59
 	[CMD_OUTPUT_LABELS]        = { .cmd = CMD_OUTPUT_LABELS       , .type = PARSE_LABEL,
60 60
 		.ports1 = OFS(outputs),
61 61
 		.port_id1 = "video output",
62
-		.opt_prefix = "vo",
62
+		.opt_prefix = "out",
63 63
 	},
64 64
 	[CMD_VIDEO_OUTPUT_LOCKS]   = { .cmd = CMD_VIDEO_OUTPUT_LOCKS  , .type = PARSE_LOCK,
65 65
 		.ports1 = OFS(outputs),
66 66
 		.port_id1 = "video output",
67
-		.opt_prefix = "vo",
67
+		.opt_prefix = "out",
68 68
 	},
69 69
 	[CMD_VIDEO_OUTPUT_ROUTING] = { .cmd = CMD_VIDEO_OUTPUT_ROUTING, .type = PARSE_ROUTE,
70 70
 		.ports1 = OFS(outputs),
71 71
 		.ports2 = OFS(inputs),
72 72
 		.port_id1 = "video output",
73 73
 		.port_id2 = "video input",
74
-		.opt_prefix = "vo",
74
+		.opt_prefix = "out",
75 75
 	},
76 76
 	[CMD_VIDEO_INPUT_STATUS]   = { .cmd = CMD_VIDEO_INPUT_STATUS  , .type = PARSE_STATUS,
77 77
 		.ports1 = OFS(inputs),
78 78
 		.port_id1 = "video input",
79
-		.opt_prefix = "vi",
79
+		.opt_prefix = "in",
80 80
 	},
81 81
 	[CMD_VIDEO_OUTPUT_STATUS]  = { .cmd = CMD_VIDEO_OUTPUT_STATUS , .type = PARSE_STATUS,
82 82
 		.ports1 = OFS(outputs),
83 83
 		.port_id1 = "video output",
84
-		.opt_prefix = "vo",
84
+		.opt_prefix = "out",
85 85
 	},
86 86
 	[CMD_MONITORING_OUTPUT_LABELS]  = { .cmd = CMD_MONITORING_OUTPUT_LABELS , .type = PARSE_LABEL,
87 87
 		.ports1 = OFS(mon_outputs),
88 88
 		.port_id1 = "monitoring output",
89
-		.opt_prefix = "mo",
89
+		.opt_prefix = "mon",
90 90
 	},
91 91
 	[CMD_MONITORING_OUTPUT_LOCKS]   = { .cmd = CMD_MONITORING_OUTPUT_LOCKS  , .type = PARSE_LOCK,
92 92
 		.ports1 = OFS(mon_outputs),
93 93
 		.port_id1 = "monitoring output",
94
-		.opt_prefix = "mo",
94
+		.opt_prefix = "mon",
95 95
 	},
96 96
 	[CMD_MONITORING_OUTPUT_ROUTING] = { .cmd = CMD_MONITORING_OUTPUT_ROUTING, .type = PARSE_ROUTE,
97 97
 		.ports1 = OFS(mon_outputs),
98 98
 		.ports2 = OFS(inputs),
99 99
 		.port_id1 = "monitoring output",
100 100
 		.port_id2 = "video input",
101
-		.opt_prefix = "mo",
101
+		.opt_prefix = "mon",
102 102
 	},
103 103
 	[CMD_SERIAL_PORT_LABELS]  = { .cmd = CMD_SERIAL_PORT_LABELS, .type = PARSE_LABEL,
104 104
 		.ports1 = OFS(serial),
105 105
 		.port_id1 = "serial",
106
-		.opt_prefix = "se",
106
+		.opt_prefix = "ser",
107 107
 	},
108 108
 	[CMD_SERIAL_PORT_LOCKS]   = { .cmd = CMD_SERIAL_PORT_LOCKS  , .type = PARSE_LOCK,
109 109
 		.ports1 = OFS(serial),
110 110
 		.port_id1 = "serial",
111
-		.opt_prefix = "se",
111
+		.opt_prefix = "ser",
112 112
 	},
113 113
 	[CMD_SERIAL_PORT_ROUTING] = { .cmd = CMD_SERIAL_PORT_ROUTING, .type = PARSE_ROUTE,
114 114
 		.ports1 = OFS(serial),
115 115
 		.ports2 = OFS(serial),
116 116
 		.port_id1 = "serial",
117 117
 		.port_id2 = "serial",
118
-		.opt_prefix = "se",
118
+		.opt_prefix = "ser",
119 119
 		.allow_disconnect = true,
120 120
 	},
121 121
 	[CMD_SERIAL_PORT_STATUS]  = { .cmd = CMD_SERIAL_PORT_STATUS , .type = PARSE_STATUS,
122 122
 		.ports1 = OFS(serial),
123 123
 		.port_id1 = "serial",
124
-		.opt_prefix = "se",
124
+		.opt_prefix = "ser",
125 125
 	},
126 126
 	[CMD_SERIAL_PORT_DIRECTIONS] = { .cmd = CMD_SERIAL_PORT_DIRECTIONS, .type = PARSE_DIR,
127 127
 		.ports1 = OFS(serial),
128 128
 		.port_id1 = "serial",
129
-		.opt_prefix = "se",
129
+		.opt_prefix = "ser",
130 130
 	},
131 131
 	[CMD_PROCESSING_UNIT_ROUTING] = { .cmd = CMD_PROCESSING_UNIT_ROUTING, .type = PARSE_ROUTE,
132 132
 		.ports1 = OFS(proc_units),

+ 77
- 77
test/run View File

@@ -33,38 +33,38 @@ check test/test-03 "Test --backup restore"
33 33
 
34 34
 videohubctrl --test-input test/input-00.txt \
35 35
 	--set-name "Test name" \
36
-	--vi-name "Windows 4 HD" "Windows 4 HighDef" \
37
-	--vi-output "Windows 1" "Output 15" \
38
-	--vi-monitor "Windows 3" "Monitor 1" \
39
-	--vi-name 5 "In 5" \
40
-	--vi-name "Input 6" "Camera 6" \
41
-	--vo-name "Enc1 1" "Encoder 1" \
42
-	--vo-name 16 Dev-Lo \
43
-	--vo-lock 6 \
44
-	--vo-lock "Output 15" \
45
-	--vo-unlock 12 \
46
-	--vo-unlock "Enc2 1" \
47
-	--vo-input "Output 5" "Windows 1" \
48
-	--vo-input 5 2 \
49
-	--vo-input 5 "Windows 3" \
50
-	--mo-name 1 "PC 1 Mon" \
51
-	--mo-name "Monitor 4" "Decklink" \
52
-	--mo-unlock 2 \
53
-	--mo-lock 4 \
54
-	--mo-name 3 "Loopback" \
55
-	--mo-input 3 16 \
56
-	--se-name 1 "Ren Ctrl 1" \
57
-	--se-name "Deck 3" "Ren Deck 3" \
58
-	--se-unlock 1 \
59
-	--se-lock 2 \
60
-	--se-input 2 1 \
61
-	--se-dir 6 in \
62
-	--se-dir 7 out \
63
-	--se-dir 8 out --se-dir 8 auto \
64
-	--se-input 4 5 \
65
-	--se-input 6 7 \
66
-	--se-clear 4 \
67
-	--se-clear "Serial 6" \
36
+	--in-name "Windows 4 HD" "Windows 4 HighDef" \
37
+	--in-output "Windows 1" "Output 15" \
38
+	--in-monitor "Windows 3" "Monitor 1" \
39
+	--in-name 5 "In 5" \
40
+	--in-name "Input 6" "Camera 6" \
41
+	--out-name "Enc1 1" "Encoder 1" \
42
+	--out-name 16 Dev-Lo \
43
+	--out-lock 6 \
44
+	--out-lock "Output 15" \
45
+	--out-unlock 12 \
46
+	--out-unlock "Enc2 1" \
47
+	--out-input "Output 5" "Windows 1" \
48
+	--out-input 5 2 \
49
+	--out-input 5 "Windows 3" \
50
+	--mon-name 1 "PC 1 Mon" \
51
+	--mon-name "Monitor 4" "Decklink" \
52
+	--mon-unlock 2 \
53
+	--mon-lock 4 \
54
+	--mon-name 3 "Loopback" \
55
+	--mon-input 3 16 \
56
+	--ser-name 1 "Ren Ctrl 1" \
57
+	--ser-name "Deck 3" "Ren Deck 3" \
58
+	--ser-unlock 1 \
59
+	--ser-lock 2 \
60
+	--ser-input 2 1 \
61
+	--ser-dir 6 in \
62
+	--ser-dir 7 out \
63
+	--ser-dir 8 out --ser-dir 8 auto \
64
+	--ser-input 4 5 \
65
+	--ser-input 6 7 \
66
+	--ser-clear 4 \
67
+	--ser-clear "Serial 6" \
68 68
 	--pu-clear 1 --pu-clear 3 --pu-clear 4 \
69 69
 	--pu-unlock 1 --pu-lock 1 --pu-connect 1 "Windows 4 HD" \
70 70
 	--pu-connect 4 "DPlay1" --pu-lock 4 \
@@ -79,56 +79,56 @@ grep -v ^videohub: < test/test-03.out > test/test-05.out
79 79
 sed -e 's,| L |,| O |,g' < test/test-01.ok > test/test-05.ok
80 80
 check test/test-05 "Test if --backup restored correct config."
81 81
 
82
-./videohubctrl --test-input test/input-00.txt --vi-name 0           "Test Input 0"   $@ &> test/test-06.out
83
-./videohubctrl --test-input test/input-00.txt --vi-name 18          "Test Input 18"  $@ >> test/test-06.out 2>&1
84
-./videohubctrl --test-input test/input-00.txt --vi-name "Input 18"  "Test Input 18"  $@ >> test/test-06.out 2>&1
85
-./videohubctrl --test-input test/input-00.txt --vo-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
86
-./videohubctrl --test-input test/input-00.txt --vo-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
87
-./videohubctrl --test-input test/input-00.txt --vi-output "Input 22" "Output 15"     $@ >> test/test-06.out 2>&1
88
-./videohubctrl --test-input test/input-00.txt --vi-output "Input 14" "Output 22"     $@ >> test/test-06.out 2>&1
89
-./videohubctrl --test-input test/input-00.txt --vi-monitor "Input 22" "Monitor 3"    $@ >> test/test-06.out 2>&1
90
-./videohubctrl --test-input test/input-00.txt --vi-monitor "Input 14" "Monitor 33"   $@ >> test/test-06.out 2>&1
91
-./videohubctrl --test-input test/input-00.txt --vo-lock 18                           $@ >> test/test-06.out 2>&1
92
-./videohubctrl --test-input test/input-00.txt --vo-lock "Output 18"                  $@ >> test/test-06.out 2>&1
93
-./videohubctrl --test-input test/input-00.txt --vo-unlock 18                         $@ >> test/test-06.out 2>&1
94
-./videohubctrl --test-input test/input-00.txt --vo-unlock "Output 18"                $@ >> test/test-06.out 2>&1
95
-./videohubctrl --test-input test/input-00.txt --vo-input 0 0                         $@ >> test/test-06.out 2>&1
96
-./videohubctrl --test-input test/input-00.txt --vo-input 0 18                        $@ >> test/test-06.out 2>&1
97
-./videohubctrl --test-input test/input-00.txt --vo-input 18 0                        $@ >> test/test-06.out 2>&1
98
-./videohubctrl --test-input test/input-00.txt --vo-input 18 18                       $@ >> test/test-06.out 2>&1
99
-./videohubctrl --test-input test/input-00.txt --vo-input 1  18                       $@ >> test/test-06.out 2>&1
100
-./videohubctrl --test-input test/input-00.txt --vo-input 18 1                        $@ >> test/test-06.out 2>&1
101
-./videohubctrl --test-input test/input-00.txt --vo-input "Input 10" "Output 10"      $@ >> test/test-06.out 2>&1
102
-./videohubctrl --test-input test/input-00.txt --vo-input "Err Output" "Input 10"     $@ >> test/test-06.out 2>&1
103
-./videohubctrl --test-input test/input-00.txt --vo-input "Output 10" "Err Input"     $@ >> test/test-06.out 2>&1
104
-./videohubctrl --test-input test/input-00.txt --mo-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
105
-./videohubctrl --test-input test/input-00.txt --mo-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
106
-./videohubctrl --test-input test/input-00.txt --mo-lock 18                           $@ >> test/test-06.out 2>&1
107
-./videohubctrl --test-input test/input-00.txt --mo-lock "Output 18"                  $@ >> test/test-06.out 2>&1
108
-./videohubctrl --test-input test/input-00.txt --mo-unlock 18                         $@ >> test/test-06.out 2>&1
109
-./videohubctrl --test-input test/input-00.txt --mo-unlock "Output 18"                $@ >> test/test-06.out 2>&1
110
-./videohubctrl --test-input test/input-00.txt --se-name 18          "Test Serial 18" $@ >> test/test-06.out 2>&1
111
-./videohubctrl --test-input test/input-00.txt --se-name "Serial 18" "Test Serial 18" $@ >> test/test-06.out 2>&1
112
-./videohubctrl --test-input test/input-00.txt --se-clear 24                          $@ >> test/test-06.out 2>&1
113
-./videohubctrl --test-input test/input-00.txt --se-clear "Serial X"                  $@ >> test/test-06.out 2>&1
114
-./videohubctrl --test-input test/input-00.txt --se-connect 24 7                      $@ >> test/test-06.out 2>&1
115
-./videohubctrl --test-input test/input-00.txt --se-lock 18                           $@ >> test/test-06.out 2>&1
116
-./videohubctrl --test-input test/input-00.txt --se-lock "Serial 18"                  $@ >> test/test-06.out 2>&1
117
-./videohubctrl --test-input test/input-00.txt --se-unlock 18                         $@ >> test/test-06.out 2>&1
118
-./videohubctrl --test-input test/input-00.txt --se-unlock "Serial 18"                $@ >> test/test-06.out 2>&1
119
-./videohubctrl --test-input test/input-00.txt --se-dir 1 err-dir                     $@ >> test/test-06.out 2>&1
120
-./videohubctrl --test-input test/input-00.txt --se-dir "Serial 5" err-dir            $@ >> test/test-06.out 2>&1
82
+./videohubctrl --test-input test/input-00.txt --in-name 0           "Test Input 0"   $@ &> test/test-06.out
83
+./videohubctrl --test-input test/input-00.txt --in-name 18          "Test Input 18"  $@ >> test/test-06.out 2>&1
84
+./videohubctrl --test-input test/input-00.txt --in-name "Input 18"  "Test Input 18"  $@ >> test/test-06.out 2>&1
85
+./videohubctrl --test-input test/input-00.txt --out-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
86
+./videohubctrl --test-input test/input-00.txt --out-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
87
+./videohubctrl --test-input test/input-00.txt --in-output "Input 22" "Output 15"     $@ >> test/test-06.out 2>&1
88
+./videohubctrl --test-input test/input-00.txt --in-output "Input 14" "Output 22"     $@ >> test/test-06.out 2>&1
89
+./videohubctrl --test-input test/input-00.txt --in-monitor "Input 22" "Monitor 3"    $@ >> test/test-06.out 2>&1
90
+./videohubctrl --test-input test/input-00.txt --in-monitor "Input 14" "Monitor 33"   $@ >> test/test-06.out 2>&1
91
+./videohubctrl --test-input test/input-00.txt --out-lock 18                           $@ >> test/test-06.out 2>&1
92
+./videohubctrl --test-input test/input-00.txt --out-lock "Output 18"                  $@ >> test/test-06.out 2>&1
93
+./videohubctrl --test-input test/input-00.txt --out-unlock 18                         $@ >> test/test-06.out 2>&1
94
+./videohubctrl --test-input test/input-00.txt --out-unlock "Output 18"                $@ >> test/test-06.out 2>&1
95
+./videohubctrl --test-input test/input-00.txt --out-input 0 0                         $@ >> test/test-06.out 2>&1
96
+./videohubctrl --test-input test/input-00.txt --out-input 0 18                        $@ >> test/test-06.out 2>&1
97
+./videohubctrl --test-input test/input-00.txt --out-input 18 0                        $@ >> test/test-06.out 2>&1
98
+./videohubctrl --test-input test/input-00.txt --out-input 18 18                       $@ >> test/test-06.out 2>&1
99
+./videohubctrl --test-input test/input-00.txt --out-input 1  18                       $@ >> test/test-06.out 2>&1
100
+./videohubctrl --test-input test/input-00.txt --out-input 18 1                        $@ >> test/test-06.out 2>&1
101
+./videohubctrl --test-input test/input-00.txt --out-input "Input 10" "Output 10"      $@ >> test/test-06.out 2>&1
102
+./videohubctrl --test-input test/input-00.txt --out-input "Err Output" "Input 10"     $@ >> test/test-06.out 2>&1
103
+./videohubctrl --test-input test/input-00.txt --out-input "Output 10" "Err Input"     $@ >> test/test-06.out 2>&1
104
+./videohubctrl --test-input test/input-00.txt --mon-name 18          "Test Output 18" $@ >> test/test-06.out 2>&1
105
+./videohubctrl --test-input test/input-00.txt --mon-name "Output 18" "Test Output 18" $@ >> test/test-06.out 2>&1
106
+./videohubctrl --test-input test/input-00.txt --mon-lock 18                           $@ >> test/test-06.out 2>&1
107
+./videohubctrl --test-input test/input-00.txt --mon-lock "Output 18"                  $@ >> test/test-06.out 2>&1
108
+./videohubctrl --test-input test/input-00.txt --mon-unlock 18                         $@ >> test/test-06.out 2>&1
109
+./videohubctrl --test-input test/input-00.txt --mon-unlock "Output 18"                $@ >> test/test-06.out 2>&1
110
+./videohubctrl --test-input test/input-00.txt --ser-name 18          "Test Serial 18" $@ >> test/test-06.out 2>&1
111
+./videohubctrl --test-input test/input-00.txt --ser-name "Serial 18" "Test Serial 18" $@ >> test/test-06.out 2>&1
112
+./videohubctrl --test-input test/input-00.txt --ser-clear 24                          $@ >> test/test-06.out 2>&1
113
+./videohubctrl --test-input test/input-00.txt --ser-clear "Serial X"                  $@ >> test/test-06.out 2>&1
114
+./videohubctrl --test-input test/input-00.txt --ser-connect 24 7                      $@ >> test/test-06.out 2>&1
115
+./videohubctrl --test-input test/input-00.txt --ser-lock 18                           $@ >> test/test-06.out 2>&1
116
+./videohubctrl --test-input test/input-00.txt --ser-lock "Serial 18"                  $@ >> test/test-06.out 2>&1
117
+./videohubctrl --test-input test/input-00.txt --ser-unlock 18                         $@ >> test/test-06.out 2>&1
118
+./videohubctrl --test-input test/input-00.txt --ser-unlock "Serial 18"                $@ >> test/test-06.out 2>&1
119
+./videohubctrl --test-input test/input-00.txt --ser-dir 1 err-dir                     $@ >> test/test-06.out 2>&1
120
+./videohubctrl --test-input test/input-00.txt --ser-dir "Serial 5" err-dir            $@ >> test/test-06.out 2>&1
121 121
 ./videohubctrl --test-input test/input-00.txt --set-name                             $@ >> test/test-06.out 2>&1
122 122
 check test/test-06 "Test errors on commands with invalid parameters."
123 123
 
124 124
 videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
125 125
 check test/test-07 "Test --list-device option output"
126 126
 
127
-videohubctrl --test-input test/input-00.txt --list-vinputs $@ &> test/test-08.out
128
-check test/test-08 "Test --list-vinputs option output"
127
+videohubctrl --test-input test/input-00.txt --list-inputs $@ &> test/test-08.out
128
+check test/test-08 "Test --list-inputs option output"
129 129
 
130
-videohubctrl --test-input test/input-00.txt --list-voutputs $@ &> test/test-09.out
131
-check test/test-09 "Test --list-voutputs option output"
130
+videohubctrl --test-input test/input-00.txt --list-outputs $@ &> test/test-09.out
131
+check test/test-09 "Test --list-outputs option output"
132 132
 
133 133
 videohubctrl --test-input test/input-10.txt $@ &> test/test-10.out
134 134
 check test/test-10 "Test invalid protocol"
@@ -142,8 +142,8 @@ check test/test-12 "Test device-not_present check"
142 142
 videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
143 143
 check test/test-14 "Test buggy input"
144 144
 
145
-videohubctrl --test-input test/input-00.txt --list-moutputs $@ &> test/test-15.out
146
-check test/test-15 "Test --list-moutputs option output"
145
+videohubctrl --test-input test/input-00.txt --list-monitor $@ &> test/test-15.out
146
+check test/test-15 "Test --list-monitor option output"
147 147
 
148 148
 videohubctrl --test-input test/input-00.txt --list-serial $@ &> test/test-16.out
149 149
 check test/test-16 "Test --list-serial option output"

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

@@ -1,49 +1,49 @@
1 1
 videohubctrl \
2 2
   --set-name "My Videohub" \
3
-  --vi-name   1 "Windows 1" \
4
-  --vi-name   2 "Windows 2" \
5
-  --vi-name   3 "Windows 3" \
6
-  --vi-name   4 "Windows 4 HD" \
7
-  --vi-name   5 "Input 5" \
8
-  --vi-name   6 "Input 6" \
9
-  --vi-name   7 "Input 7" \
10
-  --vi-name   8 "Input 8" \
11
-  --vi-name   9 "Input 9" \
12
-  --vi-name  10 "Input 10" \
13
-  --vi-name  11 "Input 11" \
14
-  --vi-name  12 "DPlay1" \
15
-  --vi-name  13 "DPlay2" \
16
-  --vi-name  14 "Input 14" \
17
-  --vi-name  15 "Input 15" \
18
-  --vi-name  16 "Loopback" \
19
-  --vo-name   1 "Enc1 1" \
20
-  --vo-name   2 "Enc1 2" \
21
-  --vo-name   3 "Enc1 3" \
22
-  --vo-name   4 "Enc1 4" \
23
-  --vo-name   5 "Output 5" \
24
-  --vo-name   6 "Output 6" \
25
-  --vo-name   7 "Output 7" \
26
-  --vo-name   8 "Output 8" \
27
-  --vo-name   9 "Enc2 1" \
28
-  --vo-name  10 "Output 10" \
29
-  --vo-name  11 "Output 11" \
30
-  --vo-name  12 "Denc" \
31
-  --vo-name  13 "Output 13" \
32
-  --vo-name  14 "Output 14" \
33
-  --vo-name  15 "Output 15" \
34
-  --vo-name  16 "Loopback" \
35
-  --mo-name   1 "Monitor 1" \
36
-  --mo-name   2 "Monitor 2" \
37
-  --mo-name   3 "Monitor 3" \
38
-  --mo-name   4 "Monitor 4" \
39
-  --se-name   1 "Serial Ctrl 1" \
40
-  --se-name   2 "Serial Ctrl 2" \
41
-  --se-name   3 "Deck 3" \
42
-  --se-name   4 "Deck 4" \
43
-  --se-name   5 "Serial 5" \
44
-  --se-name   6 "Serial 6" \
45
-  --se-name   7 "Serial 7" \
46
-  --se-name   8 "Serial 8" \
3
+  --in-name   1 "Windows 1" \
4
+  --in-name   2 "Windows 2" \
5
+  --in-name   3 "Windows 3" \
6
+  --in-name   4 "Windows 4 HD" \
7
+  --in-name   5 "Input 5" \
8
+  --in-name   6 "Input 6" \
9
+  --in-name   7 "Input 7" \
10
+  --in-name   8 "Input 8" \
11
+  --in-name   9 "Input 9" \
12
+  --in-name  10 "Input 10" \
13
+  --in-name  11 "Input 11" \
14
+  --in-name  12 "DPlay1" \
15
+  --in-name  13 "DPlay2" \
16
+  --in-name  14 "Input 14" \
17
+  --in-name  15 "Input 15" \
18
+  --in-name  16 "Loopback" \
19
+  --out-name   1 "Enc1 1" \
20
+  --out-name   2 "Enc1 2" \
21
+  --out-name   3 "Enc1 3" \
22
+  --out-name   4 "Enc1 4" \
23
+  --out-name   5 "Output 5" \
24
+  --out-name   6 "Output 6" \
25
+  --out-name   7 "Output 7" \
26
+  --out-name   8 "Output 8" \
27
+  --out-name   9 "Enc2 1" \
28
+  --out-name  10 "Output 10" \
29
+  --out-name  11 "Output 11" \
30
+  --out-name  12 "Denc" \
31
+  --out-name  13 "Output 13" \
32
+  --out-name  14 "Output 14" \
33
+  --out-name  15 "Output 15" \
34
+  --out-name  16 "Loopback" \
35
+  --mon-name   1 "Monitor 1" \
36
+  --mon-name   2 "Monitor 2" \
37
+  --mon-name   3 "Monitor 3" \
38
+  --mon-name   4 "Monitor 4" \
39
+  --ser-name   1 "Serial Ctrl 1" \
40
+  --ser-name   2 "Serial Ctrl 2" \
41
+  --ser-name   3 "Deck 3" \
42
+  --ser-name   4 "Deck 4" \
43
+  --ser-name   5 "Serial 5" \
44
+  --ser-name   6 "Serial 6" \
45
+  --ser-name   7 "Serial 7" \
46
+  --ser-name   8 "Serial 8" \
47 47
   --fr-name   1 "Frame 1" \
48 48
   --fr-name   2 "Frame 2" \
49 49
   --fr-name   3 "Frame 3" \
@@ -52,70 +52,70 @@ videohubctrl \
52 52
   --fr-name   6 "Frame 6" \
53 53
   --fr-name   7 "Frame 7" \
54 54
   --fr-name   8 "Frame 8" \
55
-  --vo-input   1   3 \
56
-  --vo-input   2   2 \
57
-  --vo-input   3   1 \
58
-  --vo-input   4   1 \
59
-  --vo-input   5   5 \
60
-  --vo-input   6   6 \
61
-  --vo-input   7   7 \
62
-  --vo-input   8   4 \
63
-  --vo-input   9   4 \
64
-  --vo-input  10  10 \
65
-  --vo-input  11  11 \
66
-  --vo-input  12  13 \
67
-  --vo-input  13  12 \
68
-  --vo-input  14  14 \
69
-  --vo-input  15  15 \
70
-  --vo-input  16  16 \
71
-  --mo-input   1   1 \
72
-  --mo-input   2   2 \
73
-  --mo-input   3   3 \
74
-  --mo-input   4   4 \
75
-  --se-input   1   3 \
76
-  --se-input   2   4 \
55
+  --out-input   1   3 \
56
+  --out-input   2   2 \
57
+  --out-input   3   1 \
58
+  --out-input   4   1 \
59
+  --out-input   5   5 \
60
+  --out-input   6   6 \
61
+  --out-input   7   7 \
62
+  --out-input   8   4 \
63
+  --out-input   9   4 \
64
+  --out-input  10  10 \
65
+  --out-input  11  11 \
66
+  --out-input  12  13 \
67
+  --out-input  13  12 \
68
+  --out-input  14  14 \
69
+  --out-input  15  15 \
70
+  --out-input  16  16 \
71
+  --mon-input   1   1 \
72
+  --mon-input   2   2 \
73
+  --mon-input   3   3 \
74
+  --mon-input   4   4 \
75
+  --ser-input   1   3 \
76
+  --ser-input   2   4 \
77 77
   --pu-input   1   4 \
78 78
   --pu-input   2   2 \
79 79
   --pu-input   4   3 \
80 80
   --fr-input   1  13 \
81 81
   --fr-input   2  14 \
82 82
   --fr-input   3  15 \
83
-  --se-dir   1 in \
84
-  --se-dir   2 auto \
85
-  --se-dir   3 out \
86
-  --se-dir   4 auto \
87
-  --se-dir   5 auto \
88
-  --se-dir   6 auto \
89
-  --se-dir   7 in \
90
-  --se-dir   8 out \
91
-  --vo-unlock   1 --vo-lock   1 \
92
-  --vo-unlock   2 --vo-lock   2 \
93
-  --vo-unlock   3 --vo-lock   3 \
94
-  --vo-unlock   4 --vo-lock   4 \
95
-  --vo-unlock   5 \
96
-  --vo-unlock   6 \
97
-  --vo-unlock   7 \
98
-  --vo-unlock   8 \
99
-  --vo-unlock   9 --vo-lock   9 \
100
-  --vo-unlock  10 \
101
-  --vo-unlock  11 \
102
-  --vo-unlock  12 --vo-lock  12 \
103
-  --vo-unlock  13 --vo-lock  13 \
104
-  --vo-unlock  14 \
105
-  --vo-unlock  15 \
106
-  --vo-unlock  16 --vo-lock  16
107
-  --mo-unlock   1 \
108
-  --mo-unlock   2 --mo-lock   2 \
109
-  --mo-unlock   3 --mo-lock   3 \
110
-  --mo-unlock   4
111
-  --se-unlock   1 --se-lock   1 \
112
-  --se-unlock   2 \
113
-  --se-unlock   3 --se-lock   3 \
114
-  --se-unlock   4 \
115
-  --se-unlock   5 \
116
-  --se-unlock   6 \
117
-  --se-unlock   7 \
118
-  --se-unlock   8
83
+  --ser-dir   1 in \
84
+  --ser-dir   2 auto \
85
+  --ser-dir   3 out \
86
+  --ser-dir   4 auto \
87
+  --ser-dir   5 auto \
88
+  --ser-dir   6 auto \
89
+  --ser-dir   7 in \
90
+  --ser-dir   8 out \
91
+  --out-unlock   1 --out-lock   1 \
92
+  --out-unlock   2 --out-lock   2 \
93
+  --out-unlock   3 --out-lock   3 \
94
+  --out-unlock   4 --out-lock   4 \
95
+  --out-unlock   5 \
96
+  --out-unlock   6 \
97
+  --out-unlock   7 \
98
+  --out-unlock   8 \
99
+  --out-unlock   9 --out-lock   9 \
100
+  --out-unlock  10 \
101
+  --out-unlock  11 \
102
+  --out-unlock  12 --out-lock  12 \
103
+  --out-unlock  13 --out-lock  13 \
104
+  --out-unlock  14 \
105
+  --out-unlock  15 \
106
+  --out-unlock  16 --out-lock  16
107
+  --mon-unlock   1 \
108
+  --mon-unlock   2 --mon-lock   2 \
109
+  --mon-unlock   3 --mon-lock   3 \
110
+  --mon-unlock   4
111
+  --ser-unlock   1 --ser-lock   1 \
112
+  --ser-unlock   2 \
113
+  --ser-unlock   3 --ser-lock   3 \
114
+  --ser-unlock   4 \
115
+  --ser-unlock   5 \
116
+  --ser-unlock   6 \
117
+  --ser-unlock   7 \
118
+  --ser-unlock   8
119 119
   --pu-unlock   1 --pu-lock   1 \
120 120
   --pu-unlock   2 \
121 121
   --pu-unlock   3 --pu-lock   3 \

+ 40
- 40
videohubctrl.1 View File

@@ -102,68 +102,68 @@ Everywhere where port needs to be set, you can use the port number or the
102 102
 port name. You can use only port names that were already configured in
103 103
 previous session. Trying to set a name and then reference it in the next
104 104
 command will fail. Using port numbers always works.
105
-.SH VIDEO INPUTS CONFIGURATION
105
+.SH INPUTS CONFIGURATION
106 106
 .PP
107 107
 .TP
108
-\fB\-\-vi\-name\fR <in_X> <name>
108
+\fB\-\-in\-name\fR <in_X> <name>
109 109
 Set video input port X name.
110 110
 .TP
111
-\fB\-\-vi\-output\fR <in_X> <out_Y>
111
+\fB\-\-in\-output\fR <in_X> <out_Y>
112 112
 Set video input X to be outputted via output Y.
113 113
 .TP
114
-\fB\-\-vi\-monitor\fR <in_X> <mout_Y>
114
+\fB\-\-in\-monitor\fR <in_X> <mout_Y>
115 115
 Set video input X to be outputted via monitoring port Y.
116
-.SH VIDEO OUTPUTS CONFIGURATION
116
+.SH OUTPUTS CONFIGURATION
117 117
 .PP
118 118
 .TP
119
-\fB\-\-vo\-name\fR <out_X> <name>
119
+\fB\-\-out\-name\fR <out_X> <name>
120 120
 Set video output port X name.
121 121
 .TP
122
-\fB\-\-vo\-input\fR <out_X> <in_Y>
122
+\fB\-\-out\-input\fR <out_X> <in_Y>
123 123
 Connect video output X to video input Y.
124 124
 .TP
125
-\fB\-\-vo\-lock\fR <out_X>
125
+\fB\-\-out\-lock\fR <out_X>
126 126
 Lock output port X.
127 127
 .TP
128
-\fB\-\-vo\-unlock\fR <out_X>
128
+\fB\-\-out\-unlock\fR <out_X>
129 129
 Unlock output port X. If the port is locked by somebody else the
130 130
 port would be forcefully unlocked.
131 131
 .SH MONITORING OUTPUTS CONFIGURATION
132 132
 .PP
133 133
 .TP
134
-\fB\-\-mo\-name\fR <mout_X> <name>
134
+\fB\-\-mon\-name\fR <mout_X> <name>
135 135
 Set monitoring output port X name.
136 136
 .TP
137
-\fB\-\-mo\-input\fR <mout_X> <in_Y>
137
+\fB\-\-mon\-input\fR <mout_X> <in_Y>
138 138
 Connect monitoring output X to video input Y.
139 139
 .TP
140
-\fB\-\-mo\-lock\fR <mout_X>
140
+\fB\-\-mon\-lock\fR <mout_X>
141 141
 Lock monitoring output port X.
142 142
 .TP
143
-\fB\-\-mo\-unlock\fR <mout_X>
143
+\fB\-\-mon\-unlock\fR <mout_X>
144 144
 Unlock monitoring output port X. If the port is locked by somebody
145 145
 else the port would be forcefully unlocked.
146 146
 .SH SERIAL PORTS CONFIGURATION
147 147
 .PP
148 148
 .TP
149
-\fB\-\-se\-name\fR <ser_X> <name>
149
+\fB\-\-ser\-name\fR <ser_X> <name>
150 150
 Set serial port X name.
151 151
 .TP
152
-\fB\-\-se\-connect\fR <ser_X> <ser_Y>
153
-Connect serial port X to serial port Y. This option have two aliases \fB\-\-se\-input\fR
154
-and \fB\-\-se\-route\fR.
152
+\fB\-\-ser\-connect\fR <ser_X> <ser_Y>
153
+Connect serial port X to serial port Y. This option have two aliases \fB\-\-ser\-input\fR
154
+and \fB\-\-ser\-route\fR.
155 155
 .TP
156
-\fB\-\-se\-clear\fR <ser_X>
156
+\fB\-\-ser\-clear\fR <ser_X>
157 157
 Disconnect serial port X from the connected serial port.
158 158
 .TP
159
-\fB\-\-se\-lock\fR <ser_X>
159
+\fB\-\-ser\-lock\fR <ser_X>
160 160
 Lock serial port X.
161 161
 .TP
162
-\fB\-\-se\-unlock\fR <ser_X>
162
+\fB\-\-ser\-unlock\fR <ser_X>
163 163
 Unlock serial port X. If the port is locked by somebody else the
164 164
 port would be forcefully unlocked.
165 165
 .TP
166
-\fB\-\-se\-dir\fR <ser_X> <in|out|auto>
166
+\fB\-\-ser\-dir\fR <ser_X> <in|out|auto>
167 167
 Set serial port X direction. There are three possible settings for
168 168
 each port:
169 169
  \fBin\fR   - input/control/Workstation
@@ -236,28 +236,28 @@ To get a quick start here are some example command lines.
236 236
 
237 237
 .nf
238 238
  # Rename video output
239
-   videohubctrl -h sdi --vo-name 8 "Output 8 - test"
240
-   videohubctrl -h sdi --vo-name "Output 8 - test" "Output 8"
239
+   videohubctrl -h sdi --out-name 8 "Output 8 - test"
240
+   videohubctrl -h sdi --out-name "Output 8 - test" "Output 8"
241 241
 
242 242
  # Rename video input
243
-   videohubctrl -h sdi --vi-name 4 "Windows 4 HD"
244
-   videohubctrl -h sdi --vi-name "Windows 4 HD" "CPlay4"
243
+   videohubctrl -h sdi --in-name 4 "Windows 4 HD"
244
+   videohubctrl -h sdi --in-name "Windows 4 HD" "CPlay4"
245 245
 
246 246
  # Lock and then unlock output 16 (unlock assumes that the port is
247 247
  # named Output 16). The host name is set via env variable.
248 248
    export VIDEOHUB_HOST=sdi
249
-   videohubctrl --vo-lock 16
250
-   videohubctrl --vo-unlock "Output 16"
249
+   videohubctrl --out-lock 16
250
+   videohubctrl --out-unlock "Output 16"
251 251
 
252 252
  # Set two outputs to receive from the same input using port names
253
-   videohubctrl -h sdi --vo-input "Output 8" "Windows 4 HD"
254
-   videohubctrl -h sdi --vo-input "Output 7" "Windows 4 HD"
253
+   videohubctrl -h sdi --out-input "Output 8" "Windows 4 HD"
254
+   videohubctrl -h sdi --out-input "Output 7" "Windows 4 HD"
255 255
 
256 256
  # Set one input to go out two outputs and two monitoring ports
257
-   videohubctrl -h sdi --vi-output  "Windows 4 HD" "Output 8" \\
258
-                       --vi-output  "Windows 4 HD" "Output 7" \\
259
-                       --vi-monitor "Windows 4 HD" "Monitor 1" \\
260
-                       --vi-monitor "Windows 4 HD" "Monitor 2"
257
+   videohubctrl -h sdi --in-output  "Windows 4 HD" "Output 8" \\
258
+                       --in-output  "Windows 4 HD" "Output 7" \\
259
+                       --in-monitor "Windows 4 HD" "Monitor 1" \\
260
+                       --in-monitor "Windows 4 HD" "Monitor 2"
261 261
 
262 262
  # Run several commands at once
263 263
  # Rename video input 11 and 12
@@ -265,15 +265,15 @@ To get a quick start here are some example command lines.
265 265
  # Set output 5 to receive from input 12
266 266
  # Lock output 5
267 267
    videohubctrl --host sdi \\
268
-                --vi-name 11 "Test input" \\
269
-                --vi-name 12 "Playout input" \\
270
-                --vo-name 5 "Encoder h264" \\
271
-                --vo-input 5 12 \\
272
-                --vo-lock 5
268
+                --in-name 11 "Test input" \\
269
+                --in-name 12 "Playout input" \\
270
+                --out-name 5 "Encoder h264" \\
271
+                --out-input 5 12 \\
272
+                --out-lock 5
273 273
 
274 274
  # This fails. It tries to use name that is not previously configured.
275
-   videohubctrl -h sdi --vo-name 1 "Test output" \\
276
-                       --vo-name "Test output" "Other name"
275
+   videohubctrl -h sdi --out-name 1 "Test output" \\
276
+                       --out-name "Test output" "Other name"
277 277
 
278 278
 .fi
279 279
 .SH SEE ALSO

+ 64
- 32
videohubctrl.c View File

@@ -62,27 +62,57 @@ static const struct option long_options[] = {
62 62
 	{ "info",				no_argument,       NULL, 'i' },
63 63
 	{ "monitor",			no_argument,       NULL, 'm' },
64 64
 	{ "backup",				no_argument,       NULL, 'b' },
65
+
65 66
 	{ "list-device",		no_argument,       NULL, 901 },
67
+	{ "list-inputs",		no_argument,       NULL, 902 },
66 68
 	{ "list-vinputs",		no_argument,       NULL, 902 },
69
+	{ "list-outputs",		no_argument,       NULL, 903 },
67 70
 	{ "list-voutputs",		no_argument,       NULL, 903 },
71
+	{ "list-monitoring",	no_argument,       NULL, 904 },
68 72
 	{ "list-moutputs",		no_argument,       NULL, 904 },
69 73
 	{ "list-serial",		no_argument,       NULL, 905 },
70 74
 	{ "list-proc-units",	no_argument,       NULL, 906 },
71 75
 	{ "list-frames",		no_argument,       NULL, 907 },
76
+
72 77
 	{ "set-name",			required_argument, NULL, 950 },
78
+
79
+	{ "in-name",			required_argument, NULL, 1001 },
80
+	{ "in-output",			required_argument, NULL, 1002 },
81
+	{ "in-monitor",			required_argument, NULL, 1003 },
73 82
 	{ "vi-name",			required_argument, NULL, 1001 },
74 83
 	{ "vi-output",			required_argument, NULL, 1002 },
75 84
 	{ "vi-monitor",			required_argument, NULL, 1003 },
85
+
86
+	{ "out-name",			required_argument, NULL, 2001 },
87
+	{ "out-input",			required_argument, NULL, 2002 },
88
+	{ "out-route",			required_argument, NULL, 2002 }, // Alias of --vo-input
89
+	{ "out-lock",			required_argument, NULL, 2003 },
90
+	{ "out-unlock",			required_argument, NULL, 2004 },
76 91
 	{ "vo-name",			required_argument, NULL, 2001 },
77 92
 	{ "vo-input",			required_argument, NULL, 2002 },
78 93
 	{ "vo-route",			required_argument, NULL, 2002 }, // Alias of --vo-input
79 94
 	{ "vo-lock",			required_argument, NULL, 2003 },
80 95
 	{ "vo-unlock",			required_argument, NULL, 2004 },
96
+
97
+	{ "mon-name",			required_argument, NULL, 3001 },
98
+	{ "mon-input",			required_argument, NULL, 3002 },
99
+	{ "mon-route",			required_argument, NULL, 3002 }, // Alias of --mo-input
100
+	{ "mon-lock",			required_argument, NULL, 3003 },
101
+	{ "mon-unlock",			required_argument, NULL, 3004 },
81 102
 	{ "mo-name",			required_argument, NULL, 3001 },
82 103
 	{ "mo-input",			required_argument, NULL, 3002 },
83 104
 	{ "mo-route",			required_argument, NULL, 3002 }, // Alias of --mo-input
84 105
 	{ "mo-lock",			required_argument, NULL, 3003 },
85 106
 	{ "mo-unlock",			required_argument, NULL, 3004 },
107
+
108
+	{ "ser-name",			required_argument, NULL, 4001 },
109
+	{ "ser-input",			required_argument, NULL, 4002 },
110
+	{ "ser-connect",		required_argument, NULL, 4002 }, // Alias of --se-input
111
+	{ "ser-route",			required_argument, NULL, 4002 }, // Alias of --se-input
112
+	{ "ser-lock",			required_argument, NULL, 4003 },
113
+	{ "ser-unlock",			required_argument, NULL, 4004 },
114
+	{ "ser-dir",			required_argument, NULL, 4005 },
115
+	{ "ser-clear",			required_argument, NULL, 4006 },
86 116
 	{ "se-name",			required_argument, NULL, 4001 },
87 117
 	{ "se-input",			required_argument, NULL, 4002 },
88 118
 	{ "se-connect",			required_argument, NULL, 4002 }, // Alias of --se-input
@@ -91,12 +121,14 @@ static const struct option long_options[] = {
91 121
 	{ "se-unlock",			required_argument, NULL, 4004 },
92 122
 	{ "se-dir",				required_argument, NULL, 4005 },
93 123
 	{ "se-clear",			required_argument, NULL, 4006 },
124
+
94 125
 	{ "pu-input",			required_argument, NULL, 5001 },
95 126
 	{ "pu-connect",			required_argument, NULL, 5001 }, // Alias of --pu-input
96 127
 	{ "pu-route",			required_argument, NULL, 5001 }, // Alias of --pu-input
97 128
 	{ "pu-lock",			required_argument, NULL, 5002 },
98 129
 	{ "pu-unlock",			required_argument, NULL, 5003 },
99 130
 	{ "pu-clear",			required_argument, NULL, 5004 },
131
+
100 132
 	{ "fr-name",			required_argument, NULL, 6001 },
101 133
 	{ "fr-output",			required_argument, NULL, 6002 },
102 134
 	{ "fr-connect",			required_argument, NULL, 6002 }, // Alias of --fr-output
@@ -126,53 +158,53 @@ static void show_help(struct videohub_data *data) {
126 158
 	printf("                            . the device to the current configuration.\n");
127 159
 	printf("\n");
128 160
 	printf(" --list-device              | Display device info.\n");
129
-	printf(" --list-vinputs             | List device video inputs.\n");
130
-	printf(" --list-voutputs            | List device video outputs.\n");
131
-	printf(" --list-moutputs            | List device monitoring outputs.\n");
161
+	printf(" --list-inputs              | List device input ports.\n");
162
+	printf(" --list-outputs             | List device output ports.\n");
163
+	printf(" --list-monitor             | List device monitoring outputs.\n");
132 164
 	printf(" --list-serial              | List device serial ports.\n");
133 165
 	printf(" --list-proc-units          | List device processing units.\n");
134 166
 	printf(" --list-frames              | List device frame buffers.\n");
135 167
 	printf("\n");
136 168
 	printf(" --set-name <name>          | Set the device \"friendly name\".\n");
137 169
 	printf("\n");
138
-	printf("Video inputs configuration:\n");
139
-	printf(" --vi-name <in_X> <name>    | Set video input port X name.\n");
140
-	printf(" --vi-output <in_X> <out_Y> | Route video input X to output Y.\n");
141
-	printf(" --vi-monitor <in_X> <mout_Y> | Route video input X to mon port Y.\n");
170
+	printf("Inputs configuration:\n");
171
+	printf(" --in-name <in_X> <name>       | Set input port X name.\n");
172
+	printf(" --in-output <in_X> <out_Y>    | Route input X to output Y.\n");
173
+	printf(" --in-monitor <in_X> <mout_Y>  | Route input X to monitor port Y.\n");
142 174
 	printf("\n");
143
-	printf("Video outputs configuration:\n");
144
-	printf(" --vo-name <out_X> <name>   | Set video output port X name.\n");
145
-	printf(" --vo-input <out_X> <in_Y>  | Connect video output X to input Y.\n");
146
-	printf(" --vo-lock <out_X>          | Lock output port X.\n");
147
-	printf(" --vo-unlock <out_X>        | Unlock output port X.\n");
175
+	printf("Outputs configuration:\n");
176
+	printf(" --out-name <out_X> <name>     | Set output port X name.\n");
177
+	printf(" --out-input <out_X> <in_Y>    | Connect output X to input Y.\n");
178
+	printf(" --out-lock <out_X>            | Lock output port X.\n");
179
+	printf(" --out-unlock <out_X>          | Unlock output port X.\n");
148 180
 	printf("\n");
149 181
 	printf("Monitoring outputs configuration:\n");
150
-	printf(" --mo-name <mout_X> <name>  | Set monitoring port X name.\n");
151
-	printf(" --mo-input <mout_X> <in_Y> | Connect monitoring X to input Y.\n");
152
-	printf(" --mo-lock <mout_X>         | Lock monitoring port X.\n");
153
-	printf(" --mo-unlock <mout_X>       | Unlock monitoring port X.\n");
182
+	printf(" --mon-name <mout_X> <name>    | Set monitoring port X name.\n");
183
+	printf(" --mon-input <mout_X> <in_Y>   | Connect monitoring X to input Y.\n");
184
+	printf(" --mon-lock <mout_X>           | Lock monitoring port X.\n");
185
+	printf(" --mon-unlock <mout_X>         | Unlock monitoring port X.\n");
154 186
 	printf("\n");
155 187
 	printf("Serial ports configuration:\n");
156
-	printf(" --se-name <ser_X> <name>   | Set serial port X name.\n");
157
-	printf(" --se-connect <ser_X> <ser_Y> | Connect serial X to serial Y.\n");
158
-	printf(" --se-clear <ser_X>         | Disconnect serial port X from serial Y.\n");
159
-	printf(" --se-lock <ser_X>          | Lock serial port X.\n");
160
-	printf(" --se-unlock <ser_X>        | Unlock serial port X.\n");
161
-	printf(" --se-dir <ser_X> <dir>     | Set serial port X direction.\n");
162
-	printf("                            . <dir> can be 'auto', 'in' or 'out'.\n");
188
+	printf(" --ser-name <ser_X> <name>     | Set serial port X name.\n");
189
+	printf(" --ser-connect <ser_X> <ser_Y> | Connect serial X to serial Y.\n");
190
+	printf(" --ser-clear <ser_X>           | Disconnect serial port X from serial Y.\n");
191
+	printf(" --ser-lock <ser_X>            | Lock serial port X.\n");
192
+	printf(" --ser-unlock <ser_X>          | Unlock serial port X.\n");
193
+	printf(" --ser-dir <ser_X> <dir>       | Set serial port X direction.\n");
194
+	printf("                               . <dir> can be 'auto', 'in' or 'out'.\n");
163 195
 	printf("\n");
164 196
 	printf("Processing units configuration:\n");
165
-	printf(" --pu-input <pu_X> <in_Y>   | Connect processing unit X to input Y.\n");
166
-	printf(" --pu-clear <pu_X>          | Disconnect unit X from input Y.\n");
167
-	printf(" --pu-lock <pu_X>           | Lock processing unit X.\n");
168
-	printf(" --pu-unlock <pu_X>         | Unlock processing unit X.\n");
197
+	printf(" --pu-input <pu_X> <in_Y>      | Connect processing unit X to input Y.\n");
198
+	printf(" --pu-clear <pu_X>             | Disconnect unit X from input Y.\n");
199
+	printf(" --pu-lock <pu_X>              | Lock processing unit X.\n");
200
+	printf(" --pu-unlock <pu_X>            | Unlock processing unit X.\n");
169 201
 	printf("\n");
170 202
 	printf("Frames configuration:\n");
171
-	printf(" --fr-name <fr_X> <name>    | Set frame X name.\n");
172
-	printf(" --fr-output <fr_X> <out_Y> | Output frame X to output Y.\n");
173
-	printf(" --fr-clear <fr_X>          | Stop outputing frame X to the output.\n");
174
-	printf(" --fr-lock <fr_X>           | Lock frame X.\n");
175
-	printf(" --fr-unlock <rf_X>         | Unlock frame X.\n");
203
+	printf(" --fr-name <fr_X> <name>       | Set frame X name.\n");
204
+	printf(" --fr-output <fr_X> <out_Y>    | Output frame X to output Y.\n");
205
+	printf(" --fr-clear <fr_X>             | Stop outputing frame X to the output.\n");
206
+	printf(" --fr-lock <fr_X>              | Lock frame X.\n");
207
+	printf(" --fr-unlock <rf_X>            | Unlock frame X.\n");
176 208
 	printf("\n");
177 209
 	printf("Misc options:\n");
178 210
 	printf(" -T --test-input <file>     | Read commands from <file>.\n");

Loading…
Cancel
Save