1 /* 2 * Copyright (c) 2025 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_PICTURE_INTERFACE_H 17 #define OHOS_CAMERA_PICTURE_INTERFACE_H 18 #include "parcel.h" 19 #include "surface_buffer.h" 20 /** 21 * @brief Internal usage only, for camera framework interacts with photo asset related interfaces. 22 * @since 12 23 */ 24 namespace OHOS::CameraStandard { 25 26 enum class CameraAuxiliaryPictureType { 27 NONE = 0, 28 GAINMAP = 1, 29 DEPTH_MAP = 2, 30 UNREFOCUS_MAP = 3, 31 LINEAR_MAP = 4, 32 FRAGMENT_MAP = 5, 33 }; 34 35 class PictureIntf : public Parcelable { 36 public: 37 virtual ~PictureIntf() = default; 38 virtual void Create(sptr<SurfaceBuffer> &surfaceBuffer) = 0; 39 virtual void SetAuxiliaryPicture(sptr<SurfaceBuffer> &surfaceBuffer, 40 CameraAuxiliaryPictureType type) = 0; 41 virtual void CreateWithDeepCopySurfaceBuffer(sptr<SurfaceBuffer> &surfaceBuffer) = 0; Unmarshalling(Parcel & data)42 static PictureIntf* Unmarshalling(Parcel &data) 43 { 44 return nullptr; 45 } 46 virtual void UnmarshallingPicture(Parcel &data) = 0; 47 virtual int32_t SetExifMetadata(sptr<SurfaceBuffer> &surfaceBuffer) = 0; 48 virtual bool SetMaintenanceData(sptr<SurfaceBuffer> &surfaceBuffer) = 0; 49 virtual void RotatePicture() = 0; 50 }; 51 typedef PictureIntf* (*GetPictureAdapter)(); 52 } // namespace OHOS::CameraStandard 53 #endif