xref: /OK3568_Linux_fs/external/rockit/tgi/sdk/include/RTAIDetectResults.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright 2020 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef SRC_RT_MEDIA_AV_FILER_INCLUDE_RTAIDECTRESULTS_H_
18 #define SRC_RT_MEDIA_AV_FILER_INCLUDE_RTAIDECTRESULTS_H_
19 
20 #include "rt_type.h"
21 #include "RTMediaBuffer.h"
22 
23 #if defined(__cplusplus)
24 extern "C" {
25 #endif
26 
27 #define RT_AI_MAX_LEN 16
28 
29 typedef enum _RTAIDetectType {
30     RT_AI_DETECT_FACE,
31     RT_AI_DETECT_FACELANDMARK,
32     RT_AI_DETECT_BODY,
33     RT_AI_DETECT_HAND,
34     RT_AI_DETECT_FINGER,
35     // add more
36 } RTAIDetectType;
37 
38 #define VENDOR_RK_ROCKX   "rockx"
39 #define VENDOR_SENSETIME  "st_asteria"
40 
41 typedef struct _RTAIDetectResults {
42     /*
43      * the name of vendor
44      */
45     char vendor[RT_AI_MAX_LEN];
46 
47     /*
48      * the version of vendor's ai lib
49      */
50     char version[RT_AI_MAX_LEN];
51 
52     /*
53      * describe of private data
54      */
55     char describe[RT_AI_MAX_LEN];
56 
57     /*
58      * the sizeof of private data
59      */
60     INT32 privSize;
61 
62     /*
63      * the point of private data
64      */
65     void *privData;
66 } RTAIDetectResults;
67 
68 /*
69  * create an ai detect struct
70  */
71 RTAIDetectResults* createAIDetectResults();
72 
73 /*
74  * destory an ai detect struct
75  * the user must release the privData by themself
76  */
77 void  destroyAIDetectResults(RTAIDetectResults* result);
78 
79 void* getAIDetectResults(RTMediaBuffer* buffer);
80 
81 #ifdef __cplusplus
82 }  // extern "C"
83 #endif
84 
85 #endif  // SRC_RT_MEDIA_AV_FILER_INCLUDE_RTAIDECTRESULTS_H_
86 
87