Browse Source

Add simple test suite.

Georgi Chorbadzhiyski 9 years ago
parent
commit
6688abc16d
25 changed files with 779 additions and 3 deletions
  1. 1
    0
      .gitignore
  2. 1
    1
      Makefile
  3. 2
    2
      README
  4. 0
    0
      test/input-00.txt
  5. 37
    0
      test/input-03.txt
  6. 13
    0
      test/input-10.txt
  7. 13
    0
      test/input-11.txt
  8. 6
    0
      test/input-12.txt
  9. 6
    0
      test/input-13.txt
  10. 85
    0
      test/input-14.txt
  11. 93
    0
      test/run
  12. 57
    0
      test/test-01.ok
  13. 66
    0
      test/test-02.ok
  14. 129
    0
      test/test-03.ok
  15. 70
    0
      test/test-04.ok
  16. 57
    0
      test/test-05.ok
  17. 18
    0
      test/test-06.ok
  18. 11
    0
      test/test-07.ok
  19. 24
    0
      test/test-08.ok
  20. 22
    0
      test/test-09.ok
  21. 1
    0
      test/test-10.ok
  22. 1
    0
      test/test-11.ok
  23. 1
    0
      test/test-12.ok
  24. 1
    0
      test/test-13.ok
  25. 64
    0
      test/test-14.ok

+ 1
- 0
.gitignore View File

2
 version.h
2
 version.h
3
 *.o
3
 *.o
4
 *.d
4
 *.d
