提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.demo.module; |
H |
2 |
|
|
3 |
import com.iailab.netsdk.lib.NetSDKLib; |
|
4 |
|
|
5 |
/** |
|
6 |
* 云台控制接口实现 |
|
7 |
* 主要有 :八个方向控制、变倍、变焦、光圈功能 |
|
8 |
*/ |
|
9 |
public class PtzControlModule { |
|
10 |
|
|
11 |
/** |
|
12 |
* 向上 |
|
13 |
*/ |
|
14 |
public static boolean ptzControlUpStart(int nChannelID, int lParam1, int lParam2) { |
|
15 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
16 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_UP_CONTROL, |
|
17 |
lParam1, lParam2, 0, 0); |
|
18 |
} |
|
19 |
public static boolean ptzControlUpEnd(int nChannelID) { |
|
20 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
21 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_UP_CONTROL, |
|
22 |
0, 0, 0, 1); |
|
23 |
} |
|
24 |
|
|
25 |
/** |
|
26 |
* 向下 |
|
27 |
*/ |
|
28 |
public static boolean ptzControlDownStart(int nChannelID, int lParam1, int lParam2) { |
|
29 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
30 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_DOWN_CONTROL, |
|
31 |
lParam1, lParam2, 0, 0); |
|
32 |
} |
|
33 |
public static boolean ptzControlDownEnd(int nChannelID) { |
|
34 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
35 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_DOWN_CONTROL, |
|
36 |
0, 0, 0, 1); |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* 向左 |
|
41 |
*/ |
|
42 |
public static boolean ptzControlLeftStart(int nChannelID, int lParam1, int lParam2) { |
|
43 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
44 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_LEFT_CONTROL, |
|
45 |
lParam1, lParam2, 0, 0); |
|
46 |
} |
|
47 |
public static boolean ptzControlLeftEnd(int nChannelID) { |
|
48 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
49 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_LEFT_CONTROL, |
|
50 |
0, 0, 0, 1); |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
54 |
* 向右 |
|
55 |
*/ |
|
56 |
public static boolean ptzControlRightStart(int nChannelID, int lParam1,int lParam2) { |
|
57 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
58 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_RIGHT_CONTROL, |
|
59 |
lParam1, lParam2, 0, 0); |
|
60 |
} |
|
61 |
public static boolean ptzControlRightEnd(int nChannelID) { |
|
62 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
63 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_RIGHT_CONTROL, |
|
64 |
0, 0, 0, 1); |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* 向左上 |
|
69 |
*/ |
|
70 |
public static boolean ptzControlLeftUpStart(int nChannelID, int lParam1, int lParam2) { |
|
71 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
72 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_LEFTTOP, |
|
73 |
lParam1, lParam2, 0, 0); |
|
74 |
} |
|
75 |
public static boolean ptzControlLeftUpEnd(int nChannelID) { |
|
76 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
77 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_LEFTTOP, |
|
78 |
0, 0, 0, 1); |
|
79 |
} |
|
80 |
|
|
81 |
/** |
|
82 |
* 向右上 |
|
83 |
*/ |
|
84 |
public static boolean ptzControlRightUpStart(int nChannelID, int lParam1, int lParam2) { |
|
85 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
86 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_RIGHTTOP, |
|
87 |
lParam1, lParam2, 0, 0); |
|
88 |
} |
|
89 |
public static boolean ptzControlRightUpEnd(int nChannelID) { |
|
90 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
91 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_RIGHTTOP, |
|
92 |
0, 0, 0, 1); |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* 向左下 |
|
97 |
*/ |
|
98 |
public static boolean ptzControlLeftDownStart(int nChannelID, int lParam1, int lParam2) { |
|
99 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
100 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_LEFTDOWN, |
|
101 |
lParam1, lParam2, 0, 0); |
|
102 |
} |
|
103 |
public static boolean ptzControlLeftDownEnd(int nChannelID) { |
|
104 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
105 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_LEFTDOWN, |
|
106 |
0, 0, 0, 1); |
|
107 |
} |
|
108 |
|
|
109 |
/** |
|
110 |
* 向右下 |
|
111 |
*/ |
|
112 |
public static boolean ptzControlRightDownStart(int nChannelID, int lParam1, int lParam2) { |
|
113 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
114 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_RIGHTDOWN, |
|
115 |
lParam1, lParam2, 0, 0); |
|
116 |
} |
|
117 |
public static boolean ptzControlRightDownEnd(int nChannelID) { |
|
118 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
119 |
NetSDKLib.NET_EXTPTZ_ControlType.NET_EXTPTZ_RIGHTDOWN, |
|
120 |
0, 0, 0, 1); |
|
121 |
} |
|
122 |
|
|
123 |
/** |
|
124 |
* 变倍+ |
|
125 |
*/ |
|
126 |
public static boolean ptzControlZoomAddStart(int nChannelID, int lParam2) { |
|
127 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
128 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_ZOOM_ADD_CONTROL, |
|
129 |
0, lParam2, 0, 0); |
|
130 |
} |
|
131 |
public static boolean ptzControlZoomAddEnd(int nChannelID) { |
|
132 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
133 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_ZOOM_ADD_CONTROL, |
|
134 |
0, 0, 0, 1); |
|
135 |
} |
|
136 |
|
|
137 |
/** |
|
138 |
* 变倍- |
|
139 |
*/ |
|
140 |
public static boolean ptzControlZoomDecStart(int nChannelID, int lParam2) { |
|
141 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
142 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_ZOOM_DEC_CONTROL, |
|
143 |
0, lParam2, 0, 0); |
|
144 |
} |
|
145 |
public static boolean ptzControlZoomDecEnd(int nChannelID) { |
|
146 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
147 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_ZOOM_DEC_CONTROL, |
|
148 |
0, 0, 0, 1); |
|
149 |
} |
|
150 |
|
|
151 |
/** |
|
152 |
* 变焦+ |
|
153 |
*/ |
|
154 |
public static boolean ptzControlFocusAddStart(int nChannelID, int lParam2) { |
|
155 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
156 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_FOCUS_ADD_CONTROL, |
|
157 |
0, lParam2, 0, 0); |
|
158 |
} |
|
159 |
public static boolean ptzControlFocusAddEnd(int nChannelID) { |
|
160 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
161 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_FOCUS_ADD_CONTROL, |
|
162 |
0, 0, 0, 1); |
|
163 |
} |
|
164 |
|
|
165 |
/** |
|
166 |
* 变焦- |
|
167 |
*/ |
|
168 |
public static boolean ptzControlFocusDecStart(int nChannelID, int lParam2) { |
|
169 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
170 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_FOCUS_DEC_CONTROL, |
|
171 |
0, lParam2, 0, 0); |
|
172 |
} |
|
173 |
public static boolean ptzControlFocusDecEnd(int nChannelID) { |
|
174 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
175 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_FOCUS_DEC_CONTROL, |
|
176 |
0, 0, 0, 1); |
|
177 |
} |
|
178 |
|
|
179 |
/** |
|
180 |
* 光圈+ |
|
181 |
*/ |
|
182 |
public static boolean ptzControlIrisAddStart(int nChannelID, int lParam2) { |
|
183 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
184 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_APERTURE_ADD_CONTROL, |
|
185 |
0, lParam2, 0, 0); |
|
186 |
} |
|
187 |
public static boolean ptzControlIrisAddEnd(int nChannelID) { |
|
188 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
189 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_APERTURE_ADD_CONTROL, |
|
190 |
0, 0, 0, 1); |
|
191 |
} |
|
192 |
|
|
193 |
/** |
|
194 |
* 光圈- |
|
195 |
*/ |
|
196 |
public static boolean ptzControlIrisDecStart(int nChannelID, int lParam2) { |
|
197 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
198 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_APERTURE_DEC_CONTROL, |
|
199 |
0, lParam2, 0, 0); |
|
200 |
} |
|
201 |
public static boolean ptzControlIrisDecEnd(int nChannelID) { |
|
202 |
return LoginModule.netsdk.CLIENT_DHPTZControlEx(LoginModule.m_hLoginHandle, nChannelID, |
|
203 |
NetSDKLib.NET_PTZ_ControlType.NET_PTZ_APERTURE_DEC_CONTROL, |
|
204 |
0, 0, 0, 1); |
|
205 |
} |
|
206 |
} |