Blame view

src/ai_platform/stl_aiplatform.h 3.96 KB
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  /*******************************************************************************************
  * 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
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
19
  
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  #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);
  
  	
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
37
  	TSL_AIPLATFORM_API int get_task_status(void *handle, string task_id);
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  
  	/*************************************************************************
  	* 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:
  	*************************************************************************/
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
60
  	TSL_AIPLATFORM_API int pause_task(void *handle, string task_id, const int max_timeout_ms);
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
61
62
63
64
65
66
67
68
69
70
71
  
  
  	/*************************************************************************
  	* FUNCTION: restart_task
  	* PURPOSE: 重启任务
  	* PARAM:
  	[in] handle		      - 句柄
  	[in] task_id          - 重启任务ID
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
72
  	TSL_AIPLATFORM_API int restart_task(void *handle, string task_id, const int max_timeout_ms);
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
73
74
75
76
77
78
79
80
81
82
83
  
  
  	/*************************************************************************
  	* FUNCTION: finish_task
  	* PURPOSE: 结束任务
  	* PARAM:
  	[in] handle		      - 句柄
  	[in] task_id          - 结束任务ID
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
84
  	TSL_AIPLATFORM_API int finish_task(void *handle, string task_id, const int max_timeout_ms);
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
85
86
87
88
89
90
91
92
93
94
95
  
  	
  	/*************************************************************************
  	* FUNCTION: screenshot_task --added by zsh 220801
  	* PURPOSE: 视频截图-截取视频首帧
  	* PARAM:
  	[in] handle		             - 句柄
  	[in] param                   - 添加任务初始化参数
  	* RETURN: 成功/失败
  	* NOTES:
  	*************************************************************************/
9e3f3176   Hu Chunming   修复关闭任务崩溃的问题
96
  	TSL_AIPLATFORM_API int screenshot_task(void *handle, task_param param, string result_folder);
6fdcb6a5   Hu Chunming   初次提交,代码大体完成编写,完善中
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
  
  
  	/*************************************************************************
  	* FUNCTION: tsl_aiplatform_release
  	* PURPOSE: 资源释放
  	* PARAM:
  	[in] handle		    - 处理句柄
  	* RETURN:
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API int tsl_aiplatform_release(void **handle);
  
  
  	TSL_AIPLATFORM_API int count_running_task(void *handle);
  
  	TSL_AIPLATFORM_API void close_all_task(void *handle);
  
  
  	/*************************************************************************
  	* FUNCTION: get_tsl_aiplatform_version
  	* PURPOSE: 获取SDK版本号
  	* PARAM:
  	* RETURN: sdk版本号
  	* NOTES:
  	*************************************************************************/
  	TSL_AIPLATFORM_API const char* get_tsl_aiplatform_version();
  }
  #endif