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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
| // Copyright 2019 Fuzhou Rockchip Electronics Co., Ltd. All rights reserved.
| // Use of this source code is governed by a BSD-style license that can be
| // found in the LICENSE file.
|
| #ifndef EASYMEDIA_CONTROL_H_
| #define EASYMEDIA_CONTROL_H_
|
| #include <stdint.h>
|
| #include "image.h"
| #include "rknn_user.h"
|
| namespace easymedia
| {
|
| typedef struct {
| const char* name;
| uint64_t value;
| } DRMPropertyArg;
|
| typedef struct {
| unsigned long int sub_request;
| int size;
| void* arg;
| } SubRequest;
|
| typedef struct {
| bool enable;
| } NNinputArg;
|
| typedef struct {
| bool enable;
| } FaceDetectArg;
|
| typedef struct {
| bool enable;
| } FaceCaptureArg;
|
| typedef struct {
| bool enable;
| } DrawFilterArg;
|
| typedef struct {
| bool enable;
| int interval;
| int duration; /* second */
| float percentage; /* 0-100 */
| ImageRect rect;
| } BodyDetectArg;
|
| typedef enum
| {
| USER_ADD_CAM = 0,
| USER_ADD_PIC,
| USER_REG_PIC,
| USER_DEL,
| USER_CLR,
| USER_ENABLE,
| } FaceRegArgType;
|
| typedef struct {
| FaceRegArgType type;
| int user_id; /* it is used to delete user */
| char pic_path[RKNN_PICTURE_PATH_LEN];
| bool enable;
| } FaceRegArg;
|
| typedef struct {
| bool enable;
| int interval;
| } RockxFilterArg;
|
| enum
| {
| S_FIRST_CONTROL = 10000,
| S_SUB_REQUEST, // many devices have their kernel controls
|
| // DRM Display controls
| // ImageRect
| S_SOURCE_RECT = 10100,
| S_DESTINATION_RECT,
| S_SRC_DST_RECT,
| // ImageInfo
| G_PLANE_IMAGE_INFO,
| // int
| G_PLANE_SUPPORT_SCALE,
| // DRMPropertyArg
| S_CRTC_PROPERTY,
| S_CONNECTOR_PROPERTY,
|
| // V4L2 controls
| // any type
| S_STREAM_OFF = 10200,
|
| // ALSA controls
| // int
| S_ALSA_VOLUME = 10300,
| G_ALSA_VOLUME,
| S_VQE_ENABLE,
| S_VQE_ATTR,
| G_VQE_ATTR,
|
| // Through Guard controls
| // int
| S_ALLOW_THROUGH_COUNT = 10400,
|
| // ANR controls
| // int
| S_ANR_ON = 10500,
| G_ANR_ON,
|
| // RKNN controls
| // any type
| S_NN_CALLBACK = 10600,
| G_NN_CALLBACK,
| S_NN_HANDLER,
| G_NN_HANDLER,
| S_NN_DRAW_HANDLER,
| G_NN_DRAW_HANDLER,
| S_NN_INFO,
| G_NN_INFO,
|
| // Move Detection
| S_MD_ROI_ENABLE = 10700,
| G_MD_ROI_ENABLE,
| S_MD_ROI_RECTS,
| G_MD_ROI_RECTS,
| S_MD_SENSITIVITY,
| G_MD_SENSITIVITY,
|
| // MUXER controls
| S_START_SRTEAM = 10800,
| S_STOP_SRTEAM,
| G_MUXER_GET_STATUS,
| S_MUXER_FILE_DURATION,
| S_MUXER_FILE_PATH,
| S_MUXER_FILE_PREFIX,
|
| // Occlusion Detection
| S_OD_ROI_ENABLE = 10900,
| G_OD_ROI_ENABLE,
| S_OD_ROI_RECTS,
| G_OD_ROI_RECTS,
| S_OD_SENSITIVITY,
| G_OD_SENSITIVITY,
| };
|
| } // namespace easymedia
|
| #endif // #ifndef EASYMEDIA_CONTROL_H_
|
|