1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup Core 18 * @{ 19 * 20 * @brief The Core module provides basic backbone capabilities for media frameworks, 21 * including functions such as memory, error codes, and media data structures. 22 * 23 * @syscap SystemCapability.Multimedia.Media.Core 24 * @since 9 25 */ 26 27 /** 28 * @file native_averrors.h 29 * 30 * @brief Media framework error code. 31 * 32 * @kit AVCodecKit 33 * @library libnative_media_core.so 34 * @syscap SystemCapability.Multimedia.Media.Core 35 * @since 9 36 */ 37 38 #ifndef NATIVE_AVERRORS_H 39 #define NATIVE_AVERRORS_H 40 41 #ifdef __cplusplus 42 extern "C" { 43 #endif 44 45 /** 46 * @brief AV error code 47 * @syscap SystemCapability.Multimedia.Media.Core 48 * @since 9 49 * @version 1.0 50 */ 51 typedef enum OH_AVErrCode { 52 /** 53 * the operation completed successfully. 54 */ 55 AV_ERR_OK = 0, 56 /** 57 * no memory. 58 */ 59 AV_ERR_NO_MEMORY = 1, 60 /** 61 * opertation not be permitted. 62 */ 63 AV_ERR_OPERATE_NOT_PERMIT = 2, 64 /** 65 * invalid argument. 66 */ 67 AV_ERR_INVALID_VAL = 3, 68 /** 69 * IO error. 70 */ 71 AV_ERR_IO = 4, 72 /** 73 * network timeout. 74 */ 75 AV_ERR_TIMEOUT = 5, 76 /** 77 * unknown error. 78 */ 79 AV_ERR_UNKNOWN = 6, 80 /** 81 * media service died. 82 */ 83 AV_ERR_SERVICE_DIED = 7, 84 /** 85 * the state is not support this operation. 86 */ 87 AV_ERR_INVALID_STATE = 8, 88 /** 89 * unsupport interface. 90 */ 91 AV_ERR_UNSUPPORT = 9, 92 /** 93 * @error input data error. 94 * @since 12 95 */ 96 AV_ERR_INPUT_DATA_ERROR = 10, 97 /** 98 * @error unsupported format. 99 * @since 16 100 */ 101 AV_ERR_UNSUPPORTED_FORMAT = 11, 102 /** 103 * extend err start. 104 */ 105 AV_ERR_EXTEND_START = 100, 106 /**drm error base. 107 * @since 12 108 */ 109 AV_ERR_DRM_BASE = 200, 110 /** drm decypt failed. 111 * @since 12 112 */ 113 AV_ERR_DRM_DECRYPT_FAILED = 201, 114 /** 115 * @error video error base. 116 * @since 12 117 */ 118 AV_ERR_VIDEO_BASE = 300, 119 /** 120 * @error video unsupported color space conversion. 121 * @since 12 122 */ 123 AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301, 124 /** 125 * @error the address of server is incorrect, and IO can not find host. 126 * @since 14 127 */ 128 AV_ERR_IO_CANNOT_FIND_HOST = 5411001, 129 /** 130 * @error network connection timeout. 131 * @since 14 132 */ 133 AV_ERR_IO_CONNECTION_TIMEOUT = 5411002, 134 /** 135 * @error failed link due to abnormal network. 136 * @since 14 137 */ 138 AV_ERR_IO_NETWORK_ABNORMAL = 5411003, 139 /** 140 * @error failed link due to unavailable network. 141 * @since 14 142 */ 143 AV_ERR_IO_NETWORK_UNAVAILABLE = 5411004, 144 /** 145 * @error network permission dennied. 146 * @since 14 147 */ 148 AV_ERR_IO_NO_PERMISSION = 5411005, 149 /** 150 * @error the client request parameters are incorrect or exceed the processing capacity. 151 * @since 14 152 */ 153 AV_ERR_IO_NETWORK_ACCESS_DENIED = 5411006, 154 /** 155 * @error cannot find available network resources. 156 * @since 14 157 */ 158 AV_ERR_IO_RESOURCE_NOT_FOUND = 5411007, 159 /** 160 * @error the server fails to verify the client certificate because the certificate is not carried, 161 * the certificate is invalid, or the certificate is expired. 162 * @since 14 163 */ 164 AV_ERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008, 165 /** 166 * @error the client fails to verify the server certificate because the certificate is not carried, 167 * the certificate is invalid, or the certificate is expired. 168 * @since 14 169 */ 170 AV_ERR_IO_SSL_CONNECT_FAIL = 5411009, 171 /** 172 * @error IO SSL server cert untrusted. 173 * @since 14 174 */ 175 AV_ERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010, 176 /** 177 * @error unsupported request due to network protocols. 178 * @since 14 179 */ 180 AV_ERR_IO_UNSUPPORTED_REQUEST = 5411011, 181 } OH_AVErrCode; 182 183 #ifdef __cplusplus 184 } 185 #endif 186 187 #endif // NATIVE_AVERRORS_H 188 /** @} */ 189