From 1cbdd8385ed6971c0a667c5b72914c128473b515 Mon Sep 17 00:00:00 2001 From: caochuan Date: Tue, 19 Mar 2024 15:22:15 +0800 Subject: [PATCH] =?UTF-8?q?Feature:=20ImageReceiver=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E7=BA=AFnative=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan --- multimedia/image_framework/BUILD.gn | 33 + .../image_framework/include/image/image.h | 158 ++ .../include/image/image_common.h | 1629 +++++++++++++++++ .../include/image/image_receiver.h | 302 +++ .../libimage_receiver.ndk.json | 74 + .../image_framework/libohimage.ndk.json | 34 + 6 files changed, 2230 insertions(+) create mode 100644 multimedia/image_framework/include/image/image.h create mode 100644 multimedia/image_framework/include/image/image_common.h create mode 100644 multimedia/image_framework/include/image/image_receiver.h create mode 100644 multimedia/image_framework/libimage_receiver.ndk.json create mode 100644 multimedia/image_framework/libohimage.ndk.json diff --git a/multimedia/image_framework/BUILD.gn b/multimedia/image_framework/BUILD.gn index 22c7d1fb9..2eac8ab68 100644 --- a/multimedia/image_framework/BUILD.gn +++ b/multimedia/image_framework/BUILD.gn @@ -72,3 +72,36 @@ ohos_ndk_headers("image_packer_ndk_header") { dest_dir = "$ndk_headers_out_dir/multimedia/image_framework" sources = [ "./include/image_packer_mdk.h" ] } + +ohos_ndk_library("libohimage") { + output_name = "ohimage" + output_extension = "so" + ndk_description_file = "./libohimage.ndk.json" + min_compact_version = "12" + system_capability = "SystemCapability.Multimedia.Image.Core" + system_capability_headers = + [ "multimedia/image_framework/include/image/image.h" ] +} + +ohos_ndk_headers("ohimage_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image_framework/image" + sources = [ + "./include/image/image.h", + "./include/image/image_common.h", + ] +} + +ohos_ndk_library("libimage_receiver") { + output_name = "image_receiver" + output_extension = "so" + ndk_description_file = "./libimage_receiver.ndk.json" + min_compact_version = "12" + system_capability = "SystemCapability.Multimedia.Image.ImageReceiver" + system_capability_headers = + [ "multimedia/image_framework/include/image/image_receiver.h" ] +} + +ohos_ndk_headers("image_receiver_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image_framework/image" + sources = [ "./include/image/image_receiver.h" ] +} diff --git a/multimedia/image_framework/include/image/image.h b/multimedia/image_framework/include/image/image.h new file mode 100644 index 000000000..008100f0e --- /dev/null +++ b/multimedia/image_framework/include/image/image.h @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for access to the image interface. + * + * @Syscap SystemCapability.Multimedia.Image.Core + * @since 12 + */ + +/** + * @file image.h + * + * @brief Declares functions that access the image rectangle, size, format, and component data. + * Need link libimage_native.z.so + * + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_H +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_H + +#include "image_common.h" +#include "native_buffer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines an OH_Image object. + * + * @since 12 + */ +struct OH_Image; + +/** + * @brief Defines the data type name of a native image. + * + * @since 12 + */ +typedef struct OH_Image OH_Image; + +/** + * @brief Obtains {@link Image_Size} of an {@link OH_Image} object. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param size Indicates the pointer to the {@link Image_Size} object obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MEDIA_DEAD_OBJECT - if media object dead. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetImageSize(OH_Image* image, Image_Size* size); + +/** + * @brief Obtains the image format of an {@link OH_Image} object. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param format Indicates the pointer to the image format obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MEDIA_DEAD_OBJECT - if media object dead. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetFormat(OH_Image* image, uint32_t* format); + +/** + * @brief Get type arry from an {@link OH_Image} object. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param types Indicates the pointer to an {@link OH_Image} component arry obtained. + * @param typeSize Indicates the pointer to the {@link OH_Image} component arry size obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetComponentTypes(OH_Image* image, uint32_t** types, size_t* typeSize); + +/** + * @brief Get byte buffer from an {@link OH_Image} object by the component type. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param componentType Indicates the type of component. + * @param nativeBuffer Indicates the pointer to the component buffer obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetByteBuffer(OH_Image* image, uint32_t componentType, OH_NativeBuffer** nativeBuffer); + +/** + * @brief Get size of buffer from an {@link OH_Image} object by the component type. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param componentType Indicates the type of component. + * @param size Indicates the pointer to the size of buffer obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetBufferSize(OH_Image* image, uint32_t componentType, size_t* size); + +/** + * @brief Get row stride from an {@link OH_Image} object by the component type. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param componentType Indicates the type of component. + * @param rowStride Indicates the pointer to the row stride obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetRowStride(OH_Image* image, uint32_t componentType, int32_t* rowStride); + +/** + * @brief Get pixel stride from an {@link OH_Image} object by the component type. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @param componentType Indicates the type of component. + * @param pixelStride Indicates the pointer to the pixel stride obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_GetPixelStride(OH_Image* image, uint32_t componentType, int32_t* pixelStride); + +/** + * @brief Releases an {@link OH_Image} object. + * It is used to release the object {@link OH_Image}. + * + * @param image Indicates the pointer to an {@link OH_Image} object. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_Image2_Release(OH_Image* image); + +#ifdef __cplusplus +}; +#endif +/** @} */ +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_H diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h new file mode 100644 index 000000000..f22a9e227 --- /dev/null +++ b/multimedia/image_framework/include/image/image_common.h @@ -0,0 +1,1629 @@ +/* + * Copyright (C) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for access to the image interface. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 2.0 + */ + +/** + * @file image_common.h + * + * @brief Declares the common enums and structs used by the image interface. + * + * @since 10 + * @version 2.0 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +#define IMAGE_ERRORCODE_BASE 62980096 + +/** + * @brief Defines the image size. + * + * @since 10 + * @version 2.0 + */ +struct Image_Size { + /* * Image width, in pixels. */ + int32_t width; + /* * Image height, in pixels. */ + int32_t height; +}; + +/** + * @brief Declaration the image size. + * + * @since 10 + * @version 2.0 + */ +typedef struct Image_Size Image_Size; + +/** + * @brief Defines the region of the image source to decode. + * + * @since 10 + * @version 2.0 + */ +struct Image_Region { + /* * X coordinate of the start point, in pixels. */ + uint32_t x; + /* * Y coordinate of the start point, in pixels. */ + uint32_t y; + /* * Width of the region, in pixels. */ + uint32_t width; + /* * Height of the region, in pixels. */ + uint32_t height; +}; + +/** + * @brief Declaration the image region. + * + * @since 10 + * @version 2.0 + */ +typedef struct Image_Region Image_Region; + +/** + * @brief Defines the region of the image source to decode. + * + * @since 10 + * @version 2.0 + */ +struct Image_String { + /* * data for string type */ + char *format = nullptr; + /* * data lenth for string type */ + size_t size = 0; +}; + +/** + * @brief Defines the property string (in key-value format) of the image source. + * + * @since 10 + * @version 2.0 + */ +typedef Image_String Image_String; + +/** + * @brief Defines the image packing options. + * + * @since 10 + * @version 2.0 + */ +typedef Image_String Image_MimeType; + +/** + * @brief Enumerates the return values that may be used by the interface. + * + * @since 10 + * @version 2.0 + */ +typedef enum { + IMAGE_ERRORCODE_SUCCESS = 0, // Operation success + IMAGE_ERRORCODE_BAD_PARAMETER = -1, // Invalid parameter + IMAGE_ERRORCODE_IMAGE_ERRORCODE_BASE = IMAGE_ERRORCODE_BASE, // Operation failed + IMAGE_ERRORCODE_ERR_IPC = IMAGE_ERRORCODE_BASE + 1, // ipc error + IMAGE_ERRORCODE_ERR_SHAMEM_NOT_EXIST = IMAGE_ERRORCODE_BASE + 2, // sharememory error + IMAGE_ERRORCODE_ERR_SHAMEM_DATA_ABNORMAL = IMAGE_ERRORCODE_BASE + 3, // sharememory data abnormal + IMAGE_ERRORCODE_DECODE_ABNORMAL = IMAGE_ERRORCODE_BASE + 4, // image decode error + IMAGE_ERRORCODE_DATA_ABNORMAL = IMAGE_ERRORCODE_BASE + 5, // image input data error + IMAGE_ERRORCODE_MALLOC_ABNORMAL = IMAGE_ERRORCODE_BASE + 6, // image malloc error + IMAGE_ERRORCODE_DATA_UNSUPPORT = IMAGE_ERRORCODE_BASE + 7, // image type unsupported + IMAGE_ERRORCODE_INIT_ABNORMAL = IMAGE_ERRORCODE_BASE + 8, // image init error + IMAGE_ERRORCODE_GET_DATA_ABNORMAL = IMAGE_ERRORCODE_BASE + 9, // image get data error + IMAGE_ERRORCODE_TOO_LARGE = IMAGE_ERRORCODE_BASE + 10, // image data too large + IMAGE_ERRORCODE_TRANSFORM = IMAGE_ERRORCODE_BASE + 11, // image transform error + IMAGE_ERRORCODE_COLOR_CONVERT = IMAGE_ERRORCODE_BASE + 12, // image color convert error + IMAGE_ERRORCODE_CROP = IMAGE_ERRORCODE_BASE + 13, // crop error + IMAGE_ERRORCODE_SOURCE_DATA = IMAGE_ERRORCODE_BASE + 14, // image source data error + IMAGE_ERRORCODE_SOURCE_DATA_INCOMPLETE = IMAGE_ERRORCODE_BASE + 15, // image source data incomplete + IMAGE_ERRORCODE_MISMATCHED_FORMAT = IMAGE_ERRORCODE_BASE + 16, // image mismatched format + IMAGE_ERRORCODE_UNKNOWN_FORMAT = IMAGE_ERRORCODE_BASE + 17, // image unknown format + IMAGE_ERRORCODE_SOURCE_UNRESOLVED = IMAGE_ERRORCODE_BASE + 18, // image source unresolved + IMAGE_ERRORCODE_INVALID_PARAMETER = IMAGE_ERRORCODE_BASE + 19, // image invalid parameter + IMAGE_ERRORCODE_DECODE_FAILED = IMAGE_ERRORCODE_BASE + 20, // decode fail + IMAGE_ERRORCODE_PLUGIN_REGISTER_FAILED = IMAGE_ERRORCODE_BASE + 21, // register plugin fail + IMAGE_ERRORCODE_PLUGIN_CREATE_FAILED = IMAGE_ERRORCODE_BASE + 22, // create plugin fail + IMAGE_ERRORCODE_ENCODE_FAILED = IMAGE_ERRORCODE_BASE + 23, // image encode fail + IMAGE_ERRORCODE_ADD_PIXEL_MAP_FAILED = IMAGE_ERRORCODE_BASE + 24, // image add pixel map fail + IMAGE_ERRORCODE_HW_DECODE_UNSUPPORT = IMAGE_ERRORCODE_BASE + 25, // image hardware decode unsupported + IMAGE_ERRORCODE_DECODE_HEAD_ABNORMAL = IMAGE_ERRORCODE_BASE + 26, // image decode head error + IMAGE_ERRORCODE_DECODE_EXIF_UNSUPPORT = IMAGE_ERRORCODE_BASE + 27, // image decode exif unsupport + IMAGE_ERRORCODE_PROPERTY_NOT_EXIST = IMAGE_ERRORCODE_BASE + 28, // image property not exist + + IMAGE_ERRORCODE_MEDIA_DATA_UNSUPPORT = IMAGE_ERRORCODE_BASE + 30, // media type unsupported + IMAGE_ERRORCODE_MEDIA_TOO_LARGE = IMAGE_ERRORCODE_BASE + 31, // media data too large + IMAGE_ERRORCODE_MEDIA_MALLOC_FAILED = IMAGE_ERRORCODE_BASE + 32, // media malloc memory failed + IMAGE_ERRORCODE_MEDIA_END_OF_STREAM = IMAGE_ERRORCODE_BASE + 33, // media end of stream error + IMAGE_ERRORCODE_MEDIA_IO_ABNORMAL = IMAGE_ERRORCODE_BASE + 34, // media io error + IMAGE_ERRORCODE_MEDIA_MALFORMED = IMAGE_ERRORCODE_BASE + 35, // media malformed error + IMAGE_ERRORCODE_MEDIA_BUFFER_TOO_SMALL = IMAGE_ERRORCODE_BASE + 36, // media buffer too small error + IMAGE_ERRORCODE_MEDIA_OUT_OF_RANGE = IMAGE_ERRORCODE_BASE + 37, // media out of range error + IMAGE_ERRORCODE_MEDIA_STATUS_ABNORMAL = IMAGE_ERRORCODE_BASE + 38, // media status abnormal error + IMAGE_ERRORCODE_MEDIA_VALUE_INVALID = IMAGE_ERRORCODE_BASE + 39, // media value invalid + IMAGE_ERRORCODE_MEDIA_NULL_POINTER = IMAGE_ERRORCODE_BASE + 40, // media error operation + IMAGE_ERRORCODE_MEDIA_INVALID_OPERATION = IMAGE_ERRORCODE_BASE + 41, // media invalid operation + IMAGE_ERRORCODE_MEDIA_ERR_PLAYER_NOT_INIT = IMAGE_ERRORCODE_BASE + 42, // media init error + IMAGE_ERRORCODE_MEDIA_EARLY_PREPARE = IMAGE_ERRORCODE_BASE + 43, // media early prepare + IMAGE_ERRORCODE_MEDIA_SEEK_ERR = IMAGE_ERRORCODE_BASE + 44, // media rewind error + IMAGE_ERRORCODE_MEDIA_PERMISSION_DENIED = IMAGE_ERRORCODE_BASE + 45, // media permission denied + IMAGE_ERRORCODE_MEDIA_DEAD_OBJECT = IMAGE_ERRORCODE_BASE + 46, // media dead object + IMAGE_ERRORCODE_MEDIA_TIMED_OUT = IMAGE_ERRORCODE_BASE + 47, // media time out + IMAGE_ERRORCODE_MEDIA_TRACK_NOT_ALL_SUPPORTED = IMAGE_ERRORCODE_BASE + 48, // media track subset support + IMAGE_ERRORCODE_MEDIA_ADAPTER_INIT_FAILED = IMAGE_ERRORCODE_BASE + 49, // media recorder adapter init failed + IMAGE_ERRORCODE_MEDIA_WRITE_PARCEL_FAIL = IMAGE_ERRORCODE_BASE + 50, // write parcel failed + IMAGE_ERRORCODE_MEDIA_READ_PARCEL_FAIL = IMAGE_ERRORCODE_BASE + 51, // read parcel failed + IMAGE_ERRORCODE_MEDIA_NO_AVAIL_BUFFER = IMAGE_ERRORCODE_BASE + 52, // read parcel failed + IMAGE_ERRORCODE_MEDIA_INVALID_PARAM = IMAGE_ERRORCODE_BASE + 53, // media function found invalid param + IMAGE_ERRORCODE_MEDIA_CODEC_ADAPTER_NOT_EXIST = IMAGE_ERRORCODE_BASE + 54, // media zcodec adapter not init + IMAGE_ERRORCODE_MEDIA_CREATE_CODEC_ADAPTER_FAILED = IMAGE_ERRORCODE_BASE + 55, // media create zcodec adapter failed + IMAGE_ERRORCODE_MEDIA_CODEC_ADAPTER_NOT_INIT = IMAGE_ERRORCODE_BASE + 56, // media adapter inner not init + IMAGE_ERRORCODE_MEDIA_ZCODEC_CREATE_FAILED = IMAGE_ERRORCODE_BASE + 57, // media adapter inner not init + IMAGE_ERRORCODE_MEDIA_ZCODEC_NOT_EXIST = IMAGE_ERRORCODE_BASE + 58, // media zcodec not exist + IMAGE_ERRORCODE_MEDIA_JNI_CLASS_NOT_EXIST = IMAGE_ERRORCODE_BASE + 59, // media jni class not found + IMAGE_ERRORCODE_MEDIA_JNI_METHOD_NOT_EXIST = IMAGE_ERRORCODE_BASE + 60, // media jni method not found + IMAGE_ERRORCODE_MEDIA_JNI_NEW_OBJ_FAILED = IMAGE_ERRORCODE_BASE + 61, // media jni obj new failed + IMAGE_ERRORCODE_MEDIA_JNI_COMMON_ERROR = IMAGE_ERRORCODE_BASE + 62, // media jni normal error + IMAGE_ERRORCODE_MEDIA_DISTRIBUTE_NOT_SUPPORT = IMAGE_ERRORCODE_BASE + 63, // media distribute not support + IMAGE_ERRORCODE_MEDIA_SOURCE_NOT_SET = IMAGE_ERRORCODE_BASE + 64, // media source not set + IMAGE_ERRORCODE_MEDIA_RTSP_ADAPTER_NOT_INIT = IMAGE_ERRORCODE_BASE + 65, // media rtsp adapter not init + IMAGE_ERRORCODE_MEDIA_RTSP_ADAPTER_NOT_EXIST = IMAGE_ERRORCODE_BASE + 66, // media rtsp adapter not exist + IMAGE_ERRORCODE_MEDIA_RTSP_SURFACE_UNSUPPORTED = IMAGE_ERRORCODE_BASE + 67, // media rtsp surface unsupported + IMAGE_ERRORCODE_MEDIA_RTSP_CAPTURE_NOT_INIT = IMAGE_ERRORCODE_BASE + 68, // media rtsp capture init error + IMAGE_ERRORCODE_MEDIA_RTSP_SOURCE_URL_INVALID = IMAGE_ERRORCODE_BASE + 69, // media rtsp source url invalid + IMAGE_ERRORCODE_MEDIA_RTSP_VIDEO_TRACK_NOT_FOUND = IMAGE_ERRORCODE_BASE + 70, // media rtsp can't find video track + IMAGE_ERRORCODE_MEDIA_RTSP_CAMERA_NUM_REACH_MAX = IMAGE_ERRORCODE_BASE + 71, // rtsp camera num reach to max num + IMAGE_ERRORCODE_MEDIA_SET_VOLUME = IMAGE_ERRORCODE_BASE + 72, // media set volume error + IMAGE_ERRORCODE_MEDIA_NUMBER_OVERFLOW = IMAGE_ERRORCODE_BASE + 73, // media number operation overflow + IMAGE_ERRORCODE_MEDIA_DIS_PLAYER_UNSUPPORTED = IMAGE_ERRORCODE_BASE + 74, // media distribute player unsupporteded + IMAGE_ERRORCODE_MEDIA_DENCODE_ICC_FAILED = IMAGE_ERRORCODE_BASE + 75, // image dencode ICC fail + IMAGE_ERRORCODE_MEDIA_ENCODE_ICC_FAILED = IMAGE_ERRORCODE_BASE + 76, // image encode ICC fail + + IMAGE_ERRORCODE_MEDIA_READ_PIXELMAP_FAILED = IMAGE_ERRORCODE_BASE + 150, // read pixelmap failed + IMAGE_ERRORCODE_MEDIA_WRITE_PIXELMAP_FAILED = IMAGE_ERRORCODE_BASE + 151, // write pixelmap failed + IMAGE_ERRORCODE_MEDIA_PIXELMAP_NOT_ALLOW_MODIFY = IMAGE_ERRORCODE_BASE + 152, // pixelmap not allow modify + IMAGE_ERRORCODE_MEDIA_CONFIG_FAILED = IMAGE_ERRORCODE_BASE + 153, // config error + IMAGE_ERRORCODE_JNI_ENV_ABNORMAL = IMAGE_ERRORCODE_BASE + 154, // Abnormal JNI environment + IMAGE_ERRORCODE_SURFACE_GRALLOC_BUFFER_FAILED = IMAGE_ERRORCODE_BASE + 155, // surface gralloc buffer failed + IMAGE_ERRORCODE_CREATE_SURFACE_FAILED = IMAGE_ERRORCODE_BASE + 156, // create surface failed + IMAGE_ERRORCODE_SURFACE_GET_PARAMETER_FAILED = IMAGE_ERRORCODE_BASE + 157, // Failed to obtain parameters for surface + IMAGE_ERRORCODE_GET_SURFACE_FAILED = IMAGE_ERRORCODE_BASE + 158, // get sufrace failed + IMAGE_ERRORCODE_SURFACE_ACQUIRE_BUFFER_FAILED = IMAGE_ERRORCODE_BASE + 159, // Acquire Buffer failed + IMAGE_ERRORCODE_SURFACE_REQUEST_BUFFER_FAILED = IMAGE_ERRORCODE_BASE + 160, // request Buffer failed + IMAGE_ERRORCODE_REGISTER_LISTENER_FAILED = IMAGE_ERRORCODE_BASE + 161, // Failed to register listener + IMAGE_ERRORCODE_REGISTER_BUFFER_FAILED = IMAGE_ERRORCODE_BASE + 162, // Failed to register buffer + IMAGE_ERRORCODE_FREAD_FAILED = IMAGE_ERRORCODE_BASE + 163, // read file failed + IMAGE_ERRORCODE_PEEK_FAILED = IMAGE_ERRORCODE_BASE + 164, // peek file failed + IMAGE_ERRORCODE_SEEK_FAILED = IMAGE_ERRORCODE_BASE + 165, // seek file failed + IMAGE_ERRORCODE_STREAM_SIZE_ERROR = IMAGE_ERRORCODE_BASE + 166, // stream bad + IMAGE_ERRORCODE_FILE_FD_ERROR = IMAGE_ERRORCODE_BASE + 167, // file fd is bad + IMAGE_ERRORCODE_FILE_DAMAGED = IMAGE_ERRORCODE_BASE + 168, // file damaged + IMAGE_ERRORCODE_CREATE_DECODER_FAILED = IMAGE_ERRORCODE_BASE + 169, // create decoder failed + IMAGE_ERRORCODE_CREATE_ENCODER_FAILED = IMAGE_ERRORCODE_BASE + 170, // create encoder failed + IMAGE_ERRORCODE_CHECK_FORMAT_ERROR = IMAGE_ERRORCODE_BASE + 171, // check format failed + IMAGE_ERRORCODE_THIRDPART_SKIA_ERROR = IMAGE_ERRORCODE_BASE + 172, // skia error + IMAGE_ERRORCODE_HW_DECODE_FAILED = IMAGE_ERRORCODE_BASE + 173, // hard decode failed + IMAGE_ERRORCODE_ALLOCATER_TYPE_ERROR = IMAGE_ERRORCODE_BASE + 174, // hard decode failed + IMAGE_ERRORCODE_ALPHA_TYPE_ERROR = IMAGE_ERRORCODE_BASE + 175, // hard decode failed + IMAGE_ERRORCODE_INDEX_INVALID = IMAGE_ERRORCODE_BASE + 176, // invalid index + + IMAGE_ERRORCODE_MEDIA_UNKNOWN = IMAGE_ERRORCODE_BASE + 200, // media unknown error +} Image_ErrorCode; + +/** + * @brief Defines the mbp mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_BMP = "image/bmp"; + +/** + * @brief Defines the jpeg mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_JPEG = "image/jpeg"; + +/** + * @brief Defines the heic mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_HEIC = "image/heic"; + +/** + * @brief Defines the png mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_PNG = "image/png"; + +/** + * @brief Defines the webp mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_WEBP = "image/webp"; + +/** + * @brief Defines the gif mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_GIF = "image/gif"; + +/** + * @brief Defines the x-icon mime type. + * + * @since 10 + * @version 2.0 + */ +static const char *MIME_TYPE_ICON = "image/x-icon"; + +/** + * @brief Defines a pointer to bits per sample, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"; + +/** + * @brief Defines a pointer to the orientation, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"; + +/** + * @brief Defines a pointer to the image length, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"; + +/** + * @brief Defines a pointer to the image width, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"; + +/** + * @brief Defines a pointer to the GPS latitude, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"; + +/** + * @brief Defines a pointer to the GPS longitude, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"; + +/** + * @brief Defines a pointer to the GPS latitude reference information, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"; + +/** + * @brief Defines a pointer to the GPS longitude reference information, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"; + +/** + * @brief Defines a pointer to the created date and time, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"; + +/** + * @brief Defines a pointer to the exposure time, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"; + +/** + * @brief Defines a pointer to the scene type, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"; + +/** + * @brief Defines a pointer to the ISO speed ratings, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"; + +/** + * @brief Defines a pointer to the f-number of the image, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"; + +/** + * @brief Defines a pointer to the compressed bits per pixel, one of the image properties. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 10 + * @version 4.0 + */ +const char *OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"; + +/** + * @brief The scheme used for image compression. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_COMPRESSION = "Compression"; + +/** + * @brief Pixel composition, such as RGB or YCbCr. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_PHOTOMETRIC_INTERPRETATION = "PhotometricInterpretation"; + +/** + * @brief For each strip, the byte offset of that strip. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_STRIP_OFFSETS = "StripOffsets"; + +/** + * @brief The number of components per pixel. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SAMPLES_PER_PIXEL = "SamplesPerPixel"; + +/** + * @brief The number of rows per strip of image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_ROWS_PER_STRIP = "RowsPerStrip"; + +/** + * @brief The total number of bytes in each strip of image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_STRIP_BYTE_COUNTS = "StripByteCounts"; + +/** + * @brief The image resolution in the width direction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_X_RESOLUTION = "XResolution"; + +/** + * @brief The image resolution in the height direction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_Y_RESOLUTION = "YResolution"; + +/** + * @brief Indicates whether pixel components are recorded in a chunky or planar format. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_PLANAR_CONFIGURATION = "PlanarConfiguration"; + +/** + * @brief The unit used to measure XResolution and YResolution. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_RESOLUTION_UNIT = "ResolutionUnit"; + +/** + * @brief The transfer function for the image, typically used for color correction. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_TRANSFER_FUNCTION = "TransferFunction"; + +/** + * @brief The name and version of the software used to generate the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SOFTWARE = "Software"; + +/** + * @brief The name of the person who created the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_ARTIST = "Artist"; + +/** + * @brief The chromaticity of the white point of the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_WHITE_POINT = "WhitePoint"; + +/** + * @brief The chromaticity of the primary colors of the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_PRIMARY_CHROMATICITIES = "PrimaryChromaticities"; + +/** + * @brief The matrix coefficients for transformation from RGB to YCbCr image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_YCBCR_COEFFICIENTS = "YCbCrCoefficients"; + +/** + * @brief The sampling ratio of chrominance components to the luminance component. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_YCBCR_SUB_SAMPLING = "YCbCrSubSampling"; + +/** + * @brief The position of chrominance components in relation to the luminance component. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_YCBCR_POSITIONING = "YCbCrPositioning"; + +/** + * @brief The reference black point value and reference white point value. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_REFERENCE_BLACK_WHITE = "ReferenceBlackWhite"; + +/** + * @brief Copyright information for the image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_COPYRIGHT = "Copyright"; + +/** + * @brief The offset to the start byte (SOI) of JPEG compressed thumbnail data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT = "JPEGInterchangeFormat"; + +/** + * @brief The number of bytes of JPEG compressed thumbnail data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_JPEG_INTERCHANGE_FORMAT_LENGTH = "JPEGInterchangeFormatLength"; + +/** + * @brief The class of the program used by the camera to set exposure when the picture is taken. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_EXPOSURE_PROGRAM = "ExposureProgram"; + +/** + * @brief Indicates the spectral sensitivity of each channel of the camera used. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SPECTRAL_SENSITIVITY = "SpectralSensitivity"; + +/** + * @brief Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_OECF = "OECF"; + +/** + * @brief The version of the Exif standard supported. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_EXIF_VERSION = "ExifVersion"; + +/** + * @brief The date and time when the image was stored as digital data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_DATE_TIME_DIGITIZED = "DateTimeDigitized"; + +/** + * @brief Information specific to compressed data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_COMPONENTS_CONFIGURATION = "ComponentsConfiguration"; + +/** + * @brief The shutter speed, expressed as an APEX (Additive System of Photographic Exposure) value. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SHUTTER_SPEED = "ShutterSpeedValue"; + +/** + * @brief The brightness value of the image, in APEX units. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_BRIGHTNESS_VALUE = "BrightnessValue"; + +/** + * @brief The smallest F number of lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_MAX_APERTURE_VALUE = "MaxApertureValue"; + +/** + * @brief The distance to the subject, measured in meters. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE = "SubjectDistance"; + +/** + * @brief This tag indicate the location and area of the main subject in the overall scene. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBJECT_AREA = "SubjectArea"; + +/** + * @brief A tag for manufacturers of Exif/DCF writers to record any desired infomation. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_MAKER_NOTE = "MakerNote"; + +/** + * @brief A tag for record fractions of seconds for the DateTime tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME = "SubsecTime"; + +/** + * @brief A tag used to record fractions of seconds for the DateTimeOriginal tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_ORIGINAL = "SubsecTimeOriginal"; + +/** + * @brief A tag used to record fractions of seconds for the DateTimeDigitized tag. + * It is used in {@link OH_ImageSource_GetImageProperty} and { + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBSEC_TIME_DIGITIZED = "SubsecTimeDigitized"; + +/** + * @brief This tag denotes the Flashpix format version supported by an FPXR file, enhancing device compatibility. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FLASHPIX_VERSION = "FlashpixVersion"; + +/** + * @brief The color space information tag, often recorded as the color space specifier. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_COLOR_SPACE = "ColorSpace"; + +/** + * @brief The name of an audio file related to the image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_RELATED_SOUND_FILE = "RelatedSoundFile"; + +/** + * @brief Strobe energy at image capture, in BCPS. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FLASH_ENERGY = "FlashEnergy"; + +/** + * @brief Camera or input device spatial frequency table. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SPATIAL_FREQUENCY_RESPONSE = "SpatialFrequencyResponse"; + +/** + * @brief Pixels per FocalPlaneResolutionUnit in the image width. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_X_RESOLUTION = "FocalPlaneXResolution"; + +/** + * @brief Pixels per FocalPlaneResolutionUnit in the image height. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_Y_RESOLUTION = "FocalPlaneYResolution"; + +/** + * @brief Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FOCAL_PLANE_RESOLUTION_UNIT = "FocalPlaneResolutionUnit"; + +/** + * @brief Location of the main subject, relative to the left edge. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBJECT_LOCATION = "SubjectLocation"; + +/** + * @brief Selected exposure index at capture. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_EXPOSURE_INDEX = "ExposureIndex"; + +/** + * @brief Image sensor type on the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SENSING_METHOD = "SensingMethod"; + +/** + * @brief Indicates the image source. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FILE_SOURCE = "FileSource"; + +/** + * @brief Color filter array (CFA) geometric pattern of the image sensor. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_CFA_PATTERN = "CFAPattern"; + +/** + * @brief Indicates special processing on image data. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_CUSTOM_RENDERED = "CustomRendered"; + +/** + * @brief Exposure mode set when the image was shot. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_EXPOSURE_MODE = "ExposureMode"; + +/** + * @brief Digital zoom ratio at the time of capture. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio"; + +/** + * @brief Type of scene captured. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SCENE_CAPTURE_TYPE = "SceneCaptureType"; + +/** + * @brief Degree of overall image gain adjustment. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GAIN_CONTROL = "GainControl"; + +/** + * @brief Direction of contrast processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_CONTRAST = "Contrast"; + +/** + * @brief Direction of saturation processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SATURATION = "Saturation"; + +/** + * @brief The direction of sharpness processing applied by the camera. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SHARPNESS = "Sharpness"; + +/** + * @brief Information on picture-taking conditions for a specific camera model. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_DEVICE_SETTING_DESCRIPTION = "DeviceSettingDescription"; + +/** + * @brief Indicates the distance range to the subject. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBJECT_DISTANCE_RANGE = "SubjectDistanceRange"; + +/** + * @brief An identifier uniquely assigned to each image. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_IMAGE_UNIQUE_ID = "ImageUniqueID"; + +/** + * @brief The version of the GPSInfoIFD. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_VERSION_ID = "GPSVersionID"; + +/** + * @brief Reference altitude used for GPS altitude. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE_REF = "GPSAltitudeRef"; + +/** + * @brief The altitude based on the reference in GPSAltitudeRef. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_ALTITUDE = "GPSAltitude"; + +/** + * @brief The GPS satellites used for measurements. + * Used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_SATELLITES = "GPSSatellites"; + +/** + * @brief The status of the GPS receiver when the image is recorded. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_STATUS = "GPSStatus"; + +/** + * @brief The GPS measurement mode. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_MEASURE_MODE = "GPSMeasureMode"; + +/** + * @brief The GPS DOP (data degree of precision). + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DOP = "GPSDOP"; + +/** + * @brief The unit used to express the GPS receiver speed of movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_SPEED_REF = "GPSSpeedRef"; + +/** + * @brief The speed of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_SPEED = "GPSSpeed"; + +/** + * @brief The reference for giving the direction of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_TRACK_REF = "GPSTrackRef"; + +/** + * @brief The direction of GPS receiver movement. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_TRACK = "GPSTrack"; + +/** + * @brief The reference for the image's direction. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION_REF = "GPSImgDirectionRef"; + +/** + * @brief The direction of the image when captured. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_IMG_DIRECTION = "GPSImgDirection"; + +/** + * @brief Geodetic survey data used by the GPS receiver. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_MAP_DATUM = "GPSMapDatum"; + +/** + * @brief Indicates the latitude reference of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE_REF = "GPSDestLatitudeRef"; + +/** + * @brief The latitude of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LATITUDE = "GPSDestLatitude"; + +/** + * @brief Indicates the longitude reference of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE_REF = "GPSDestLongitudeRef"; + +/** + * @brief A character string recording the name of the method used for location finding. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_PROCESSING_METHOD = "GPSProcessingMethod"; + +/** + * @brief A character string recording the name of the GPS area. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_AREA_INFORMATION = "GPSAreaInformation"; + +/** + * @brief This field denotes if differential correction was applied to GPS data, crucial for precise location accuracy. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DIFFERENTIAL = "GPSDifferential"; + +/** + * @brief The serial number of the camera body. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_BODY_SERIAL_NUMBER = "BodySerialNumber"; + +/** + * @brief The name of the camera owner. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_CAMERA_OWNER_NAME = "CameraOwnerName"; + +/** + * @brief The name of the camera owner. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_COMPOSITE_IMAGE = "CompositeImage"; + +/** + * @brief The DNGVersion tag encodes the four-tier version number for DNG specification compliance. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_DNG_VERSION = "DNGVersion"; + +/** + * @brief The longitude of the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_LONGITUDE = "GPSDestLongitude"; + +/** + * @brief The reference for the bearing to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING_REF = "GPSDestBearingRef"; + +/** + * @brief The bearing to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_BEARING = "GPSDestBearing"; + +/** + * @brief The measurement unit for the distance to the target point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE_REF = "GPSDestDistanceRef"; + +/** + * @brief The distance to the destination point. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_DEST_DISTANCE = "GPSDestDistance"; + +/** + * @brief DefaultCropSize specifies the final image size in raw coordinates, accounting for extra edge pixels. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_DEFAULT_CROP_SIZE = "DefaultCropSize"; + +/** + * @brief Indicates the value of coefficient gamma. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GAMMA = "Gamma"; + +/** + * @brief The tag indicate the ISO speed latitude yyy value of the camera or input device that is defined in ISO 12232. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDE_YYY = "ISOSpeedLatitudeyyy"; + +/** + * @brief The tag indicate the ISO speed latitude zzz value of the camera or input device that is defined in ISO 12232. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_ISO_SPEED_LATITUDE_ZZZ = "ISOSpeedLatitudezzz"; + +/** + * @brief The manufacturer of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_LENS_MAKE = "LensMake"; + +/** + * @brief The model name of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_LENS_MODEL = "LensModel"; + +/** + * @brief The serial number of the lens. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_LENS_SERIAL_NUMBER = "LensSerialNumber"; + +/** + * @brief Specifications of the lens used. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_LENS_SPECIFICATION = "LensSpecification"; + +/** + * @brief This tag provides a broad description of the data type in this subfile. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_NEW_SUBFILE_TYPE = "NewSubfileType"; + +/** + * @brief This tag records the UTC offset for the DateTime tag, ensuring accurate timestamps regardless of location. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME = "OffsetTime"; + +/** + * @brief This tag logs the UTC offset when the image was digitized, aiding in accurate timestamp adjustment. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_DIGITIZED = "OffsetTimeDigitized"; + +/** + * @brief This tag records the UTC offset when the original image was created, crucial for time-sensitive applications. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_OFFSET_TIME_ORIGINAL = "OffsetTimeOriginal"; + +/** + * @brief Exposure times of source images for a composite image. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE = "SourceExposureTimesOfCompositeImage"; + +/** + * @brief The number of source images used for a composite image. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE = "SourceImageNumberOfCompositeImage"; + +/** + * @brief This deprecated field signifies the type of data in this subfile. Use the NewSubfileType field instead. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SUBFILE_TYPE = "SubfileType"; + +/** + * @brief This tag indicates horizontal positioning errors in meters. + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_GPS_H_POSITIONING_ERROR = "GPSHPositioningError"; + +/** + * This tag indicates the sensitivity of the camera or input device when the image was shot. + * + * @syscap SystemCapability.Multimedia.Image.Core + * @crossplatform + * @since 12 + */ +const char *OHOS_IMAGE_PROPERTY_PHOTOGRAPHIC_SENSITIVITY = "PhotographicSensitivity"; + +/** + * @brief Burst Number + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_BURST_NUMBER = "HwMnoteBurstNumber"; + +/** + * @brief Face Conf + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_CONF = "HwMnoteFaceConf"; + +/** + * @brief Face Leye Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_LEYE_CENTER = "HwMnoteFaceLeyeCenter"; + +/** + * @brief Face Mouth Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_MOUTH_CENTER = "HwMnoteFaceMouthCenter"; + +/** + * @brief Face Pointer + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_POINTER = "HwMnoteFacePointer"; + +/** + * @brief Face Rect + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_RECT = "HwMnoteFaceRect"; + +/** + * @brief Face Reye Center + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_REYE_CENTER = "HwMnoteFaceReyeCenter"; + +/** + * @brief Face Smile Score + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_SMILE_SCORE = "HwMnoteFaceSmileScore"; + +/** + * @brief Face Version + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FACE_VERSION = "HwMnoteFaceVersion"; + +/** + * @brief Front Camera + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_FRONT_CAMERA = "HwMnoteFrontCamera"; + +/** + * @brief Scene Pointer + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SCENE_POINTER = "HwMnoteScenePointer"; + +/** + * @brief Scene Version + * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * + * @syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +const char *OHOS_IMAGE_PROPERTY_SCENE_VERSION = "HwMnoteSceneVersion"; + +#ifdef __cplusplus +}; +#endif +/* * @} */ + + +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_COMMON_H_ \ No newline at end of file diff --git a/multimedia/image_framework/include/image/image_receiver.h b/multimedia/image_framework/include/image/image_receiver.h new file mode 100644 index 000000000..faa7caae5 --- /dev/null +++ b/multimedia/image_framework/include/image/image_receiver.h @@ -0,0 +1,302 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup image + * @{ + * + * @brief Provides APIs for obtaining image data. + * + * @Syscap SystemCapability.Multimedia.Image.ImageReceiver + * @since 12 + */ + +/** + * @file image_receiver.h + * + * @brief Declares the APIs for obtaining image data. + * Need link libimage_native.z.so and libimage.z.so + * @since 12 + */ + +#ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_RECEIVER_H +#define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_RECEIVER_H + +#include "image.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines an OH_ImageReceiver object. + * + * @since 12 + */ +struct OH_ImageReceiver; + +/** + * @brief Defines the data type name of a native image receiver. + * + * @since 12 + */ +typedef struct OH_ImageReceiver OH_ImageReceiver; + +/** + * @brief Defines an image receiver options object. + * + * @since 12 + */ +struct OH_ImageReceiverOptions; + +/** + * @brief Defines the data type name of a native image receiver info. + * + * @since 12 + */ +typedef struct OH_ImageReceiverOptions OH_ImageReceiverOptions; + +/** + * @brief Defines the callbacks for images. + * + * @since 12 + */ +typedef void (*OH_Image_Receiver_On_Callback)(OH_ImageReceiver* receiver); + +/** + * @brief Creates an OH_ImageReceiverOptions object at the application layer. + * + * @param options Indicates the pointer to the OH_ImageReceiverOptions object obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MALLOC_ABNORMAL - if malloc failed. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_CreateImageReceiverOptions(OH_ImageReceiverOptions** options); + +/** + * @brief Get size of an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param size Indicates the value of the {@link Image_Size} object seted. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsGetSize(OH_ImageReceiverOptions* options, Image_Size* size); + +/** + * @brief Set size of an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param size Indicates the value of the {@link Image_Size} object seted. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsSetSize(OH_ImageReceiverOptions* options, Image_Size size); + +/** + * @brief Get format from an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param format Indicates the pointer to the format obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsGetFormat(OH_ImageReceiverOptions* options, int32_t* format); + +/** + * @brief Set format of an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param format Indicates the value of format seted. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsSetFormat(OH_ImageReceiverOptions* options, int32_t format); + +/** + * @brief Get capacity from an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param capacity Indicates the pointer to capacity obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsGetCapacity(OH_ImageReceiverOptions* options, int32_t* capacity); + +/** + * @brief Set capacity of an {@link OH_ImageReceiverOptions} object. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @param capacity Indicates the value of capacity seted. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ImageReceiverOptionsSetCapacity(OH_ImageReceiverOptions* options, int32_t capacity); + +/** + * @brief Releases an {@link OH_ImageReceiverOptions} object. + * It is used to release the object {@link OH_ImageReceiverOptions}. + * + * @param options Indicates the pointer to an {@link OH_ImageReceiverOptions} object. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiverOptions + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ReleaseImageReceiverOptions(OH_ImageReceiverOptions* options); + +/** + * @brief Creates an OH_ImageReceiver object at the application layer. + * + * @param options Indicates the options for setting the OH_ImageReceiver object. + * @param receiver Indicates the pointer to the OH_ImageReceiver object obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MALLOC_ABNORMAL - if malloc failed. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_GET_DATA_ABNORMAL - if get data failed. + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_Create(OH_ImageReceiverOptions* options, OH_ImageReceiver** receiver); + +/** + * @brief Obtains the receiver ID through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param surfaceId Indicates the pointer to the buffer that stores the ID string obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_GET_DATA_ABNORMAL - if get data failed. + * @see OH_ImageReceiver + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_GetReceivingSurfaceId(OH_ImageReceiver* receiver, uint64_t* surfaceId); + +/** + * @brief Obtains the latest image through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param image Indicates the pointer to an OH_Image object at the application layer. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_GET_DATA_ABNORMAL - if get data failed. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MALLOC_ABNORMAL - if malloc failed. + * @see OH_ImageReceiver, OH_Image + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ReadLatestImage(OH_ImageReceiver* receiver, OH_Image** image); + +/** + * @brief Obtains the next image through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param image Indicates the pointer to an OH_Image object at the application layer. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_GET_DATA_ABNORMAL - if get data failed. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_MALLOC_ABNORMAL - if malloc failed. + * @see OH_ImageReceiver, OH_Image + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_ReadNextImage(OH_ImageReceiver* receiver, OH_Image** image); + +/** + * @brief Registers an {@link OH_Image_Receiver_On_Callback} callback event. + * + * This callback event is triggered whenever a new image is received. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param callback Indicates the {@link OH_Image_Receiver_On_Callback} callback event to register. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver, OH_Image_Receiver_On_Callback + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_On(OH_ImageReceiver* receiver, OH_Image_Receiver_On_Callback callback); + +/** + * @brief Unregisters the {@link OH_Image_Receiver_On_Callback} callback event. + * + * This callback event is triggered whenever the image is shutdown. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver, OH_ImageReceiver2_On + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_Off(OH_ImageReceiver* receiver); + +/** + * @brief Obtains the size of the image receiver through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param size Indicates the pointer to the {@link Image_Size} object obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver, Image_Size + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_GetSize(OH_ImageReceiver* receiver, Image_Size* size); + +/** + * @brief Obtains the capacity of the image receiver through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param capacity Indicates the pointer to the capacity obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_GetCapacity(OH_ImageReceiver* receiver, int32_t* capacity); + +/** + * @brief Obtains the format of the image receiver through an {@link OH_ImageReceiver} object. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @param format Indicates the pointer to the format obtained. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_GetFormat(OH_ImageReceiver* receiver, int32_t* format); + +/** + * @brief Releases an {@link OH_ImageReceiver} object. + * + * This API is not used to release an ImageReceiver2 object at the application layer. + * + * @param receiver Indicates the pointer to an {@link OH_ImageReceiver} object. + * @return Returns {@link Image_ErrorCode} IMAGE_ERRORCODE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_ERRORCODE_INVALID_PARAMETER - if invalid parameter. + * @see OH_ImageReceiver + * @since 12 + */ +Image_ErrorCode OH_ImageReceiver2_Release(OH_ImageReceiver* receiver); + +#ifdef __cplusplus +}; +#endif +/** @} */ + +#endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_RECEIVER_H diff --git a/multimedia/image_framework/libimage_receiver.ndk.json b/multimedia/image_framework/libimage_receiver.ndk.json new file mode 100644 index 000000000..a488f515d --- /dev/null +++ b/multimedia/image_framework/libimage_receiver.ndk.json @@ -0,0 +1,74 @@ +[ + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_CreateImageReceiverOptions" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsGetSize" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsSetSize" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsGetFormat" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsSetFormat" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsGetCapacity" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ImageReceiverOptionsSetCapacity" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ReleaseImageReceiverOptions" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_Create" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_GetReceivingSurfaceId" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ReadLatestImage" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_ReadNextImage" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_On" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_Off" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_GetSize" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_GetCapacity" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_GetFormat" + }, + { + "first_introduced": "12", + "name": "OH_ImageReceiver2_Release" + } +] diff --git a/multimedia/image_framework/libohimage.ndk.json b/multimedia/image_framework/libohimage.ndk.json new file mode 100644 index 000000000..8083e09d6 --- /dev/null +++ b/multimedia/image_framework/libohimage.ndk.json @@ -0,0 +1,34 @@ +[ + { + "first_introduced": "12", + "name": "OH_Image2_GetImageSize" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetFormat" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetComponentTypes" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetByteBuffer" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetBufferSize" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetRowStride" + }, + { + "first_introduced": "12", + "name": "OH_Image2_GetPixelStride" + }, + { + "first_introduced": "12", + "name": "OH_Image2_Release" + } +] -- Gitee