Blame view

src/ai_platform/stl_aiplatform.h 4.21 KB
09c2d08c   Hu Chunming   arm交付版
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
  /*******************************************************************************************
  * Version: tsl_aipaltform_v0.0.0
  * CopyRight:中科视语(北京)科技有限公司
  * UpdateDate: 20210918
  * Content: 特斯联-AI视频智能SAAS平台
  ********************************************************************************************/
  
  #ifndef TSL_AIPLATFORM_H_
  #define TSL_AIPLATFORM_H_
  #ifdef _MSC_VER
  #ifdef TSL_AIPLATFORM_EXPORTS
  #define TSL_AIPLATFORM_API __declspec(dllexport)
  #else
  #define TSL_AIPLATFORM_API __declspec(dllimport)
  #endif
  #else
  #define TSL_AIPLATFORM_API   __attribute__ ((visibility ("default")))
  #endif
  #include "header.h"
  
  
  extern "C"
  {
  	/*************************************************************************
  	* FUNCTION: tsl_aiplatform_init
  	* PURPOSE: 初始化
  	* PARAM:
  	[out] handle		           - 句柄
  	[in] param                     - 初始化参数
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int tsl_aiplatform_init(void **handle, tsl_aiplatform_param param);
  
  #ifdef POST_USE_RABBITMQ
  	/**
  	 * @brief add new rabbitmq connection
  	 *
  	 * @param handle
  	 * @param tstatus
  	 * @param mq_conn_param
  	 * @return TSL_AIPLATFORM_API
  	 */
  	TSL_AIPLATFORM_API int add_mq_conn(void *handle, mq_type_t tstatus, rabbitmq_conn_params_t mq_conn_param);
  
  
  
  	TSL_AIPLATFORM_API int get_task_status(void *handle, char *task_id);
  
  #endif
  
  	/*************************************************************************
  	* FUNCTION: add_task
  	* PURPOSE: 添加任务
  	* PARAM:
  	[in] handle		             - 句柄
  	[in] param                   - 添加任务初始化参数
  	* RETURN: 成功/失败
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int add_task(void *handle, task_param param);
  
  
  	/*************************************************************************
  	* FUNCTION: pause_task
  	* PURPOSE: 暂停任务
  	* PARAM:
  	[in] handle		      - 句柄
  	[in] task_id          - 暂停任务ID
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int pause_task(void *handle, char * task_id, const int max_timeout_ms);
  
  
  	/*************************************************************************
  	* FUNCTION: restart_task
  	* PURPOSE: 重启任务
  	* PARAM:
  	[in] handle		      - 句柄
  	[in] task_id          - 重启任务ID
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int restart_task(void *handle, char * task_id, const int max_timeout_ms);
  
  
  	/*************************************************************************
  	* FUNCTION: finish_task
  	* PURPOSE: 结束任务
  	* PARAM:
  	[in] handle		      - 句柄
  	[in] task_id          - 结束任务ID
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int finish_task(void *handle, char * task_id, const int max_timeout_ms);
  
  	
  	/*************************************************************************
  	* FUNCTION: screenshot_task --added by zsh 220801
  	* PURPOSE: 视频截图-截取视频首帧
  	* PARAM:
  	[in] handle		             - 句柄
  	[in] param                   - 添加任务初始化参数
  	* RETURN: 成功/失败
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int screenshot_task(void *handle, task_param param);
  
  
  	/*************************************************************************
  	* FUNCTION: tsl_aiplatform_release
  	* PURPOSE: 资源释放
  	* PARAM:
  	[in] handle		    - 处理句柄
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int tsl_aiplatform_release(void **handle);
  
  
294ef5bc   Hu Chunming   修复解码器内因线程退出顺序错误导致...
123
124
125
126
127
  	TSL_AIPLATFORM_API int count_running_task(void *handle);
  
  	TSL_AIPLATFORM_API void close_all_task(void *handle);
  
  
09c2d08c   Hu Chunming   arm交付版
128
129
130
131
132
133
134
135
136
137
  	/*************************************************************************
  	* FUNCTION: get_tsl_aiplatform_version
  	* PURPOSE: 获取SDK版本号
  	* PARAM:
  	* RETURN: sdk版本号
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API const char* get_tsl_aiplatform_version();
  }
  #endif