1 /* 2 * Copyright (c) 2024-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_PHOTO_PROXY_H 17 #define OHOS_CAMERA_PHOTO_PROXY_H 18 19 #include "message_parcel.h" 20 #include "surface.h" 21 22 namespace OHOS { 23 namespace CameraStandard { 24 25 class CameraPhotoProxy : public RefBase { 26 public: 27 CameraPhotoProxy(); 28 CameraPhotoProxy(BufferHandle* bufferHandle, int32_t format, int32_t photoWidth, 29 int32_t photoHeight, bool isHighQuality, int32_t captureId); 30 CameraPhotoProxy(BufferHandle* bufferHandle, int32_t format, int32_t photoWidth, 31 int32_t photoHeight, bool isHighQuality, int32_t captureId, int32_t burstSeqId); 32 virtual ~CameraPhotoProxy(); 33 void ReadFromParcel(MessageParcel &parcel); 34 void WriteToParcel(MessageParcel &parcel); 35 void SetDeferredAttrs(std::string photoId, int32_t deferredProcType, uint64_t fileSize, int32_t imageFormat); 36 void SetLocation(double latitude, double longitude); 37 int32_t CameraFreeBufferHandle(); 38 39 BufferHandle* bufferHandle_; 40 int32_t format_; 41 int32_t photoWidth_; 42 int32_t photoHeight_; 43 size_t fileSize_; 44 bool isHighQuality_; 45 std::mutex mutex_; 46 std::string photoId_; 47 int32_t deferredProcType_; 48 int32_t isDeferredPhoto_; 49 double latitude_; 50 double longitude_; 51 int32_t captureId_; 52 int32_t burstSeqId_; 53 sptr<Surface> photoSurface_; 54 int32_t imageFormat_; 55 }; 56 } // namespace CameraStandard 57 } // namespace OHOS 58 #endif // OHOS_CAMERA_DEFERRED_PHOTO_PROXY_H