1 /* 2 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_CAMERA_FWK_METADATA_UTILS_H 17 #define OHOS_CAMERA_FWK_METADATA_UTILS_H 18 19 #include <memory> 20 21 #include "camera_metadata_info.h" 22 #include "metadata_utils.h" 23 24 namespace OHOS { 25 namespace CameraStandard { 26 namespace CameraFwkMetadataUtils { 27 28 bool MergeMetadata(const std::shared_ptr<OHOS::Camera::CameraMetadata> srcMetadata, 29 std::shared_ptr<OHOS::Camera::CameraMetadata> dstMetadata); 30 31 std::shared_ptr<OHOS::Camera::CameraMetadata> CopyMetadata( 32 const std::shared_ptr<OHOS::Camera::CameraMetadata> srcMetadata); 33 34 bool UpdateMetadataTag( 35 const camera_metadata_item_t& srcItem, std::shared_ptr<OHOS::Camera::CameraMetadata> dstMetadata); 36 37 void DumpMetadataInfo(const std::shared_ptr<OHOS::Camera::CameraMetadata> srcMetadata); 38 39 void DumpMetadataItemInfo(const camera_metadata_item_t& item); 40 41 std::shared_ptr<OHOS::Camera::CameraMetadata> RecreateMetadata( 42 const std::shared_ptr<OHOS::Camera::CameraMetadata> metadata); 43 44 void LogFormatCameraMetadata(const std::shared_ptr<OHOS::Camera::CameraMetadata> metadata); 45 } // namespace CameraFwkMetadataUtils 46 } // namespace CameraStandard 47 } // namespace OHOS 48 49 #endif // OHOS_CAMERA_METADATA_UTILS_H