/******************************************************************************************* * 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); /************************************************************************* * FUNCTION: get_tsl_aiplatform_version * PURPOSE: 获取SDK版本号 * PARAM: * RETURN: sdk版本号 * NOTES: *************************************************************************/ TSL_AIPLATFORM_API const char* get_tsl_aiplatform_version(); } #endif