1 /* 2 * Copyright (c) 2021 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_HSTREAM_CAPTURE_PROXY_H 17 #define OHOS_CAMERA_HSTREAM_CAPTURE_PROXY_H 18 19 #include "istream_capture.h" 20 #include "iremote_proxy.h" 21 22 namespace OHOS { 23 namespace CameraStandard { 24 class HStreamCaptureProxy : public IRemoteProxy<IStreamCapture> { 25 public: 26 explicit HStreamCaptureProxy(const sptr<IRemoteObject> &impl); 27 28 virtual ~HStreamCaptureProxy() = default; 29 30 int32_t Capture(const std::shared_ptr<OHOS::Camera::CameraMetadata> &captureSettings) override; 31 32 int32_t CancelCapture() override; 33 34 int32_t ConfirmCapture() override; 35 36 int32_t Release() override; 37 38 int32_t SetCallback(sptr<IStreamCaptureCallback> &callback) override; 39 40 int32_t UnSetCallback() override; 41 42 int32_t SetThumbnail(bool isEnabled, const sptr<OHOS::IBufferProducer> &producer) override; 43 44 int32_t EnableRawDelivery(bool enabled) override; 45 46 int32_t EnableMovingPhoto(bool enabled) override; 47 48 int32_t SetBufferProducerInfo(const std::string bufName, const sptr<OHOS::IBufferProducer> &producer) override; 49 50 int32_t DeferImageDeliveryFor(int32_t type) override; 51 52 int32_t IsDeferredPhotoEnabled() override; 53 54 int32_t IsDeferredVideoEnabled() override; 55 56 int32_t SetMovingPhotoVideoCodecType(int32_t videoCodecType) override; 57 58 int32_t SetCameraPhotoRotation(bool isEnable) override; 59 60 int32_t UpdateMediaLibraryPhotoAssetProxy(sptr<CameraPhotoProxy> photoProxy) override; 61 62 int32_t AcquireBufferToPrepareProxy(int32_t captureId) override; 63 64 int32_t EnableOfflinePhoto(bool isEnable) override; 65 66 int32_t CreateMediaLibrary(sptr<CameraPhotoProxy> &photoProxy, 67 std::string &uri, int32_t &cameraShotType, std::string &burstKey, int64_t timestamp) override; 68 69 int32_t CreateMediaLibrary(std::shared_ptr<PictureIntf> picture, sptr<CameraPhotoProxy> &photoProxy, 70 std::string &uri, int32_t &cameraShotType, std::string &burstKey, int64_t timestamp) override; 71 72 private: 73 static inline BrokerDelegator<HStreamCaptureProxy> delegator_; 74 }; 75 } // namespace CameraStandard 76 } // namespace OHOS 77 #endif // OHOS_CAMERA_HSTREAM_CAPTURE_PROXY_H 78