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_REPEAT_PROXY_H
17 #define OHOS_CAMERA_HSTREAM_REPEAT_PROXY_H
18 
19 #include "iremote_proxy.h"
20 #include "istream_repeat.h"
21 
22 namespace OHOS {
23 namespace CameraStandard {
24 class HStreamRepeatProxy : public IRemoteProxy<IStreamRepeat> {
25 public:
26     explicit HStreamRepeatProxy(const sptr<IRemoteObject>& impl);
27     virtual ~HStreamRepeatProxy();
28 
29     int32_t Start() override;
30 
31     int32_t Stop() override;
32 
33     int32_t SetCallback(sptr<IStreamRepeatCallback>& callback) override;
34 
35     int32_t Release() override;
36 
37     int32_t AddDeferredSurface(const sptr<OHOS::IBufferProducer>& producer) override;
38 
39     int32_t ForkSketchStreamRepeat(
40         int32_t width, int32_t height, sptr<IStreamRepeat>& sketchStream, float sketchRatio) override;
41 
42     int32_t UpdateSketchRatio(float sketchRatio) override;
43 
44     int32_t RemoveSketchStreamRepeat() override;
45 
46     int32_t SetFrameRate(int32_t minFrameRate, int32_t maxFrameRate) override;
47 
48     int32_t SetCameraRotation(bool isEnable, int32_t rotation) override;
49 
50     int32_t SetCameraApi(uint32_t apiCompatibleVersion) override;
51 
52     int32_t EnableSecure(bool isEnable = false) override;
53 
54     int32_t SetMirror(bool isEnable) override;
55 
56     int32_t AttachMetaSurface(const sptr<OHOS::IBufferProducer>& producer, int32_t videoMetaType) override;
57 
58 private:
59     static inline BrokerDelegator<HStreamRepeatProxy> delegator_;
60 };
61 } // namespace CameraStandard
62 } // namespace OHOS
63 #endif // OHOS_CAMERA_HSTREAM_REPEAT_PROXY_H
64