mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-07 00:20:43 +08:00
添加视频压缩代码
This commit is contained in:
37
others/C/video_compression/include/error.h
Normal file
37
others/C/video_compression/include/error.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef ERROR_H
|
||||
#define ERROR_H
|
||||
|
||||
typedef enum {
|
||||
ERR_NONE = 0,
|
||||
ERR_FILE_NOT_FOUND,
|
||||
ERR_INVALID_ARGUMENT,
|
||||
ERR_MEMORY_ALLOC,
|
||||
ERR_FFMPEG,
|
||||
ERR_UNKNOWN
|
||||
} ErrorCode;
|
||||
|
||||
/**
|
||||
* 设置当前错误代码
|
||||
* @param code 错误代码
|
||||
* @param message 错误信息(可选)
|
||||
*/
|
||||
void error_set(ErrorCode code, const char* message);
|
||||
|
||||
/**
|
||||
* 获取当前错误代码
|
||||
* @return 错误代码
|
||||
*/
|
||||
ErrorCode error_get_code();
|
||||
|
||||
/**
|
||||
* 获取当前错误信息
|
||||
* @return 错误信息字符串
|
||||
*/
|
||||
const char* error_get_message();
|
||||
|
||||
/**
|
||||
* 清除错误状态
|
||||
*/
|
||||
void error_clear();
|
||||
|
||||
#endif // ERROR_H
|
||||
Reference in New Issue
Block a user