-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevice.go
60 lines (48 loc) · 1.6 KB
/
device.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
package avcontrol
import "context"
type (
// Device is the base device interface
Device interface{}
DeviceWithPower interface {
Power(context.Context) (bool, error)
SetPower(context.Context, bool) error
}
DeviceWithAudioInput interface {
AudioInputs(ctx context.Context) (map[string]string, error)
SetAudioInput(ctx context.Context, output, input string) error
}
DeviceWithVideoInput interface {
VideoInputs(ctx context.Context) (map[string]string, error)
SetVideoInput(ctx context.Context, output, input string) error
}
DeviceWithAudioVideoInput interface {
AudioVideoInputs(ctx context.Context) (map[string]string, error)
SetAudioVideoInput(ctx context.Context, output, input string) error
}
DeviceWithBlank interface {
Blank(context.Context) (bool, error)
SetBlank(context.Context, bool) error
}
DeviceWithVolume interface {
Volumes(ctx context.Context, blocks []string) (map[string]int, error)
SetVolume(context.Context, string, int) error
}
DeviceWithMute interface {
Mutes(ctx context.Context, blocks []string) (map[string]bool, error)
SetMute(context.Context, string, bool) error
}
DeviceWithHealth interface {
// Healthy returns a nil error if the device is healthy.
Healthy(context.Context) error
}
DeviceWithInfo interface {
// Info returns a struct of info about the device.
Info(context.Context) (interface{}, error)
}
/* TODO gotta figure out what we want from active signal - video, audio...?
DeviceWithActiveSignal interface {
// ActiveVideoSignal returns true if the current
ActiveVideoSignal(context.Context) (map[string]bool, error)
}
*/
)