5
+test/*.out

+ 1
- 1
Makefile View File

48
 videohubctrl_LIBS = -lpthread
48
 videohubctrl_LIBS = -lpthread
49
 videohubctrl_OBJS = $(FUNCS_LIB) $(videohubctrl_SRC:.c=.o)
49
 videohubctrl_OBJS = $(FUNCS_LIB) $(videohubctrl_SRC:.c=.o)
50
 
50
 
51
-CLEAN_OBJS = videohubctrl $(videohubctrl_SRC:.c=.o) $(videohubctrl_SRC:.c=.d)
51
+CLEAN_OBJS = videohubctrl $(videohubctrl_SRC:.c=.o) $(videohubctrl_SRC:.c=.d) test/*.out
52
 DISTCLEAN_OBJS = version.h
52
 DISTCLEAN_OBJS = version.h
53
 
53
 
54
 .PHONY: distclean clean version install uninstall
54
 .PHONY: distclean clean version install uninstall

+ 2
- 2
README View File

135
 ==============
135
 ==============
136
 
136
 
137
 Here is how videohubctrl output looks like using the commands recorded
137
 Here is how videohubctrl output looks like using the commands recorded
138
-in vh_test_commands.txt file.
138
+in tests/input-00.txt file.
139
 
139
 
140
 |----------------------------------------------------------------------|
140
 |----------------------------------------------------------------------|
141
-$ videohubctrl --test vh_test_commands.txt
141
+$ videohubctrl --test tests/input-00.txt
142
 Device info
142
 Device info
143
   -----------------------------------------------------------
143
   -----------------------------------------------------------
144
   | Device address             | sdi-matrix                 |
144
   | Device address             | sdi-matrix                 |

vh_test_commands.txt → test/input-00.txt View File


+ 37
- 0
test/input-03.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 2.4
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: true
6
+Model name: Blackmagic Micro Videohub
7
+Unique ID: 7c2e0d021714
8
+Video inputs: 16
9
+Video processing units: 0
10
+Video outputs: 16
11
+Video monitoring outputs: 0
12
+Serial ports: 0
13
+
14
+VIDEO INPUT STATUS:
15
+0 BNC
16
+1 BNC
17
+2 BNC
18
+3 BNC
19
+4 Optical
20
+5 Optical
21
+6 Optical
22
+7 Optical
23
+13 None
24
+14 None
25
+
26
+VIDEO OUTPUT STATUS:
27
+4 None
28
+5 None
29
+6 None
30
+8 BNC
31
+9 BNC
32
+10 BNC
33
+11 BNC
34
+12 Optical
35
+13 Optical
36
+14 Optical
37
+15 Optical

+ 13
- 0
test/input-10.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 3.3
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: true
6
+Model name: Blackmagic Micro Videohub
7
+Unique ID: 7c2e0d021714
8
+Video inputs: 16
9
+Video processing units: 0
10
+Video outputs: 16
11
+Video monitoring outputs: 0
12
+Serial ports: 0
13
+

+ 13
- 0
test/input-11.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 2.3
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: true
6
+Model name: Blackmagic Micro Videohub
7
+Unique ID: 7c2e0d021714
8
+Video inputs: 999
9
+Video processing units: 0
10
+Video outputs: 16
11
+Video monitoring outputs: 0
12
+Serial ports: 0
13
+

+ 6
- 0
test/input-12.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 2.3
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: false
6
+Model name: Blackmagic Micro Videohub

+ 6
- 0
test/input-13.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 2.3
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: needs_update
6
+Model name: Blackmagic Micro Videohub

+ 85
- 0
test/input-14.txt View File

1
+PROTOCOL PREAMBLE:
2
+Version: 2.4
3
+
4
+VIDEOHUB DEVICE:
5
+Device present: true
6
+Model name: Blackmagic Micro Videohub
7
+Unique ID: 7c2e0d021714
8
+Video inputs: 16
9
+Video processing units: 0
10
+Video outputs: 16
11
+Video monitoring outputs: 0
12
+Serial ports: 0
13
+
14
+INPUT LABELS:
15
+0 Windows 1
16
+1 Windows 2
17
+2 Windows 3
18
+3 Windows 4 HD
19
+4 Input 5
20
+5 Input 6
21
+16 Input 7
22
+7 Input 8
23
+8 Input 9
24
+9 Input 10
25
+10 Input 11
26
+11 DPlay1
27
+12 DPlay2
28
+13 Input 14
29
+14 Input 15
30
+15 Loopback
31
+
32
+OUTPUT LABELS:
33
+0 Enc1 1
34
+1 Enc1 2
35
+2 Enc1 3
36
+3 Enc1 4
37
+4 Output 5
38
+5 Output 6
39
+6 Output 7
40
+17 Output 8
41
+8 Enc2 1
42
+9 Output 10
43
+10 Output 11
44
+11 Denc
45
+12 Output 13
46
+13 Output 14
47
+14 Output 15
48
+15 Loopback
49
+
50
+VIDEO OUTPUT LOCKS:
51
+0 L
52
+1 L
53
+2 L
54
+3 L
55
+4 U
56
+5 U
57
+6 U
58
+7 U
59
+8 L
60
+9 U
61
+10 U
62
+11 L
63
+12 O
64
+13 U
65
+14 U
66
+19 O
67
+
68
+VIDEO OUTPUT ROUTING:
69
+0 2
70
+1 1
71
+2 0
72
+3 0
73
+4 4
74
+5 5
75
+66 6
76
+7 3
77
+8 3
78
+9 99
79
+10 10
80
+11 12
81
+12 11
82
+13 13
83
+14 14
84
+15 15
85
+

+ 93
- 0
test/run View File

1
+#!/bin/sh
2
+# Simple test suite for videohubctrl functionality
3
+
4
+cd $(dirname $0)/..
5
+
6
+make
7
+
8
+ulimit -c unlimited
9
+
10
+export PATH=".:$PATH"
11
+
12
+check() {
13
+	if diff -u $1.ok $1.out
14
+	then
15
+		echo "OK    : $2"
16
+	else
17
+		echo "ERROR : $2"
18
+		exit 1
19
+	fi
20
+}
21
+
22
+videohubctrl --test-input test/input-00.txt $@ &> test/test-01.out
23
+check test/test-01 "Test parsing of test/input-00.txt"
24
+
25
+videohubctrl --test-input test/input-00.txt --backup $@ &> test/test-02.out
26
+check test/test-02 "Test --backup option output"
27
+
28
+(
29
+	sed -e 's|\\||g' < test/test-02.ok | tr -d '\n'
30
+	echo ' --test-input test/input-03.txt'
31
+) | sh &> test/test-03.out
32
+check test/test-03 "Test --backup restore"
33
+
34
+videohubctrl --test-input test/input-00.txt \
35
+	--vi-name "Windows 4 HD" "Windows 4 HighDef" \
36
+	--vi-name 5 "In 5" \
37
+	--vi-name "Input 6" "Camera 6" \
38
+	--vo-name "Enc1 1" "Encoder 1" \
39
+	--vo-name 16 Dev-Lo \
40
+	--vo-lock 6 \
41
+	--vo-lock "Output 15" \
42
+	--vo-unlock 12 \
43
+	--vo-unlock "Enc2 1" \
44
+	--vo-route "Output 5" "Windows 1" \
45
+	--vo-route 5 2 \
46
+	--vo-route 5 "Windows 3" \
47
+$@ &> test/test-04.out
48
+check test/test-04 "Test multiple configuration commands"
49
+
50
+grep -v ^videohub: < test/test-03.out > test/test-05.out
51
+sed -e 's,| L |,| O |,g' < test/test-01.ok > test/test-05.ok
52
+check test/test-05 "Test if --backup restored correct config."
53
+
54
+./videohubctrl --test-input test/input-00.txt --vi-name 0           "Test Input 0"   $@ &> test/test-06.out
55
+./videohubctrl --test-input test/input-00.txt --vi-name 18          "Test Input 18"  $@ &>> test/test-06.out
56
+./videohubctrl --test-input test/input-00.txt --vi-name "Input 18"  "Test Input 18"  $@ &>> test/test-06.out
57
+./videohubctrl --test-input test/input-00.txt --vo-name 18          "Test Output 18" $@ &>> test/test-06.out
58
+./videohubctrl --test-input test/input-00.txt --vo-name "Output 18" "Test Output 18" $@ &>> test/test-06.out
59
+./videohubctrl --test-input test/input-00.txt --vo-lock 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
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
72
+check test/test-06 "Test errors on commands with invalid ports."
73
+
74
+videohubctrl --test-input test/input-00.txt --list-device $@ &> test/test-07.out
75
+check test/test-07 "Test --list-device option output"
76
+
77
+videohubctrl --test-input test/input-00.txt --list-vinputs $@ &> test/test-08.out
78
+check test/test-08 "Test --list-vinputs option output"
79
+
80
+videohubctrl --test-input test/input-00.txt --list-voutputs $@ &> test/test-09.out
81
+check test/test-09 "Test --list-voutputs option output"
82
+
83
+videohubctrl --test-input test/input-10.txt $@ &> test/test-10.out
84
+check test/test-10 "Test invalid protocol"
85
+
86
+videohubctrl --test-input test/input-11.txt $@ &> test/test-11.out
87
+check test/test-11 "Test invalid number of ports"
88
+
89
+videohubctrl --test-input test/input-12.txt $@ &> test/test-12.out
90
+check test/test-12 "Test device-not_present check"
91
+
92
+videohubctrl --test-input test/input-14.txt $@ &> test/test-14.out
93
+check test/test-14 "Test buggy input"

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

1
+Device info
2
+  -----------------------------------------------------------
3
+  | Device address             | sdi-matrix                 |
4
+  | Device port                | 9990                       |
5
+  | Model name                 | Blackmagic Micro Videohub  |
6
+  | Unique ID                  | 7c2e0d021714               |
7
+  | Protocol                   | 2.4                        |
8
+  | Video inputs               | 16                         |
9
+  | Video outputs              | 16                         |
10
+  -----------------------------------------------------------
11
+
12
+Video inputs
13
+  --------------------------------------------------------------------
14
+  | ## | Video input name         | n | Routed to output         | s |
15
+  --------------------------------------------------------------------
16
+  |  1 | Windows 1                | 2 | Enc1 3                   | B |
17
+  |    |                          |   | Enc1 4                   |   |
18
+  |  2 | Windows 2                | 1 | Enc1 2                   | B |
19
+  |  3 | Windows 3                | 1 | Enc1 1                   | B |
20
+  |  4 | Windows 4 HD             | 2 | Output 8                 | B |
21
+  |    |                          |   | Enc2 1                   |   |
22
+  |  5 | Input 5                  | 1 | Output 5                 | o |
23
+  |  6 | Input 6                  | 1 | Output 6                 | o |
24
+  |  7 | Input 7                  | 1 | Output 7                 | o |
25
+  |  8 | Input 8                  | 0 | -                        | o |
26
+  |  9 | Input 9                  | 0 | -                        |   |
27
+  | 10 | Input 10                 | 1 | Output 10                |   |
28
+  | 11 | Input 11                 | 1 | Output 11                |   |
29
+  | 12 | DPlay1                   | 1 | Output 13                |   |
30
+  | 13 | DPlay2                   | 1 | Denc                     |   |
31
+  | 14 | Input 14                 | 1 | Output 14                | x |
32
+  | 15 | Input 15                 | 1 | Output 15                | x |
33
+  | 16 | Loopback                 | 1 | Loopback                 |   |
34
+  --------------------------------------------------------------------
35
+
36
+Video outputs
37
+  --------------------------------------------------------------------
38
+  | ## | x | Video output name        | Connected video input    | s |
39
+  --------------------------------------------------------------------
40
+  |  1 | L | Enc1 1                   | Windows 3                |   |
41
+  |  2 | L | Enc1 2                   | Windows 2                |   |
42
+  |  3 | L | Enc1 3                   | Windows 1                |   |
43
+  |  4 | L | Enc1 4                   | Windows 1                |   |
44
+  |  5 |   | Output 5                 | Input 5                  | x |
45
+  |  6 |   | Output 6                 | Input 6                  | x |
46
+  |  7 |   | Output 7                 | Input 7                  | x |
47
+  |  8 |   | Output 8                 | Windows 4 HD             |   |
48
+  |  9 | L | Enc2 1                   | Windows 4 HD             | B |
49
+  | 10 |   | Output 10                | Input 10                 | B |
50
+  | 11 |   | Output 11                | Input 11                 | B |
51
+  | 12 | L | Denc                     | DPlay2                   | B |
52
+  | 13 | O | Output 13                | DPlay1                   | o |
53
+  | 14 |   | Output 14                | Input 14                 | o |
54
+  | 15 |   | Output 15                | Input 15                 | o |
55
+  | 16 | O | Loopback                 | Loopback                 | o |
56
+  --------------------------------------------------------------------
57
+

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

1
+videohubctrl \
2
+  --vi-name  1 "Windows 1" \
3
+  --vi-name  2 "Windows 2" \
4
+  --vi-name  3 "Windows 3" \
5
+  --vi-name  4 "Windows 4 HD" \
6
+  --vi-name  5 "Input 5" \
7
+  --vi-name  6 "Input 6" \
8
+  --vi-name  7 "Input 7" \
9
+  --vi-name  8 "Input 8" \
10
+  --vi-name  9 "Input 9" \
11
+  --vi-name 10 "Input 10" \
12
+  --vi-name 11 "Input 11" \
13
+  --vi-name 12 "DPlay1" \
14
+  --vi-name 13 "DPlay2" \
15
+  --vi-name 14 "Input 14" \
16
+  --vi-name 15 "Input 15" \
17
+  --vi-name 16 "Loopback" \
18
+  --vo-name  1 "Enc1 1" \
19
+  --vo-name  2 "Enc1 2" \
20
+  --vo-name  3 "Enc1 3" \
21
+  --vo-name  4 "Enc1 4" \
22
+  --vo-name  5 "Output 5" \
23
+  --vo-name  6 "Output 6" \
24
+  --vo-name  7 "Output 7" \
25
+  --vo-name  8 "Output 8" \
26
+  --vo-name  9 "Enc2 1" \
27
+  --vo-name 10 "Output 10" \
28
+  --vo-name 11 "Output 11" \
29
+  --vo-name 12 "Denc" \
30
+  --vo-name 13 "Output 13" \
31
+  --vo-name 14 "Output 14" \
32
+  --vo-name 15 "Output 15" \
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 \
50
+  --vo-unlock  1 --vo-lock  1 \
51
+  --vo-unlock  2 --vo-lock  2 \
52
+  --vo-unlock  3 --vo-lock  3 \
53
+  --vo-unlock  4 --vo-lock  4 \
54
+  --vo-unlock  5 \
55
+  --vo-unlock  6 \
56
+  --vo-unlock  7 \
57
+  --vo-unlock  8 \
58
+  --vo-unlock  9 --vo-lock  9 \
59
+  --vo-unlock 10 \
60
+  --vo-unlock 11 \
61
+  --vo-unlock 12 --vo-lock 12 \
62
+  --vo-unlock 13 --vo-lock 13 \
63
+  --vo-unlock 14 \
64
+  --vo-unlock 15 \
65
+  --vo-unlock 16 --vo-lock 16
66
+

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

1
+videohub: rename video input 1 "" to "Windows 1"
2
+videohub: rename video input 2 "" to "Windows 2"
3
+videohub: rename video input 3 "" to "Windows 3"
4
+videohub: rename video input 4 "" to "Windows 4 HD"
5
+videohub: rename video input 5 "" to "Input 5"
6
+videohub: rename video input 6 "" to "Input 6"
7
+videohub: rename video input 7 "" to "Input 7"
8
+videohub: rename video input 8 "" to "Input 8"
9
+videohub: rename video input 9 "" to "Input 9"
10
+videohub: rename video input 10 "" to "Input 10"
11
+videohub: rename video input 11 "" to "Input 11"
12
+videohub: rename video input 12 "" to "DPlay1"
13
+videohub: rename video input 13 "" to "DPlay2"
14
+videohub: rename video input 14 "" to "Input 14"
15
+videohub: rename video input 15 "" to "Input 15"
16
+videohub: rename video input 16 "" to "Loopback"
17
+videohub: rename video output 1 "" to "Enc1 1"
18
+videohub: rename video output 2 "" to "Enc1 2"
19
+videohub: rename video output 3 "" to "Enc1 3"
20
+videohub: rename video output 4 "" to "Enc1 4"
21
+videohub: rename video output 5 "" to "Output 5"
22
+videohub: rename video output 6 "" to "Output 6"
23
+videohub: rename video output 7 "" to "Output 7"
24
+videohub: rename video output 8 "" to "Output 8"
25
+videohub: rename video output 9 "" to "Enc2 1"
26
+videohub: rename video output 10 "" to "Output 10"
27
+videohub: rename video output 11 "" to "Output 11"
28
+videohub: rename video output 12 "" to "Denc"
29
+videohub: rename video output 13 "" to "Output 13"
30
+videohub: rename video output 14 "" to "Output 14"
31
+videohub: rename video output 15 "" to "Output 15"
32
+videohub: rename video output 16 "" to "Loopback"
33
+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"
35
+videohub: set video output 3 "Enc1 3" to read from video input 1 "Windows 1"
36
+videohub: set video output 4 "Enc1 4" to read from video input 1 "Windows 1"
37
+videohub: set video output 5 "Output 5" to read from video input 5 "Input 5"
38
+videohub: set video output 6 "Output 6" to read from video input 6 "Input 6"
39
+videohub: set video output 7 "Output 7" to read from video input 7 "Input 7"
40
+videohub: set video output 8 "Output 8" to read from video input 4 "Windows 4 HD"
41
+videohub: set video output 9 "Enc2 1" to read from video input 4 "Windows 4 HD"
42
+videohub: set video output 10 "Output 10" to read from video input 10 "Input 10"
43
+videohub: set video output 11 "Output 11" to read from video input 11 "Input 11"
44
+videohub: set video output 12 "Denc" to read from video input 13 "DPlay2"
45
+videohub: set video output 13 "Output 13" to read from video input 12 "DPlay1"
46
+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"
48
+videohub: set video output 16 "Loopback" to read from video input 16 "Loopback"
49
+videohub: unlock video output 1 "Enc1 1"
50
+videohub: lock video output 1 "Enc1 1"
51
+videohub: unlock video output 2 "Enc1 2"
52
+videohub: lock video output 2 "Enc1 2"
53
+videohub: unlock video output 3 "Enc1 3"
54
+videohub: lock video output 3 "Enc1 3"
55
+videohub: unlock video output 4 "Enc1 4"
56
+videohub: lock video output 4 "Enc1 4"
57
+videohub: unlock video output 5 "Output 5"
58
+videohub: unlock video output 6 "Output 6"
59
+videohub: unlock video output 7 "Output 7"
60
+videohub: unlock video output 8 "Output 8"
61
+videohub: unlock video output 9 "Enc2 1"
62
+videohub: lock video output 9 "Enc2 1"
63
+videohub: unlock video output 10 "Output 10"
64
+videohub: unlock video output 11 "Output 11"
65
+videohub: unlock video output 12 "Denc"
66
+videohub: lock video output 12 "Denc"
67
+videohub: unlock video output 13 "Output 13"
68
+videohub: lock video output 13 "Output 13"
69
+videohub: unlock video output 14 "Output 14"
70
+videohub: unlock video output 15 "Output 15"
71
+videohub: unlock video output 16 "Loopback"
72
+videohub: lock video output 16 "Loopback"
73
+Device info
74
+  -----------------------------------------------------------
75
+  | Device address             | sdi-matrix                 |
76
+  | Device port                | 9990                       |
77
+  | Model name                 | Blackmagic Micro Videohub  |
78
+  | Unique ID                  | 7c2e0d021714               |
79
+  | Protocol                   | 2.4                        |
80
+  | Video inputs               | 16                         |
81
+  | Video outputs              | 16                         |
82
+  -----------------------------------------------------------
83
+
84
+Video inputs
85
+  --------------------------------------------------------------------
86
+  | ## | Video input name         | n | Routed to output         | s |
87
+  --------------------------------------------------------------------
88
+  |  1 | Windows 1                | 2 | Enc1 3                   | B |
89
+  |    |                          |   | Enc1 4                   |   |
90
+  |  2 | Windows 2                | 1 | Enc1 2                   | B |
91
+  |  3 | Windows 3                | 1 | Enc1 1                   | B |
92
+  |  4 | Windows 4 HD             | 2 | Output 8                 | B |
93
+  |    |                          |   | Enc2 1                   |   |
94
+  |  5 | Input 5                  | 1 | Output 5                 | o |
95
+  |  6 | Input 6                  | 1 | Output 6                 | o |
96
+  |  7 | Input 7                  | 1 | Output 7                 | o |
97
+  |  8 | Input 8                  | 0 | -                        | o |
98
+  |  9 | Input 9                  | 0 | -                        |   |
99
+  | 10 | Input 10                 | 1 | Output 10                |   |
100
+  | 11 | Input 11                 | 1 | Output 11                |   |
101
+  | 12 | DPlay1                   | 1 | Output 13                |   |
102
+  | 13 | DPlay2                   | 1 | Denc                     |   |
103
+  | 14 | Input 14                 | 1 | Output 14                | x |
104
+  | 15 | Input 15                 | 1 | Output 15                | x |
105
+  | 16 | Loopback                 | 1 | Loopback                 |   |
106
+  --------------------------------------------------------------------
107
+
108
+Video outputs
109
+  --------------------------------------------------------------------
110
+  | ## | x | Video output name        | Connected video input    | s |
111
+  --------------------------------------------------------------------
112
+  |  1 | O | Enc1 1                   | Windows 3                |   |
113
+  |  2 | O | Enc1 2                   | Windows 2                |   |
114
+  |  3 | O | Enc1 3                   | Windows 1                |   |
115
+  |  4 | O | Enc1 4                   | Windows 1                |   |
116
+  |  5 |   | Output 5                 | Input 5                  | x |
117
+  |  6 |   | Output 6                 | Input 6                  | x |
118
+  |  7 |   | Output 7                 | Input 7                  | x |
119
+  |  8 |   | Output 8                 | Windows 4 HD             |   |
120
+  |  9 | O | Enc2 1                   | Windows 4 HD             | B |
121
+  | 10 |   | Output 10                | Input 10                 | B |
122
+  | 11 |   | Output 11                | Input 11                 | B |
123
+  | 12 | O | Denc                     | DPlay2                   | B |
124
+  | 13 | O | Output 13                | DPlay1                   | o |
125
+  | 14 |   | Output 14                | Input 14                 | o |
126
+  | 15 |   | Output 15                | Input 15                 | o |
127
+  | 16 | O | Loopback                 | Loopback                 | o |
128
+  --------------------------------------------------------------------
129
+

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

1
+videohub: rename video input 4 "Windows 4 HD" to "Windows 4 HighDef"
2
+videohub: rename video input 5 "Input 5" to "In 5"
3
+videohub: rename video input 6 "Input 6" to "Camera 6"
4
+videohub: rename video output 1 "Enc1 1" to "Encoder 1"
5
+videohub: rename video output 16 "Loopback" to "Dev-Lo"
6
+videohub: lock video output 6 "Output 6"
7
+videohub: lock video output 15 "Output 15"
8
+videohub: force unlock video output 12 "Denc"
9
+videohub: force unlock video output 9 "Enc2 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"
12
+videohub: set video output 5 "Output 5" to read from video input 3 "Windows 3"
13
+Device info
14
+  -----------------------------------------------------------
15
+  | Device address             | sdi-matrix                 |
16
+  | Device port                | 9990                       |
17
+  | Model name                 | Blackmagic Micro Videohub  |
18
+  | Unique ID                  | 7c2e0d021714               |
19
+  | Protocol                   | 2.4                        |
20
+  | Video inputs               | 16                         |
21
+  | Video outputs              | 16                         |
22
+  -----------------------------------------------------------
23
+
24
+Video inputs
25
+  --------------------------------------------------------------------
26
+  | ## | Video input name         | n | Routed to output         | s |
27
+  --------------------------------------------------------------------
28
+  |  1 | Windows 1                | 2 | Enc1 3                   | B |
29
+  |    |                          |   | Enc1 4                   |   |
30
+  |  2 | Windows 2                | 1 | Enc1 2                   | B |
31
+  |  3 | Windows 3                | 2 | Encoder 1                | B |
32
+  |    |                          |   | Output 5                 |   |
33
+  |  4 | Windows 4 HighDef        | 2 | Output 8                 | B |
34
+  |    |                          |   | Enc2 1                   |   |
35
+  |  5 | In 5                     | 0 | -                        | o |
36
+  |  6 | Camera 6                 | 1 | Output 6                 | o |
37
+  |  7 | Input 7                  | 1 | Output 7                 | o |
38
+  |  8 | Input 8                  | 0 | -                        | o |
39
+  |  9 | Input 9                  | 0 | -                        |   |
40
+  | 10 | Input 10                 | 1 | Output 10                |   |
41
+  | 11 | Input 11                 | 1 | Output 11                |   |
42
+  | 12 | DPlay1                   | 1 | Output 13                |   |
43
+  | 13 | DPlay2                   | 1 | Denc                     |   |
44
+  | 14 | Input 14                 | 1 | Output 14                | x |
45
+  | 15 | Input 15                 | 1 | Output 15                | x |
46
+  | 16 | Loopback                 | 1 | Dev-Lo                   |   |
47
+  --------------------------------------------------------------------
48
+
49
+Video outputs
50
+  --------------------------------------------------------------------
51
+  | ## | x | Video output name        | Connected video input    | s |
52
+  --------------------------------------------------------------------
53
+  |  1 | L | Encoder 1                | Windows 3                |   |
54
+  |  2 | L | Enc1 2                   | Windows 2                |   |
55
+  |  3 | L | Enc1 3                   | Windows 1                |   |
56
+  |  4 | L | Enc1 4                   | Windows 1                |   |
57
+  |  5 |   | Output 5                 | Windows 3                | x |
58
+  |  6 | O | Output 6                 | Camera 6                 | x |
59
+  |  7 |   | Output 7                 | Input 7                  | x |
60
+  |  8 |   | Output 8                 | Windows 4 HighDef        |   |
61
+  |  9 |   | Enc2 1                   | Windows 4 HighDef        | B |
62
+  | 10 |   | Output 10                | Input 10                 | B |
63
+  | 11 |   | Output 11                | Input 11                 | B |
64
+  | 12 |   | Denc                     | DPlay2                   | B |
65
+  | 13 | O | Output 13                | DPlay1                   | o |
66
+  | 14 |   | Output 14                | Input 14                 | o |
67
+  | 15 | O | Output 15                | Input 15                 | o |
68
+  | 16 | O | Dev-Lo                   | Loopback                 | o |
69
+  --------------------------------------------------------------------
70
+

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

1
+Device info
2
+  -----------------------------------------------------------
3
+  | Device address             | sdi-matrix                 |
4
+  | Device port                | 9990                       |
5
+  | Model name                 | Blackmagic Micro Videohub  |
6
+  | Unique ID                  | 7c2e0d021714               |
7
+  | Protocol                   | 2.4                        |
8
+  | Video inputs               | 16                         |
9
+  | Video outputs              | 16                         |
10
+  -----------------------------------------------------------
11
+
12
+Video inputs
13
+  --------------------------------------------------------------------
14
+  | ## | Video input name         | n | Routed to output         | s |
15
+  --------------------------------------------------------------------
16
+  |  1 | Windows 1                | 2 | Enc1 3                   | B |
17
+  |    |                          |   | Enc1 4                   |   |
18
+  |  2 | Windows 2                | 1 | Enc1 2                   | B |
19
+  |  3 | Windows 3                | 1 | Enc1 1                   | B |
20
+  |  4 | Windows 4 HD             | 2 | Output 8                 | B |
21
+  |    |                          |   | Enc2 1                   |   |
22
+  |  5 | Input 5                  | 1 | Output 5                 | o |
23
+  |  6 | Input 6                  | 1 | Output 6                 | o |
24
+  |  7 | Input 7                  | 1 | Output 7                 | o |
25
+  |  8 | Input 8                  | 0 | -                        | o |
26
+  |  9 | Input 9                  | 0 | -                        |   |
27
+  | 10 | Input 10                 | 1 | Output 10                |   |
28
+  | 11 | Input 11                 | 1 | Output 11                |   |
29
+  | 12 | DPlay1                   | 1 | Output 13                |   |
30
+  | 13 | DPlay2                   | 1 | Denc                     |   |
31
+  | 14 | Input 14                 | 1 | Output 14                | x |
32
+  | 15 | Input 15                 | 1 | Output 15                | x |
33
+  | 16 | Loopback                 | 1 | Loopback                 |   |
34
+  --------------------------------------------------------------------
35
+
36
+Video outputs
37
+  --------------------------------------------------------------------
38
+  | ## | x | Video output name        | Connected video input    | s |
39
+  --------------------------------------------------------------------
40
+  |  1 | O | Enc1 1                   | Windows 3                |   |
41
+  |  2 | O | Enc1 2                   | Windows 2                |   |
42
+  |  3 | O | Enc1 3                   | Windows 1                |   |
43
+  |  4 | O | Enc1 4                   | Windows 1                |   |
44
+  |  5 |   | Output 5                 | Input 5                  | x |
45
+  |  6 |   | Output 6                 | Input 6                  | x |
46
+  |  7 |   | Output 7                 | Input 7                  | x |
47
+  |  8 |   | Output 8                 | Windows 4 HD             |   |
48
+  |  9 | O | Enc2 1                   | Windows 4 HD             | B |
49
+  | 10 |   | Output 10                | Input 10                 | B |
50
+  | 11 |   | Output 11                | Input 11                 | B |
51
+  | 12 | O | Denc                     | DPlay2                   | B |
52
+  | 13 | O | Output 13                | DPlay1                   | o |
53
+  | 14 |   | Output 14                | Input 14                 | o |
54
+  | 15 |   | Output 15                | Input 15                 | o |
55
+  | 16 | O | Loopback                 | Loopback                 | o |
56
+  --------------------------------------------------------------------
57
+

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

1
+ERROR: Unknown video input port number/name: 0
2
+ERROR: Unknown video input port number/name: 18
3
+ERROR: Unknown video input port number/name: Input 18
4
+ERROR: Unknown video output port number/name: 18
5
+ERROR: Unknown video output port number/name: Output 18
6
+ERROR: Unknown video output port number/name: 18
7
+ERROR: Unknown video output port number/name: Output 18
8
+ERROR: Unknown video output port number/name: 18
9
+ERROR: Unknown video output port number/name: Output 18
10
+ERROR: Unknown video output port number/name: 0
11
+ERROR: Unknown video output port number/name: 0
12
+ERROR: Unknown video output port number/name: 18
13
+ERROR: Unknown video output port number/name: 18
14
+ERROR: Unknown video input port number/name: 18
15
+ERROR: Unknown video output port number/name: 18
16
+ERROR: Unknown video output port number/name: Input 10
17
+ERROR: Unknown video output port number/name: Err Output
18
+ERROR: Unknown video input port number/name: Err Input

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

1
+Device info
2
+  -----------------------------------------------------------
3
+  | Device address             | sdi-matrix                 |
4
+  | Device port                | 9990                       |
5
+  | Model name                 | Blackmagic Micro Videohub  |
6
+  | Unique ID                  | 7c2e0d021714               |
7
+  | Protocol                   | 2.4                        |
8
+  | Video inputs               | 16                         |
9
+  | Video outputs              | 16                         |
10
+  -----------------------------------------------------------
11
+

+ 24
- 0
test/test-08.ok View File

1
+Video inputs
2
+  --------------------------------------------------------------------
3
+  | ## | Video input name         | n | Routed to output         | s |
4
+  --------------------------------------------------------------------
5
+  |  1 | Windows 1                | 2 | Enc1 3                   | B |
6
+  |    |                          |   | Enc1 4                   |   |
7
+  |  2 | Windows 2                | 1 | Enc1 2                   | B |
8
+  |  3 | Windows 3                | 1 | Enc1 1                   | B |
9
+  |  4 | Windows 4 HD             | 2 | Output 8                 | B |
10
+  |    |                          |   | Enc2 1                   |   |
11
+  |  5 | Input 5                  | 1 | Output 5                 | o |
12
+  |  6 | Input 6                  | 1 | Output 6                 | o |
13
+  |  7 | Input 7                  | 1 | Output 7                 | o |
14
+  |  8 | Input 8                  | 0 | -                        | o |
15
+  |  9 | Input 9                  | 0 | -                        |   |
16
+  | 10 | Input 10                 | 1 | Output 10                |   |
17
+  | 11 | Input 11                 | 1 | Output 11                |   |
18
+  | 12 | DPlay1                   | 1 | Output 13                |   |
19
+  | 13 | DPlay2                   | 1 | Denc                     |   |
20
+  | 14 | Input 14                 | 1 | Output 14                | x |
21
+  | 15 | Input 15                 | 1 | Output 15                | x |
22
+  | 16 | Loopback                 | 1 | Loopback                 |   |
23
+  --------------------------------------------------------------------
24
+

+ 22
- 0
test/test-09.ok View File

1
+Video outputs
2
+  --------------------------------------------------------------------
3
+  | ## | x | Video output name        | Connected video input    | s |
4
+  --------------------------------------------------------------------
5
+  |  1 | L | Enc1 1                   | Windows 3                |   |
6
+  |  2 | L | Enc1 2                   | Windows 2                |   |
7
+  |  3 | L | Enc1 3                   | Windows 1                |   |
8
+  |  4 | L | Enc1 4                   | Windows 1                |   |
9
+  |  5 |   | Output 5                 | Input 5                  | x |
10
+  |  6 |   | Output 6                 | Input 6                  | x |
11
+  |  7 |   | Output 7                 | Input 7                  | x |
12
+  |  8 |   | Output 8                 | Windows 4 HD             |   |
13
+  |  9 | L | Enc2 1                   | Windows 4 HD             | B |
14
+  | 10 |   | Output 10                | Input 10                 | B |
15
+  | 11 |   | Output 11                | Input 11                 | B |
16
+  | 12 | L | Denc                     | DPlay2                   | B |
17
+  | 13 | O | Output 13                | DPlay1                   | o |
18
+  | 14 |   | Output 14                | Input 14                 | o |
19
+  | 15 |   | Output 15                | Input 15                 | o |
20
+  | 16 | O | Loopback                 | Loopback                 | o |
21
+  --------------------------------------------------------------------
22
+

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

1
+ERROR: Device protocol is 3.3 but this program supports 2.x only.

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

1
+ERROR: The device supports 999 ports. Increase MAX_PORTS (288) and recompile the program.

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

1
+ERROR: Device reports that it is not present.

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

1
+ERROR: Device reports that it needs firmware update.

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

1
+WARNING: INPUT LABELS: invalid video input port 16 (valid 0..15)
2
+WARNING: OUTPUT LABELS: invalid video output port 17 (valid 0..15)
3
+WARNING: VIDEO OUTPUT LOCKS: invalid video output port 19 (valid 0..15)
4
+WARNING: VIDEO OUTPUT ROUTING: invalid video output port 66 (valid 0..15)
5
+WARNING: VIDEO OUTPUT ROUTING: invalid video input port 99 (valid 0..15)
6
+Device info
7
+  -----------------------------------------------------------
8
+  | Device address             | sdi-matrix                 |
9
+  | Device port                | 9990                       |
10
+  | Model name                 | Blackmagic Micro Videohub  |
11
+  | Unique ID                  | 7c2e0d021714               |
12
+  | Protocol                   | 2.4                        |
13
+  | Video inputs               | 16                         |
14
+  | Video outputs              | 16                         |
15
+  -----------------------------------------------------------
16
+
17
+Video inputs
18
+  --------------------------------------------------------------------
19
+  | ## | Video input name         | n | Routed to output         | s |
20
+  --------------------------------------------------------------------
21
+  |  1 | Windows 1                | 4 | Enc1 3                   |   |
22
+  |    |                          |   | Enc1 4                   |   |
23
+  |    |                          |   | Output 7                 |   |
24
+  |    |                          |   | Output 10                |   |
25
+  |  2 | Windows 2                | 1 | Enc1 2                   |   |
26
+  |  3 | Windows 3                | 1 | Enc1 1                   |   |
27
+  |  4 | Windows 4 HD             | 2 |                          |   |
28
+  |    |                          |   | Enc2 1                   |   |
29
+  |  5 | Input 5                  | 1 | Output 5                 |   |
30
+  |  6 | Input 6                  | 1 | Output 6                 |   |
31
+  |  7 |                          | 0 | -                        |   |
32
+  |  8 | Input 8                  | 0 | -                        |   |
33
+  |  9 | Input 9                  | 0 | -                        |   |
34
+  | 10 | Input 10                 | 0 | -                        |   |
35
+  | 11 | Input 11                 | 1 | Output 11                |   |
36
+  | 12 | DPlay1                   | 1 | Output 13                |   |
37
+  | 13 | DPlay2                   | 1 | Denc                     |   |
38
+  | 14 | Input 14                 | 1 | Output 14                |   |
39
+  | 15 | Input 15                 | 1 | Output 15                |   |
40
+  | 16 | Loopback                 | 1 | Loopback                 |   |
41
+  --------------------------------------------------------------------
42
+
43
+Video outputs
44
+  --------------------------------------------------------------------
45
+  | ## | x | Video output name        | Connected video input    | s |
46
+  --------------------------------------------------------------------
47
+  |  1 | L | Enc1 1                   | Windows 3                |   |
48
+  |  2 | L | Enc1 2                   | Windows 2                |   |
49
+  |  3 | L | Enc1 3                   | Windows 1                |   |
50
+  |  4 | L | Enc1 4                   | Windows 1                |   |
51
+  |  5 |   | Output 5                 | Input 5                  |   |
52
+  |  6 |   | Output 6                 | Input 6                  |   |
53
+  |  7 |   | Output 7                 | Windows 1                |   |
54
+  |  8 |   |                          | Windows 4 HD             |   |
55
+  |  9 | L | Enc2 1                   | Windows 4 HD             |   |
56
+  | 10 |   | Output 10                | Windows 1                |   |
57
+  | 11 |   | Output 11                | Input 11                 |   |
58
+  | 12 | L | Denc                     | DPlay2                   |   |
59
+  | 13 | O | Output 13                | DPlay1                   |   |
60
+  | 14 |   | Output 14                | Input 14                 |   |
61
+  | 15 |   | Output 15                | Input 15                 |   |
62
+  | 16 |   | Loopback                 | Loopback                 |   |
63
+  --------------------------------------------------------------------
64
+

Loading…
Cancel
Save