提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 分辨率枚举,供DH_DSP_ENCODECAP使用 |
|
7 |
* @date 2022/08/31 14:44:17 |
|
8 |
*/ |
|
9 |
public enum CAPTURE_SIZE { |
|
10 |
/** |
|
11 |
704*576(PAL) 704*480(NTSC),兼容WWxHH,下同 |
|
12 |
*/ |
|
13 |
CAPTURE_SIZE_D1(0,"704*576(PAL) 704*480(NTSC),兼容WWxHH,下同"), |
|
14 |
/** |
|
15 |
352*576(PAL) 352*480(NTSC) |
|
16 |
*/ |
|
17 |
CAPTURE_SIZE_HD1(1,"352*576(PAL) 352*480(NTSC)"), |
|
18 |
/** |
|
19 |
704*288(PAL) 704*240(NTSC) |
|
20 |
*/ |
|
21 |
CAPTURE_SIZE_BCIF(2,"704*288(PAL) 704*240(NTSC)"), |
|
22 |
/** |
|
23 |
352*288(PAL) 352*240(NTSC) |
|
24 |
*/ |
|
25 |
CAPTURE_SIZE_CIF(3,"352*288(PAL) 352*240(NTSC)"), |
|
26 |
/** |
|
27 |
176*144(PAL) 176*120(NTSC) |
|
28 |
*/ |
|
29 |
CAPTURE_SIZE_QCIF(4,"176*144(PAL) 176*120(NTSC)"), |
|
30 |
/** |
|
31 |
640*480 |
|
32 |
*/ |
|
33 |
CAPTURE_SIZE_VGA(5,"640*480"), |
|
34 |
/** |
|
35 |
320*240 |
|
36 |
*/ |
|
37 |
CAPTURE_SIZE_QVGA(6,"320*240"), |
|
38 |
/** |
|
39 |
480*480 |
|
40 |
*/ |
|
41 |
CAPTURE_SIZE_SVCD(7,"480*480"), |
|
42 |
/** |
|
43 |
160*128 |
|
44 |
*/ |
|
45 |
CAPTURE_SIZE_QQVGA(8,"160*128"), |
|
46 |
/** |
|
47 |
800*592 |
|
48 |
*/ |
|
49 |
CAPTURE_SIZE_SVGA(9,"800*592"), |
|
50 |
/** |
|
51 |
1024*768 |
|
52 |
*/ |
|
53 |
CAPTURE_SIZE_XVGA(10,"1024*768"), |
|
54 |
/** |
|
55 |
1280*800 |
|
56 |
*/ |
|
57 |
CAPTURE_SIZE_WXGA(11,"1280*800"), |
|
58 |
/** |
|
59 |
1280*1024 |
|
60 |
*/ |
|
61 |
CAPTURE_SIZE_SXGA(12,"1280*1024"), |
|
62 |
/** |
|
63 |
1600*1024 |
|
64 |
*/ |
|
65 |
CAPTURE_SIZE_WSXGA(13,"1600*1024"), |
|
66 |
/** |
|
67 |
1600*1200 |
|
68 |
*/ |
|
69 |
CAPTURE_SIZE_UXGA(14,"1600*1200"), |
|
70 |
/** |
|
71 |
1920*1200 |
|
72 |
*/ |
|
73 |
CAPTURE_SIZE_WUXGA(15,"1920*1200"), |
|
74 |
/** |
|
75 |
240*192,ND1 |
|
76 |
*/ |
|
77 |
CAPTURE_SIZE_LTF(16,"240*192,ND1"), |
|
78 |
/** |
|
79 |
1280*720 |
|
80 |
*/ |
|
81 |
CAPTURE_SIZE_720(17,"1280*720"), |
|
82 |
/** |
|
83 |
1920*1080 |
|
84 |
*/ |
|
85 |
CAPTURE_SIZE_1080(18,"1920*1080"), |
|
86 |
/** |
|
87 |
1280*960 |
|
88 |
*/ |
|
89 |
CAPTURE_SIZE_1_3M(19,"1280*960"), |
|
90 |
/** |
|
91 |
1872*1408,2_5M |
|
92 |
*/ |
|
93 |
CAPTURE_SIZE_2M(20,"1872*1408,2_5M"), |
|
94 |
/** |
|
95 |
3744*1408 |
|
96 |
*/ |
|
97 |
CAPTURE_SIZE_5M(21,"3744*1408"), |
|
98 |
/** |
|
99 |
2048*1536 |
|
100 |
*/ |
|
101 |
CAPTURE_SIZE_3M(22,"2048*1536"), |
|
102 |
/** |
|
103 |
2432*2050 |
|
104 |
*/ |
|
105 |
CAPTURE_SIZE_5_0M(23,"2432*2050"), |
|
106 |
/** |
|
107 |
1216*1024 |
|
108 |
*/ |
|
109 |
CPTRUTE_SIZE_1_2M(24,"1216*1024"), |
|
110 |
/** |
|
111 |
1408*1024 |
|
112 |
*/ |
|
113 |
CPTRUTE_SIZE_1408_1024(25,"1408*1024"), |
|
114 |
/** |
|
115 |
3296*2472 |
|
116 |
*/ |
|
117 |
CPTRUTE_SIZE_8M(26,"3296*2472"), |
|
118 |
/** |
|
119 |
2560*1920(5_1M) |
|
120 |
*/ |
|
121 |
CPTRUTE_SIZE_2560_1920(27,"2560*1920(5_1M)"), |
|
122 |
/** |
|
123 |
960*576(PAL) 960*480(NTSC) |
|
124 |
*/ |
|
125 |
CAPTURE_SIZE_960H(28,"960*576(PAL) 960*480(NTSC)"), |
|
126 |
/** |
|
127 |
960*720 |
|
128 |
*/ |
|
129 |
CAPTURE_SIZE_960_720(29,"960*720"), |
|
130 |
/** |
|
131 |
640*360 |
|
132 |
*/ |
|
133 |
CAPTURE_SIZE_NHD(30,"640*360"), |
|
134 |
/** |
|
135 |
320*180 |
|
136 |
*/ |
|
137 |
CAPTURE_SIZE_QNHD(31,"320*180"), |
|
138 |
/** |
|
139 |
160*90 |
|
140 |
*/ |
|
141 |
CAPTURE_SIZE_QQNHD(32,"160*90"), |
|
142 |
/** |
|
143 |
960*540 |
|
144 |
*/ |
|
145 |
CAPTURE_SIZE_960_540(33,"960*540"), |
|
146 |
/** |
|
147 |
640*352 |
|
148 |
*/ |
|
149 |
CAPTURE_SIZE_640_352(34,"640*352"), |
|
150 |
/** |
|
151 |
640*400 |
|
152 |
*/ |
|
153 |
CAPTURE_SIZE_640_400(35,"640*400"), |
|
154 |
/** |
|
155 |
320*192 |
|
156 |
*/ |
|
157 |
CAPTURE_SIZE_320_192(36,"320*192"), |
|
158 |
/** |
|
159 |
320*176 |
|
160 |
*/ |
|
161 |
CAPTURE_SIZE_320_176(37,"320*176"), |
|
162 |
/** |
|
163 |
800*600 |
|
164 |
*/ |
|
165 |
CAPTURE_SIZE_SVGA1(38,"800*600"), |
|
166 |
/** |
|
167 |
2560*1440 |
|
168 |
*/ |
|
169 |
CAPTURE_SIZE_2560_1440(39,"2560*1440"), |
|
170 |
/** |
|
171 |
2304*1296 |
|
172 |
*/ |
|
173 |
CAPTURE_SIZE_2304_1296(40,"2304*1296"), |
|
174 |
/** |
|
175 |
2592*1520 |
|
176 |
*/ |
|
177 |
CAPTURE_SIZE_2592_1520(41,"2592*1520"), |
|
178 |
/** |
|
179 |
4000*3000 |
|
180 |
*/ |
|
181 |
CAPTURE_SIZE_4000_3000(42,"4000*3000"), |
|
182 |
/** |
|
183 |
2880*2880 |
|
184 |
*/ |
|
185 |
CAPTURE_SIZE_2880_2880(43,"2880*2880"), |
|
186 |
/** |
|
187 |
2880*2160 |
|
188 |
*/ |
|
189 |
CAPTURE_SIZE_2880_2160(44,"2880*2160"), |
|
190 |
/** |
|
191 |
2688*1520 |
|
192 |
*/ |
|
193 |
CAPTURE_SIZE_2688_1520(45,"2688*1520"), |
|
194 |
/** |
|
195 |
2592*1944 |
|
196 |
*/ |
|
197 |
CAPTURE_SIZE_2592_1944(46,"2592*1944"), |
|
198 |
/** |
|
199 |
3072*1728 |
|
200 |
*/ |
|
201 |
CAPTURE_SIZE_3072_1728(47,"3072*1728"), |
|
202 |
/** |
|
203 |
3072*2048 |
|
204 |
*/ |
|
205 |
CAPTURE_SIZE_3072_2048(48,"3072*2048"), |
|
206 |
/** |
|
207 |
3840*2160 |
|
208 |
*/ |
|
209 |
CAPTURE_SIZE_3840_2160(49,"3840*2160"), |
|
210 |
/** |
|
211 |
|
|
212 |
*/ |
|
213 |
CAPTURE_SIZE_NR(25,""); |
|
214 |
|
|
215 |
private int value; |
|
216 |
|
|
217 |
private String note; |
|
218 |
|
|
219 |
public String getNote() { |
|
220 |
return note; |
|
221 |
} |
|
222 |
|
|
223 |
public int getValue() { |
|
224 |
return value; |
|
225 |
} |
|
226 |
|
|
227 |
CAPTURE_SIZE(int givenValue, String note) { |
|
228 |
this.value = givenValue; |
|
229 |
this.note = note; |
|
230 |
} |
|
231 |
|
|
232 |
public static String getNoteByValue(int givenValue) { |
|
233 |
for (CAPTURE_SIZE enumType : CAPTURE_SIZE.values()) { |
|
234 |
if (givenValue == enumType.getValue()) { |
|
235 |
return enumType.getNote(); |
|
236 |
} |
|
237 |
} |
|
238 |
return null; |
|
239 |
} |
|
240 |
|
|
241 |
public static int getValueByNote(String givenNote) { |
|
242 |
for (CAPTURE_SIZE enumType : CAPTURE_SIZE.values()) { |
|
243 |
if (givenNote.equals(enumType.getNote())) { |
|
244 |
return enumType.getValue(); |
|
245 |
} |
|
246 |
} |
|
247 |
return -1; |
|
248 |
} |
|
249 |
|
|
250 |
public static CAPTURE_SIZE getEnum(int value) { |
|
251 |
for (CAPTURE_SIZE e : CAPTURE_SIZE.values()) { |
|
252 |
if (e.getValue() == value) |
|
253 |
return e; |
|
254 |
} |
|
255 |
return CAPTURE_SIZE.CAPTURE_SIZE_D1; |
|
256 |
} |
|
257 |
|
|
258 |
} |