提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author 291189 |
|
6 |
* @description 屏保状态 |
|
7 |
* @date 2022/03/29 13:59:54 |
|
8 |
*/ |
|
9 |
public enum EM_VIDEO_ABNORMAL_DETECT_TYPE { |
|
10 |
/** |
|
11 |
未知状态 |
|
12 |
*/ |
|
13 |
EM_VIDEO_ABNORMAL_DETECT_UNKNOWN(0,"未知状态"), |
|
14 |
/** |
|
15 |
视频丢失 |
|
16 |
*/ |
|
17 |
EM_VIDEO_ABNORMAL_DETECT_LOSS(1,"视频丢失"), |
|
18 |
/** |
|
19 |
视频遮挡 |
|
20 |
*/ |
|
21 |
EM_VIDEO_ABNORMAL_DETECT_COVER(2,"视频遮挡"), |
|
22 |
/** |
|
23 |
画面冻结 |
|
24 |
*/ |
|
25 |
EM_VIDEO_ABNORMAL_DETECT_FROZEN(3,"画面冻结"), |
|
26 |
/** |
|
27 |
过亮 |
|
28 |
*/ |
|
29 |
EM_VIDEO_ABNORMAL_DETECT_LIGHT(4,"过亮"), |
|
30 |
/** |
|
31 |
过暗 |
|
32 |
*/ |
|
33 |
EM_VIDEO_ABNORMAL_DETECT_DARK(5,"过暗"), |
|
34 |
/** |
|
35 |
场景变化 |
|
36 |
*/ |
|
37 |
EM_VIDEO_ABNORMAL_DETECT_SCENECHANGE(6,"场景变化"), |
|
38 |
/** |
|
39 |
条纹检测 |
|
40 |
*/ |
|
41 |
EM_VIDEO_ABNORMAL_DETECT_STRIATION(7,"条纹检测"), |
|
42 |
/** |
|
43 |
噪声检测 |
|
44 |
*/ |
|
45 |
EM_VIDEO_ABNORMAL_DETECT_NOISE(8,"噪声检测"), |
|
46 |
/** |
|
47 |
偏色检测 |
|
48 |
*/ |
|
49 |
EM_VIDEO_ABNORMAL_DETECT_UNBALANCE(9,"偏色检测"), |
|
50 |
/** |
|
51 |
视频模糊检测 |
|
52 |
*/ |
|
53 |
EM_VIDEO_ABNORMAL_DETECT_BLUR(10,"视频模糊检测"), |
|
54 |
/** |
|
55 |
对比度异常检测 |
|
56 |
*/ |
|
57 |
EM_VIDEO_ABNORMAL_DETECT_CONTRAST(11,"对比度异常检测"), |
|
58 |
/** |
|
59 |
视频运动 |
|
60 |
*/ |
|
61 |
EM_VIDEO_ABNORMAL_DETECT_MOTION(12,"视频运动"), |
|
62 |
/** |
|
63 |
视频闪烁 |
|
64 |
*/ |
|
65 |
EM_VIDEO_ABNORMAL_DETECT_FILCKERING(13,"视频闪烁"), |
|
66 |
/** |
|
67 |
视频颜色-13 |
|
68 |
*/ |
|
69 |
EM_VIDEO_ABNORMAL_DETECT_COLOR(14,"视频颜色-13"), |
|
70 |
/** |
|
71 |
虚焦检测 |
|
72 |
*/ |
|
73 |
EM_VIDEO_ABNORMAL_DETECT_UNFOCUS(15,"虚焦检测"), |
|
74 |
/** |
|
75 |
过曝检测 |
|
76 |
*/ |
|
77 |
EM_VIDEO_ABNORMAL_DETECT_OVEREXPOSURE(16,"过曝检测"), |
|
78 |
/** |
|
79 |
场景剧变 |
|
80 |
*/ |
|
81 |
EM_VIDEO_ABNORMAL_DETECT_DRAMATICCHANGE(17,"场景剧变"), |
|
82 |
/** |
|
83 |
黑白图像 |
|
84 |
*/ |
|
85 |
EM_VIDEO_ABNORMAL_DETECT_BLACKWHITE(18,"黑白图像"), |
|
86 |
/** |
|
87 |
雪花噪声 |
|
88 |
*/ |
|
89 |
EM_VIDEO_ABNORMAL_DETECT_SNOWNOISE(19,"雪花噪声"); |
|
90 |
|
|
91 |
private int value; |
|
92 |
|
|
93 |
private String note; |
|
94 |
|
|
95 |
public String getNote() { |
|
96 |
return note; |
|
97 |
} |
|
98 |
|
|
99 |
public int getValue() { |
|
100 |
return value; |
|
101 |
} |
|
102 |
|
|
103 |
EM_VIDEO_ABNORMAL_DETECT_TYPE(int givenValue, String note) { |
|
104 |
this.value = givenValue; |
|
105 |
this.note = note; |
|
106 |
} |
|
107 |
|
|
108 |
public static String getNoteByValue(int givenValue) { |
|
109 |
for (EM_VIDEO_ABNORMAL_DETECT_TYPE enumType : EM_VIDEO_ABNORMAL_DETECT_TYPE.values()) { |
|
110 |
if (givenValue == enumType.getValue()) { |
|
111 |
return enumType.getNote(); |
|
112 |
} |
|
113 |
} |
|
114 |
return null; |
|
115 |
} |
|
116 |
|
|
117 |
public static int getValueByNote(String givenNote) { |
|
118 |
for (EM_VIDEO_ABNORMAL_DETECT_TYPE enumType : EM_VIDEO_ABNORMAL_DETECT_TYPE.values()) { |
|
119 |
if (givenNote.equals(enumType.getNote())) { |
|
120 |
return enumType.getValue(); |
|
121 |
} |
|
122 |
} |
|
123 |
return -1; |
|
124 |
} |
|
125 |
|
|
126 |
public static EM_VIDEO_ABNORMAL_DETECT_TYPE getEnum(int value) { |
|
127 |
for (EM_VIDEO_ABNORMAL_DETECT_TYPE e : EM_VIDEO_ABNORMAL_DETECT_TYPE.values()) { |
|
128 |
if (e.getValue() == value) |
|
129 |
return e; |
|
130 |
} |
|
131 |
return EM_VIDEO_ABNORMAL_DETECT_TYPE.EM_VIDEO_ABNORMAL_DETECT_UNKNOWN; |
|
132 |
} |
|
133 |
|
|
134 |
} |