forked from deepch/go-onvif
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
122 lines (108 loc) · 2.73 KB
/
model.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package onvif
// Device contains data of ONVIF camera
type Device struct {
ID string
Name string
XAddr string
User string
Password string
}
// DeviceInformation contains information of ONVIF camera
type DeviceInformation struct {
FirmwareVersion string
HardwareID string
Manufacturer string
Model string
SerialNumber string
}
// DeviceServices contains services of ONVIF camera
type DeviceServices struct {
Devices_service string
Media string
Events string
PTZ string
Imageing string
DeviceIO string
Analytics string
Recording string
SearchRecording string
Replay string
}
// NetworkCapabilities contains networking capabilities of ONVIF camera
type NetworkCapabilities struct {
DynDNS bool
IPFilter bool
IPVersion6 bool
ZeroConfig bool
}
// DeviceCapabilities contains capabilities of an ONVIF camera
type DeviceCapabilities struct {
Network NetworkCapabilities
Events map[string]bool
Streaming map[string]bool
}
// HostnameInformation contains hostname info of an ONVIF camera
type HostnameInformation struct {
Name string
FromDHCP bool
}
// MediaBounds contains resolution of a video media
type MediaBounds struct {
Height int
Width int
}
// MediaSourceConfig contains configuration of a media source
type MediaSourceConfig struct {
Name string
Token string
SourceToken string
Bounds MediaBounds
}
// VideoRateControl contains rate control of a video
type VideoRateControl struct {
BitrateLimit int
EncodingInterval int
FrameRateLimit int
}
// VideoEncoderConfig contains configuration of a video encoder
type VideoEncoderConfig struct {
Name string
Token string
Encoding string
Quality int
RateControl VideoRateControl
Resolution MediaBounds
SessionTimeout string
}
// AudioEncoderConfig contains configuration of an audio encoder
type AudioEncoderConfig struct {
Name string
Token string
Encoding string
Bitrate int
SampleRate int
SessionTimeout string
}
// PTZConfig contains configuration of a PTZ control in camera
type PTZConfig struct {
Name string
Token string
NodeToken string
}
// MediaProfile contains media profile of an ONVIF camera
type MediaProfile struct {
Name string
Token string
VideoSourceConfig MediaSourceConfig
VideoEncoderConfig VideoEncoderConfig
AudioSourceConfig MediaSourceConfig
AudioEncoderConfig AudioEncoderConfig
PTZConfig PTZConfig
}
// MediaURI contains streaming URI of an ONVIF camera
type MediaURI struct {
URI string
Timeout string
InvalidAfterConnect bool
InvalidAfterReboot bool
}