forked from asticode/go-astiav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice_test.go
62 lines (56 loc) · 948 Bytes
/
device_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package astiav
import (
"fmt"
"testing"
)
func TestDevice(t *testing.T) {
RegisterAllDevices()
}
func TestInputAudioDeviceNext(t *testing.T) {
RegisterAllDevices()
var d *InputFormat
for {
d = InputAudioDeviceNext(d)
if d != nil {
fmt.Println(d.Name(), d.LongName())
} else {
break
}
}
}
func TestOutputAudioDeviceNext(t *testing.T) {
RegisterAllDevices()
var d *OutputFormat
for {
d = OutputAudioDeviceNext(d)
if d != nil {
fmt.Println(d.Name(), d.LongName())
} else {
break
}
}
}
func TestInputVideoDeviceNext(t *testing.T) {
RegisterAllDevices()
var d *InputFormat
for {
d = InputVideoDeviceNext(d)
if d != nil {
fmt.Println(d.Name(), d.LongName())
} else {
break
}
}
}
func TestOutputVideoDeviceNext(t *testing.T) {
RegisterAllDevices()
var d *OutputFormat
for {
d = OutputVideoDeviceNext(d)
if d != nil {
fmt.Println(d.Name(), d.LongName())
} else {
break
}
}
}