1 /* 2 * Copyright (c) 2024 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 #ifndef OHOS_AV_PIPELINE_STATUS_H 17 #define OHOS_AV_PIPELINE_STATUS_H 18 19 #include <cstdint> 20 21 namespace OHOS { 22 namespace DistributedHardware { 23 enum struct Status : int32_t { 24 END_OF_STREAM = 1, ///< Read source when end of stream 25 OK = 0, ///< The execution result is correct. 26 NO_ERROR = OK, ///< Same as Status::OK 27 ERROR_UNKNOWN = -1, ///< An unknown error occurred. 28 ERROR_PLUGIN_ALREADY_EXISTS = -2, ///< The plugin already exists, usually occurs when in plugin registered. 29 ERROR_INCOMPATIBLE_VERSION = 30 -3, ///< Incompatible version, may occur during plugin registration or function calling. 31 ERROR_NO_MEMORY = -4, ///< The system memory is insufficient. 32 ERROR_WRONG_STATE = -5, ///< The function is called in an invalid state. 33 ERROR_UNIMPLEMENTED = -6, ///< This method or interface is not implemented. 34 ERROR_INVALID_PARAMETER = -7, ///< The plugin does not support this parameter. 35 ERROR_INVALID_DATA = -8, ///< The value is not in the valid range. 36 ERROR_MISMATCHED_TYPE = -9, ///< Mismatched data type 37 ERROR_TIMED_OUT = -10, ///< Operation timeout. 38 ERROR_UNSUPPORTED_FORMAT = -11, ///< The plugin not support this format/name. 39 ERROR_NOT_ENOUGH_DATA = -12, ///< Not enough data when read from source. 40 ERROR_NOT_EXISTED = -13, ///< Source is not existed. 41 ERROR_AGAIN = -14, ///< Operation is not available right now, should try again later. 42 ERROR_PERMISSION_DENIED = -15, ///< Permission denied. 43 ERROR_NULL_POINTER = -16, ///< Null pointer. 44 ERROR_INVALID_OPERATION = -17, ///< Invalid operation. 45 ERROR_CLIENT = -18, ///< Http client error 46 ERROR_SERVER = -19, ///< Http server error 47 ERROR_DELAY_READY = -20, ///< Delay ready event 48 ERROR_INVALID_STATE = -21, 49 ERROR_AUDIO_INTERRUPT = -22, 50 ERROR_INVALID_BUFFER_SIZE = 0xF001, 51 ERROR_UNEXPECTED_MEMORY_TYPE = 0xF002, 52 ERROR_CREATE_BUFFER = 0xF003, 53 ERROR_NULL_POINT_BUFFER = 0xF004, 54 ERROR_INVALID_BUFFER_ID = 0xF005, 55 ERROR_INVALID_BUFFER_STATE = 0xF006, 56 ERROR_NO_FREE_BUFFER = 0xF007, 57 ERROR_NO_DIRTY_BUFFER = 0xF008, 58 ERROR_NO_CONSUMER_LISTENER = 0xF009, 59 ERROR_NULL_BUFFER_QUEUE = 0xF00A, 60 ERROR_WAIT_TIMEOUT = 0xF00B, 61 ERROR_OUT_OF_RANGE = 0xF00C, 62 ERROR_NULL_SURFACE = 0xF00D, 63 ERROR_SURFACE_INNER = 0xF00E, 64 ERROR_NULL_SURFACE_BUFFER = 0xF00F, 65 ERROR_DRM_DECRYPT_FAILED = 0xF010, 66 67 ERROR_IPC_WRITE_INTERFACE_TOKEN = 0xF101, 68 ERROR_IPC_SEND_REQUEST = 0xF102, 69 }; 70 } // namespace DistributedHardware 71 } // namespace OHOS 72 #endif // OHOS_AV_PIPELINE_STATUS_H 73