OpenSDK  V4.2.0
OpenNetStreamError.h
浏览该文件的文档.
1 
12 #ifndef _H_OPENNETSTREAMERROR_H_
13 #define _H_OPENNETSTREAMERROR_H_
14 
15 #define OPEN_SDK_NOERROR 0
16 #define OPEN_SDK_GENERAL_ERROR -1
17 
18 #define OPEN_SDK_BASE 10000
19 #define OPEN_SDK_JSON_ERROR OPEN_SDK_BASE + 1
20 #define OPEN_SDK_ERROR OPEN_SDK_BASE + 2
21 #define OPEN_SDK_DEV_NO_SUPPORT OPEN_SDK_BASE + 3
22 #define OPEN_SDK_ALLOC_ERROR OPEN_SDK_BASE + 4
23 #define OPEN_SDK_PARAM_ERROR OPEN_SDK_BASE + 5
24 #define OPEN_SDK_SAFE_KEY_ERROR OPEN_SDK_BASE + 6
25 #define OPEN_SDK_SEARCHING_ERROR OPEN_SDK_BASE + 7
26 #define OPEN_SDK_SYNC_ERROR OPEN_SDK_BASE + 8
27 #define OPEN_SDK_INTERFACE_NO_IMPL OPEN_SDK_BASE + 9
28 #define OPEN_SDK_ORDER_ERROR OPEN_SDK_BASE + 10
29 #define OPEN_SDK_SESSION_EXPIRED OPEN_SDK_BASE + 11
30 
31 /******************************************************************************************************************/
32 /* 接口基本默认只返回0和-1, 如果接口返回-1, 则通过OpenSDK_GetLastErrorCode拿具体错误码
33 错误码格式{xbbbbb}, x表示错误码表示,x的值如下表:
42 */
43 /******************************************************************************************************************/
44 
45 //网络级别错误码,CURL反馈, 都是调开放平台接口报错(测试时首先保证登陆成功)
46 #define OPEN_SDK_NETWORK_SETUP_BASE 100000
47 #define OPEN_SDK_COULDNT_RESOLVE_HOST OPEN_SDK_NETWORK_SETUP_BASE + 6
48 #define OPEN_SDK_COULDNT_CONNECT OPEN_SDK_NETWORK_SETUP_BASE + 7
49 #define OPEN_SDK_OPERATION_TIMEOUT OPEN_SDK_NETWORK_SETUP_BASE + 28
50 
51 //用户操作级别错误码
52 #define OPEN_SDK_USER_OPERATION_BASE 200000
53 #define OPEN_SDK_BAD_PARAMS OPEN_SDK_USER_OPERATION_BASE + 1
54 #define OPEN_SDK_SESSION_INVALID OPEN_SDK_USER_OPERATION_BASE + 2
55 #define OPEN_SDK_VIDEO_RECORD_NOT_EXIST OPEN_SDK_USER_OPERATION_BASE + 3
56 #define OPEN_SDK_VIDEO_RECORD_SEARCHING OPEN_SDK_USER_OPERATION_BASE + 4
57 #define OPEN_SDK_STOP_ALARM_REC_FAILED OPEN_SDK_USER_OPERATION_BASE + 5
58 #define OPEN_SDK_PERMANENT_KEY_INVALID OPEN_SDK_USER_OPERATION_BASE + 6
59 #define OPEN_SDK_PIC_DECRYPT_FAILED OPEN_SDK_USER_OPERATION_BASE + 7
60 #define OPEN_SDK_PIC_CONTENT_INVALID OPEN_SDK_USER_OPERATION_BASE + 8
61 #define OPEN_SDK_PIC_NO_NEED_DECRYPT OPEN_SDK_USER_OPERATION_BASE + 9
62 #define OPEN_SDK_PIC_COULDNT_ALLOC_BUFFERS OPEN_SDK_USER_OPERATION_BASE + 10
63 #define OPEN_SDK_SDK_LOAD_FAILED OPEN_SDK_USER_OPERATION_BASE + 11
64 
65 //OpenApi接口级别错误码, 详细参考https://open.ys7.com/doc/book/index/api-code.html
66 #define OPEN_SDK_OPENAPI_BASE 300000
67 #define OPEN_SDK_RESPINFO_BAD OPEN_SDK_OPENAPI_BASE + 1
68 #define OPEN_SDK_RESPINFO_INVALID OPEN_SDK_OPENAPI_BASE + 2
69 #define OPEN_SDK_DEVICE_RSP_TIMEOUT OPEN_SDK_OPENAPI_BASE + 2009
70 #define OPEN_SDK_DEVICE_SAFE_INVALID OPEN_SDK_OPENAPI_BASE + 5002
71 #define OPEN_SDK_ACCESSTOKEN_INVALID OPEN_SDK_OPENAPI_BASE + 10002
72 #define OPEN_SDK_SIGNATURE_ERROR OPEN_SDK_OPENAPI_BASE + 10008
73 #define OPEN_SDK_APPKEY_NOMATCH_TOKEN_ERROR OPEN_SDK_OPENAPI_BASE + 10018
74 #define OPEN_SDK_USERID_PHONE_UNBIND OPEN_SDK_OPENAPI_BASE + 10014
75 #define OPEN_SDK_CHANNEL_NOT_EXIST OPEN_SDK_OPENAPI_BASE + 20001
76 #define OPEN_SDK_DEVICE_OFFLINE OPEN_SDK_OPENAPI_BASE + 20007
77 #define OPEN_SDK_USER_NOTOWN_DEVICE OPEN_SDK_OPENAPI_BASE + 20018
78 #define OPEN_SDK_SERVER_DATA_BAD OPEN_SDK_OPENAPI_BASE + 49999
79 #define OPEN_SDK_SERVER_ERROR OPEN_SDK_OPENAPI_BASE + 50000
80 
81 //系统资源级别错误
82 #define OPEN_SDK_SYSTEM_RESOURCE_BASE 400000
83 #define OPEN_SDK_COULDNT_CREATE_THREAD OPEN_SDK_SYSTEM_RESOURCE_BASE + 1
84 #define OPEN_SDK_COULDNT_ALLOC_BUFFERS OPEN_SDK_SYSTEM_RESOURCE_BASE + 2
85 
86 //不支持的错误码
87 #define OPEN_SDK_NOT_SUPPORT_BASE 600000
88 #define OPEN_SDK_DEV_NOT_SUPPORT OPEN_SDK_NOT_SUPPORT_BASE + 1
89 #define OPEN_SDK_API_NO_IMPLEMENT OPEN_SDK_NOT_SUPPORT_BASE + 2
90 
91 //推送级别错误
92 #define OPEN_SDK_PUSH_BASE 700000
93 #define OPEN_SDK_PUSH_PARAM_ERROR OPEN_SDK_PUSH_BASE + 10001
94 #define OPEN_SDK_PUSH_DATA_UNINIT_ERROR OPEN_SDK_PUSH_BASE + 10002
95 #define OPEN_SDK_PUSH_NO_REGISTER_ERROR OPEN_SDK_PUSH_BASE + 10003
96 #define OPEN_SDK_PUSH_NO_MQTT_CREATE_ERROR OPEN_SDK_PUSH_BASE + 10004
97 //MQTT Client错误码
98 #define OPEN_SDK_PUSH_MQTT_DISCONNECTED_ERROR OPEN_SDK_PUSH_BASE + 20003
99 #define OPEN_SDK_PUSH_MQTT_MAX_MESSAGES_ERROR OPEN_SDK_PUSH_BASE + 20004
100 #define OPEN_SDK_PUSH_MQTT_BAD_UTF8_STRING_ERROR OPEN_SDK_PUSH_BASE + 20005
101 #define OPEN_SDK_PUSH_MQTT_NULL_PARAMETER_ERROR OPEN_SDK_PUSH_BASE + 20006
102 //MQTT Protocol错误码
103 #define OPEN_SDK_PUSH_MQTT_VERSION_INVALID_ERROR OPEN_SDK_PUSH_BASE + 30001
104 #define OPEN_SDK_PUSH_MQTT_IDENTIFIER_ERROR OPEN_SDK_PUSH_BASE + 30002
105 #define OPEN_SDK_PUSH_MQTT_SERVER_UNAVAILABLE_ERROR OPEN_SDK_PUSH_BASE + 30003
106 #define OPEN_SDK_PUSH_MQTT_BAD_USERNAME_PASSWORD_ERROR OPEN_SDK_PUSH_BASE + 30004
107 #define OPEN_SDK_PUSH_MQTT_NOT_AUTHORIZED_ERROR OPEN_SDK_PUSH_BASE + 30005
108 //Push Platform错误码
109 #define OPEN_SDK_PUSH_PLATFORM_RESPINFO_BAD OPEN_SDK_PUSH_BASE + 40001
110 #define OPEN_SDK_PUSH_PLATFORM_RESPINFO_INVALID OPEN_SDK_PUSH_BASE + 40002
111 #define OPEN_SDK_PUSH_PLATFORM_SESSION_INVALID_ERROR OPEN_SDK_PUSH_BASE + 40003
112 #define OPEN_SDK_PUSH_PLATFORM_UNAUTHORIZED_ERROR OPEN_SDK_PUSH_BASE + 40401
113 //Push 系统资源错误码
114 #define OPEN_SDK_PUSH_COULDNT_CREATE_THREAD OPEN_SDK_PUSH_BASE + 50001
115 #define OPEN_SDK_PUSH_COULDNT_ALLOC_BUFFERS OPEN_SDK_PUSH_BASE + 50002
116 //Push 网络级别错误码
117 #define OPEN_SDK_PUSH_COULDNT_RESOLVE_HOST OPEN_SDK_PUSH_BASE + 60006
118 #define OPEN_SDK_PUSH_COULDNT_CONNECT OPEN_SDK_PUSH_BASE + 60007
119 #define OPEN_SDK_PUSH_OPERATION_TIMEOUT OPEN_SDK_PUSH_BASE + 60028
120 
121 //NetStream的错误码
122 #define OPEN_SDK_NETSTREAM_BASE 500000
123 #define OPEN_SDK_START_TALK_FAILED OPEN_SDK_NETSTREAM_BASE + 1
124 #define OPEN_SDK_TALK_OPENED OPEN_SDK_NETSTREAM_BASE + 2
125 
126 //未定义的错误码
127 #define OPEN_SDK_UNDEFINE_BASE 900000
128 #define OPEN_SDK_ALLOCSESSION_FAILED OPEN_SDK_UNDEFINE_BASE + 1
129 #define OPEN_SDK_SEARCH_RECORD_FAILED OPEN_SDK_UNDEFINE_BASE + 2
130 #define OPEN_SDK_START_ALARM_REC_FAILED OPEN_SDK_UNDEFINE_BASE + 3
131 
132 
133 //预览时回调接口反馈的错误码, 下列为常见错误码
134 /*
135  * \brief 消息回调 取流 错误码定义(MessageInfo), 公共错误码起始:UE000;业务错误码起始:UE100
136  */
137 #define OPEN_SDK_STREAM_ACCESSTOKEN_ERROR_OR_EXPIRE "UE001"
138 #define OPEN_SDK_STREAM_PU_NO_RESOURCE "UE101"
139 #define OPEN_SDK_STREAM_TRANSF_DEVICE_OFFLINE "UE102"
140 #define OPEN_SDK_STREAM_INNER_TIMEOUT "UE103"
141 #define OPEN_SDK_STREAM_INNER_VERIFYCODE_ERROR "UE104"
142 #define OPEN_SDK_STREAM_PLAY_FAIL "UE105"
143 #define OPEN_SDK_STREAM_TRANSF_TERMINAL_BINDING "UE106"
144 #define OPEN_SDK_STREAM_VIDEO_RECORD_NOTEXIST "UE108"
145 #define OPEN_SDK_STREAM_VTDU_CONCURRENT_LIMIT "UE109"
146 #define OPEN_SDK_STREAM_UNSUPPORTED "UE110"
147 #define OPEN_SDK_STREAM_DEVICE_RETURN_ON_VIDEO_SOURCE "UE111"
148 
149 
150 #endif //_H_OPENNETSTREAMERROR_H_