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