diff --git a/camera/bundle.json b/camera/bundle.json index d1d704593a6bbcb9c3accc0054e1b5c59282fc9c..13b66e2b5d3df1394d0b0eb8c4236a961c7ba758 100644 --- a/camera/bundle.json +++ b/camera/bundle.json @@ -183,7 +183,8 @@ "camera_metadata_item_info.h", "camera_metadata_operator.h", "metadata_log.h", - "metadata_utils.h" + "metadata_utils.h", + "video_key_info.h" ], "header_base": "//drivers/interface/camera/metadata/include" } diff --git a/camera/metadata/include/video_key_info.h b/camera/metadata/include/video_key_info.h new file mode 100644 index 0000000000000000000000000000000000000000..bb3b093eb00547f4fca66e219ff384e1fe8e4f1b --- /dev/null +++ b/camera/metadata/include/video_key_info.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file video_key_info.h + * + * @brief Declares the key-value pairs used to record key information of a video frame. + * + * @since 1.0 + * @version 1.0 + */ + +#ifndef VIDEO_KEY_INFO_H +#define VIDEO_KEY_INFO_H + +#include + +namespace OHOS::Camera { +/** + * @brief Indicates the data length. The value type is int32_t. + */ +const std::string dataSize = "dataSize"; +const std::string dataWidth = "dataWidth"; +const std::string dataHeight = "dataHeight"; +const int32_t VIDEO_KEY_INFO_DATA_SIZE = 0x01; + +/** + * @brief Indicates the timestamp, in nanoseconds. The value type is int64_t. + */ +const std::string timeStamp = "timeStamp"; +const int32_t VIDEO_KEY_INFO_TIMESTAMP = 0x02; + +/** + * @brief Specifies whether the frame is a key frame. + * The value type is int32_t. The value 1 means that the frame is a key frame, and 0 means the opposite. + */ +const std::string isKeyFrame = "isKeyFrame"; +const int32_t VIDEO_KEY_INFO_IS_KEY_FRAME = 0x03; + +/** + * @brief Indicates the stream id corresponding to the image data. The value type is int32_t. + */ +const std::string streamId = "streamId"; +const int32_t VIDEO_KEY_STREAM_ID = 0x04; + +/** + * @brief Indicates the capture id corresponding to the image data. The value type is int32_t. + */ +const std::string captureId = "captureId"; +const int32_t VIDEO_KEY_CAPTRUE_ID = 0x05; + +/** + * @brief Specifies whether the image is a degraded image. The value type is int32_t. + * The value 1 means that the image is a degraded image, and 0 means the opposite. + */ +const std::string isDegradedImage = "isDegradedImage"; +const int32_t VIDEO_KEY_IS_DEGRADED_IMAGE = 0x06; + +/** + * @brief Indicates the image id corresponding to the image data. The value type is int32_t. + */ +const std::string imageId = "imageId"; +const int32_t VIDEO_KEY_IMAGE_ID = 0x07; + +/** + * @brief Indicates the type of to the deferred processing. + * The value type is int32_t. The value 1 means that breakgound process, and 0 means offline process. + */ +const std::string deferredProcessingType = "deferredProcessingType"; +const int32_t VIDEO_KEY_DEFERRED_PROCESSING_TYPE = 0x08; + +/** + * @brief Indicates the continuous shooting effect score. The value type is int32_t. + */ +const std::string imageScore = "imageScore"; +const int32_t VIDEO_KEY_IMAGE_SCORE = 0x09; + +/** + * @brief Indicates the continuous fromat of image. The value type is int32_t. + * 0 rgba; 1:jpg; 2:heif + */ +const std::string deferredImageFormat = "deferredImageFormat"; +const int32_t VIDEO_KEY_DEFERRED_IMAGE_FORMAT = 0x0A; + +/** + * @brief Indicates the count of image. The value type is int32_t. + * include main image and extend images + */ +const std::string imageCount = "imageCount"; +const int32_t VIDEO_KEY_DEFEREED_COUNT = 0x0B; + +/** + * @brief Indicates the quality level of depth data. The value type is int32_t. + */ +const std::string depthDataQualityLevel = "depthDataQualityLevel"; +const int32_t VIDEO_KEY_DEPTH_DATA_QUALITY_LEVEL = 0x0C; + +/** + * @brief Indicates the sequenceId of capture. The value type is int32_t. + */ +const std::string burstSequenceId = "burstSequenceId"; +const int32_t VIDEO_KEY_BURST_SEQUENCE_ID = 0x0D; + +/** + * @brief Indicates the sequenceId of cloud image enhance flag. The value type is bool. + */ +const std::string cloudImageEnhanceFlag = "cloudImageEnhanceFlag"; +const int32_t VIDEO_KEY_BURST_CLOUD_IMAGE_ENHANCE_FLAG = 0x0E; + +/** + * @brief Indicates the rotation of thumbnail. The value type is int32_t. + */ +const std::string dataRotation = "dataRotation"; +const int32_t VIDEO_KEY_THUMBNAIL_ROTATION = 0x0F; + +/** + * @brief Indicates the stride of thumbnail. The value type is int32_t. + */ +const std::string dataStride = "dataStride"; +const int32_t VIDEO_KEY_THUMBNAIL_STRIDE = 0x10; + +} // end namespace OHOS::Camera +#endif