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 /** 17 * @addtogroup ImageEffect 18 * @{ 19 * 20 * @brief Provides the error code for ImageEffect. 21 * 22 * @since 12 23 */ 24 25 /** 26 * @file image_effect_errors.h 27 * 28 * @brief Defines the error code used in ImageEffect. 29 * 30 * @library libimage_effect.so 31 * @syscap SystemCapability.Multimedia.ImageEffect.Core 32 * @since 12 33 */ 34 35 #ifndef NATIVE_IMAGE_EFFECT_ERRORS_H 36 #define NATIVE_IMAGE_EFFECT_ERRORS_H 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /** 43 * @brief Effect error code 44 * 45 * @syscap SystemCapability.Multimedia.ImageEffect.Core 46 * @since 12 47 */ 48 typedef enum ImageEffect_ErrorCode { 49 /** 50 * The operation completed successfully. 51 */ 52 EFFECT_SUCCESS = 0, 53 /** 54 * Permission denied. 55 */ 56 EFFECT_ERROR_PERMISSION_DENIED = 201, 57 /** 58 * Invalid parameter. 59 */ 60 EFFECT_ERROR_PARAM_INVALID = 401, 61 /** 62 * Warning code if input and output buffer size is not match, it will be rendered through output buffer size. 63 */ 64 EFFECT_BUFFER_SIZE_NOT_MATCH = 29000001, 65 /** 66 * Warning code if input and output color space is not match, it will be rendered by modifying the color space of 67 * output image. 68 */ 69 EFFECT_COLOR_SPACE_NOT_MATCH = 29000002, 70 /** 71 * The input and output image type is not match. For example, set input OH_Pixelmap and set output NativeBuffer. 72 */ 73 EFFECT_INPUT_OUTPUT_NOT_MATCH = 29000101, 74 /** 75 * Over the max number of the filters that can be added. 76 */ 77 EFFECT_EFFECT_NUMBER_LIMITED = 29000102, 78 /** 79 * The input or output image type is not supported. For example, the pixel format beyond the current definition. 80 */ 81 EFFECT_INPUT_OUTPUT_NOT_SUPPORTED = 29000103, 82 /** 83 * Allocate memory fail. For example, over sized image resource. 84 */ 85 EFFECT_ALLOCATE_MEMORY_FAILED = 29000104, 86 /** 87 * Parameter error. For example, the invalid value set for filter. 88 */ 89 EFFECT_PARAM_ERROR = 29000121, 90 /** 91 * Key error. For example, the invalid key set for filter. 92 */ 93 EFFECT_KEY_ERROR = 29000122, 94 /** 95 * Unknown error. 96 */ 97 EFFECT_UNKNOWN = 29000199, 98 } ImageEffect_ErrorCode; 99 100 #ifdef __cplusplus 101 } 102 #endif 103 #endif // NATIVE_IMAGE_EFFECT_ERRORS_H 104 /** @} */