1# image_mdk_common.h 2<!--Kit: Image Kit--> 3<!--Subsystem: Multimedia--> 4<!--Owner: @aulight02--> 5<!--SE: @liyang_bryan--> 6<!--TSE: @xchaosioda--> 7 8## Overview 9 10The file declares the common enums and structs used by the image interface. 11 12**Library**: libimage_ndk.z.so 13 14**System capability**: SystemCapability.Multimedia.Image 15 16**Since**: 10 17 18**Related module**: [Image](capi-image.md) 19 20## Summary 21 22### Structs 23 24| Name| typedef Keyword| Description| 25| -- | -- | -- | 26| [OhosImageSize](capi-image-ohosimagesize.md) | - | Describes the image size. It is a member variable of [OhosImageDecodingOps](capi-image-ohosimagedecodingops.md).| 27 28### Enums 29 30| Name| typedef Keyword| Description| 31| -- | -- | -- | 32| [IRNdkErrCode](#irndkerrcode) | IRNdkErrCode | Enumerates the return values that may be used by the interface.| 33 34## Enum Description 35 36### IRNdkErrCode 37 38``` 39enum IRNdkErrCode 40``` 41 42**Description** 43 44Enumerates the return values that may be used by the interface. 45 46**Since**: 10 47 48| Enum Item| Description| 49| -- | -- | 50| -------- | -------- | 51| IMAGE_RESULT_SUCCESS = 0 | Operation succeeded.| 52| IMAGE_RESULT_BAD_PARAMETER = -1 | Invalid parameter.| 53| IMAGE_RESULT_IMAGE_RESULT_BASE = IMAGE_RESULT_BASE | Operation failed.| 54| IMAGE_RESULT_ERR_IPC = IMAGE_RESULT_BASE + 1 | IPC error.| 55| IMAGE_RESULT_ERR_SHAMEM_NOT_EXIST = IMAGE_RESULT_BASE + 2 | Sharing the memory fails.| 56| IMAGE_RESULT_ERR_SHAMEM_DATA_ABNORMAL = IMAGE_RESULT_BASE + 3 | Abnormal data in the shared memory.| 57| IMAGE_RESULT_DECODE_ABNORMAL = IMAGE_RESULT_BASE + 4 | Failed to decode the image.| 58| IMAGE_RESULT_DATA_ABNORMAL = IMAGE_RESULT_BASE + 5 | Abnormal input data.| 59| IMAGE_RESULT_MALLOC_ABNORMAL = IMAGE_RESULT_BASE + 6 | An error occurs during memory allocation.| 60| IMAGE_RESULT_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 7 | The image type is not supported.| 61| IMAGE_RESULT_INIT_ABNORMAL = IMAGE_RESULT_BASE + 8 | Failed to initialize the image.| 62| IMAGE_RESULT_GET_DATA_ABNORMAL = IMAGE_RESULT_BASE + 9 | An error occurs during image data retrieval.| 63| IMAGE_RESULT_TOO_LARGE = IMAGE_RESULT_BASE + 10 | The image is too large.| 64| IMAGE_RESULT_TRANSFORM = IMAGE_RESULT_BASE + 11 | An error occurs during image transformation.| 65| IMAGE_RESULT_COLOR_CONVERT = IMAGE_RESULT_BASE + 12 | An error occurs during image color conversion.| 66| IMAGE_RESULT_CROP = IMAGE_RESULT_BASE + 13 | An error occurs during image cropping.| 67| IMAGE_RESULT_SOURCE_DATA = IMAGE_RESULT_BASE + 14 | The image source data is incorrect.| 68| IMAGE_RESULT_SOURCE_DATA_INCOMPLETE = IMAGE_RESULT_BASE + 15 | The image source data is incomplete.| 69| IMAGE_RESULT_MISMATCHED_FORMAT = IMAGE_RESULT_BASE + 16 | The image format does not match.| 70| IIMAGE_RESULT_UNKNOWN_FORMAT = IMAGE_RESULT_BASE + 17 | Unknown image format.| 71| IMAGE_RESULT_SOURCE_UNRESOLVED = IMAGE_RESULT_BASE + 18 | The image source is not parsed.| 72| IMAGE_RESULT_INVALID_PARAMETER = IMAGE_RESULT_BASE + 19 | Invalid image parameter.| 73| IMAGE_RESULT_DECODE_FAILED = IMAGE_RESULT_BASE + 20 | Failed to decode the image.| 74| IMAGE_RESULT_PLUGIN_REGISTER_FAILED = IMAGE_RESULT_BASE + 21 | Failed to register the plug-in.| 75| IMAGE_RESULT_PLUGIN_CREATE_FAILED = IMAGE_RESULT_BASE + 22 | Failed to create the plug-in.| 76| IMAGE_RESULT_ENCODE_FAILED = IMAGE_RESULT_BASE + 23 | Failed to encode the image.| 77| IMAGE_RESULT_ADD_PIXEL_MAP_FAILED = IMAGE_RESULT_BASE + 24 | Failed to add the PixelMap.| 78| IIMAGE_RESULT_HW_DECODE_UNSUPPORT = IMAGE_RESULT_BASE + 25 | Hardware decoding is not supported.| 79| IMAGE_RESULT_DECODE_HEAD_ABNORMAL = IMAGE_RESULT_BASE + 26 | Failed to decode the image header.| 80| IMAGE_RESULT_DECODE_EXIF_UNSUPPORT = IMAGE_RESULT_BASE + 27 | Exchangeable Image File (EXIF) is not supported for image decoding.| 81| IMAGE_RESULT_PROPERTY_NOT_EXIST = IMAGE_RESULT_BASE + 28 | The image property does not exist.| 82| IMAGE_RESULT_MEDIA_DATA_UNSUPPORT = IMAGE_RESULT_BASE + 30 | The media type is not supported.| 83| IMAGE_RESULT_MEDIA_TOO_LARGE = IMAGE_RESULT_BASE + 31 | The media is too large.| 84| IMAGE_RESULT_MEDIA_MALLOC_FAILED = IMAGE_RESULT_BASE + 32 | Memory allocation failed.| 85| IMAGE_RESULT_MEDIA_END_OF_STREAM = IMAGE_RESULT_BASE + 33 | Failed to end the media data stream.| 86| IMAGE_RESULT_MEDIA_IO_ABNORMAL = IMAGE_RESULT_BASE + 34 | Abnormal input and output streams.| 87| IMAGE_RESULT_MEDIA_MALFORMED = IMAGE_RESULT_BASE + 35 | The media service functions abnormally.| 88| IMAGE_RESULT_MEDIA_BUFFER_TOO_SMALL = IMAGE_RESULT_BASE + 36 | The media data is too small.| 89| IMAGE_RESULT_MEDIA_OUT_OF_RANGE = IMAGE_RESULT_BASE + 37 | The media is out of range.| 90| IMAGE_RESULT_MEDIA_STATUS_ABNORMAL = IMAGE_RESULT_BASE + 38 | Abnormal media status.| 91| IMAGE_RESULT_MEDIA_VALUE_INVALID = IMAGE_RESULT_BASE + 39 | Invalid media value.| 92| IMAGE_RESULT_MEDIA_NULL_POINTER = IMAGE_RESULT_BASE + 40 | Media operation failed.| 93| IMAGE_RESULT_MEDIA_INVALID_OPERATION = IMAGE_RESULT_BASE + 41 | Invalid media operation.| 94| IMAGE_RESULT_MEDIA_ERR_PLAYER_NOT_INIT = IMAGE_RESULT_BASE + 42 | An error occurs during media initialization.| 95| IMAGE_RESULT_MEDIA_EARLY_PREPARE = IMAGE_RESULT_BASE + 43 | Media preprocessing is carried out too early.| 96| IMAGE_RESULT_MEDIA_SEEK_ERR = IMAGE_RESULT_BASE + 44 | The seek operation failed.| 97| IMAGE_RESULT_MEDIA_PERMISSION_DENIED = IMAGE_RESULT_BASE + 45 | Permission denied.| 98| IMAGE_RESULT_MEDIA_DEAD_OBJECT = IMAGE_RESULT_BASE + 46 | The media object is deregistered.| 99| IMAGE_RESULT_MEDIA_TIMED_OUT = IMAGE_RESULT_BASE + 47 | A timeout occurs.| 100| IMAGE_RESULT_MEDIA_TRACK_NOT_ALL_SUPPORTED = IMAGE_RESULT_BASE + 48 | The media capability is not supported.| 101| IMAGE_RESULT_MEDIA_ADAPTER_INIT_FAILED = IMAGE_RESULT_BASE + 49 | Failed to initialize the media adapter.| 102| IMAGE_RESULT_MEDIA_WRITE_PARCEL_FAIL = IMAGE_RESULT_BASE + 50 | Failed to write data to the parcel.| 103| IMAGE_RESULT_MEDIA_READ_PARCEL_FAIL = IMAGE_RESULT_BASE + 51 | Failed to read data from the parcel.| 104| IMAGE_RESULT_MEDIA_NO_AVAIL_BUFFER = IMAGE_RESULT_BASE + 52 | Invalid data.| 105| IMAGE_RESULT_MEDIA_INVALID_PARAM = IMAGE_RESULT_BASE + 53 | Invalid parameters.| 106| IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 54 | The media codec adapter does not exist.| 107| IMAGE_RESULT_MEDIA_CREATE_CODEC_ADAPTER_FAILED = IMAGE_RESULT_BASE + 55 | Failed to create the media codec adapter.| 108| IMAGE_RESULT_MEDIA_CODEC_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 56 | The media codec adapter is not initialized.| 109| IMAGE_RESULT_MEDIA_ZCODEC_CREATE_FAILED = IMAGE_RESULT_BASE + 57 | Failed to create the media codec.| 110| IMAGE_RESULT_MEDIA_ZCODEC_NOT_EXIST = IMAGE_RESULT_BASE + 58 | The media codec does not exist.| 111| IMAGE_RESULT_MEDIA_JNI_CLASS_NOT_EXIST = IMAGE_RESULT_BASE + 59 | The media JNI layer class does not exist.| 112| IMAGE_RESULT_MEDIA_JNI_METHOD_NOT_EXIST = IMAGE_RESULT_BASE + 60 | The media JNI layer method does not exist.| 113| IMAGE_RESULT_MEDIA_JNI_NEW_OBJ_FAILED = IMAGE_RESULT_BASE + 61 | Failed to create the object at the media JNI layer.| 114| IMAGE_RESULT_MEDIA_JNI_COMMON_ERROR = IMAGE_RESULT_BASE + 62 | The media JNI layer is abnormal.| 115| IMAGE_RESULT_MEDIA_DISTRIBUTE_NOT_SUPPORT = IMAGE_RESULT_BASE + 63 | The distributed feature is not supported.| 116| IMAGE_RESULT_MEDIA_SOURCE_NOT_SET = IMAGE_RESULT_BASE + 64 | The media source is not set.| 117| IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_INIT = IMAGE_RESULT_BASE + 65 | The media RTSP adapter is not initialized.| 118| IMAGE_RESULT_MEDIA_RTSP_ADAPTER_NOT_EXIST = IMAGE_RESULT_BASE + 66 | The media RTSP adapter does not exist.| 119| IMAGE_RESULT_MEDIA_RTSP_SURFACE_UNSUPPORT = IMAGE_RESULT_BASE + 67 | The media does not support the RTSP surface.| 120| IMAGE_RESULT_MEDIA_RTSP_CAPTURE_NOT_INIT = IMAGE_RESULT_BASE + 68 | Failed to initialize the media RTSP capturer.| 121| IMAGE_RESULT_MEDIA_RTSP_SOURCE_URL_INVALID = IMAGE_RESULT_BASE + 69 | Invalid media RTSP source path.| 122| IMAGE_RESULT_MEDIA_RTSP_VIDEO_TRACK_NOT_FOUND = IMAGE_RESULT_BASE + 70 | No video capability is found in the media RTSP.| 123| IMAGE_RESULT_MEDIA_RTSP_CAMERA_NUM_REACH_MAX = IMAGE_RESULT_BASE + 71 | The maximum number of RTSP cameras has been reached.| 124| IMAGE_RESULT_MEDIA_SET_VOLUME = IMAGE_RESULT_BASE + 72 | Failed to set the volume.| 125| IMAGE_RESULT_MEDIA_NUMBER_OVERFLOW = IMAGE_RESULT_BASE + 73 | The number of operations overflows.| 126| IMAGE_RESULT_MEDIA_DIS_PLAYER_UNSUPPORTED = IMAGE_RESULT_BASE + 74 | The distributed media player is not supported.| 127| IIMAGE_RESULT_MEDIA_DENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 75 | Failed to decode the ICC.| 128| IMAGE_RESULT_MEDIA_ENCODE_ICC_FAILED = IMAGE_RESULT_BASE + 76 | Failed to encode the ICC.| 129| IMAGE_RESULT_MEDIA_READ_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 150 | Failed to read the PixelMap.| 130| IMAGE_RESULT_MEDIA_WRITE_PIXELMAP_FAILED = IMAGE_RESULT_BASE + 151 | Failed to write the PixelMap.| 131| IMAGE_RESULT_MEDIA_PIXELMAP_NOT_ALLOW_MODIFY = IMAGE_RESULT_BASE + 152 | The PixelMap cannot be modified.| 132| IMAGE_RESULT_MEDIA_CONFIG_FAILED = IMAGE_RESULT_BASE + 153 | Configuration failed.| 133| IMAGE_RESULT_JNI_ENV_ABNORMAL = IMAGE_RESULT_BASE + 154 | The JNI environment is abnormal.| 134| IMAGE_RESULT_SURFACE_GRALLOC_BUFFER_FAILED = IMAGE_RESULT_BASE + 155 | Failed to allocate memory for the surface.| 135| IMAGE_RESULT_CREATE_SURFACE_FAILED = IMAGE_RESULT_BASE + 156 | Failed to create the surface.| 136| IMAGE_RESULT_SURFACE_GET_PARAMETER_FAILED = IMAGE_RESULT_BASE + 157 | Failed to obtain parameters from the surface.| 137| IMAGE_RESULT_GET_SURFACE_FAILED = IMAGE_RESULT_BASE + 158 | Failed to obtain the surface.| 138| IIMAGE_RESULT_SURFACE_ACQUIRE_BUFFER_FAILED = IMAGE_RESULT_BASE + 159 | Failed to allocate the memory.| 139| IMAGE_RESULT_SURFACE_REQUEST_BUFFER_FAILED = IMAGE_RESULT_BASE + 160 | Failed to allocate the memory.| 140| IMAGE_RESULT_REGISTER_LISTENER_FAILED = IMAGE_RESULT_BASE + 161 | Failed to register the listener.| 141| IMAGE_RESULT_REGISTER_BUFFER_FAILED = IMAGE_RESULT_BASE + 162 | Failed to register the buffer.| 142| IMAGE_RESULT_FREAD_FAILED = IMAGE_RESULT_BASE + 163 | Failed to read the file.| 143| IMAGE_RESULT_PEEK_FAILED = IMAGE_RESULT_BASE + 164 | Failed to peek the file.| 144| IMAGE_RESULT_SEEK_FAILED = IMAGE_RESULT_BASE + 165 | Failed to seek the file.| 145| IMAGE_RESULT_STREAM_SIZE_ERROR = IMAGE_RESULT_BASE + 166 | The data stream is damaged.| 146| IIMAGE_RESULT_FILE_FD_ERROR = IMAGE_RESULT_BASE + 167, | The file descriptor is corrupted.| 147| IMAGE_RESULT_FILE_DAMAGED = IMAGE_RESULT_BASE + 168 | The file is damaged.| 148| IIMAGE_RESULT_CREATE_DECODER_FAILED = IMAGE_RESULT_BASE + 169 | Failed to create a decoder.| 149| IMAGE_RESULT_CREATE_ENCODER_FAILED = IMAGE_RESULT_BASE + 170 | Failed to create an encoder.| 150| IMAGE_RESULT_CHECK_FORMAT_ERROR = IMAGE_RESULT_BASE + 171 | Failed to check the format.| 151| IMAGE_RESULT_THIRDPART_SKIA_ERROR = IMAGE_RESULT_BASE + 172 | Skia decoding failed.| 152| IMAGE_RESULT_HW_DECODE_FAILED = IMAGE_RESULT_BASE + 173 | Hardware decoding failed.| 153| IMAGE_RESULT_ALLOCATER_TYPE_ERROR = IMAGE_RESULT_BASE + 174 | Failed to verify the memory type.| 154| IMAGE_RESULT_ALPHA_TYPE_ERROR = IMAGE_RESULT_BASE + 175 | Failed to verify the alpha type.| 155| IMAGE_RESULT_INDEX_INVALID = IMAGE_RESULT_BASE + 176 | Invalid parameter.| 156| IMAGE_RESULT_MEDIA_UNKNOWN = IMAGE_RESULT_BASE + 200 | Unknown error.| 157