1 /*
2  * Copyright (c) 2021-2022 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_ISTREAM_REPEAT_H
17 #define OHOS_CAMERA_ISTREAM_REPEAT_H
18 
19 #include <cstdint>
20 #include "istream_common.h"
21 #include "istream_repeat_callback.h"
22 #include "surface.h"
23 
24 namespace OHOS {
25 namespace CameraStandard {
26 class IStreamRepeat : public IStreamCommon {
27 public:
28     virtual int32_t Start() = 0;
29 
30     virtual int32_t Stop() = 0;
31 
32     virtual int32_t SetCallback(sptr<IStreamRepeatCallback>& callback) = 0;
33 
34     virtual int32_t Release() = 0;
35 
36     virtual int32_t AddDeferredSurface(const sptr<OHOS::IBufferProducer>& producer) = 0;
37 
38     virtual int32_t ForkSketchStreamRepeat(
39         int32_t width, int32_t height, sptr<IStreamRepeat>& sketchStream, float sketchRatio) = 0;
40 
41     virtual int32_t UpdateSketchRatio(float sketchRatio) = 0;
42 
43     virtual int32_t RemoveSketchStreamRepeat() = 0;
44 
45     virtual int32_t SetFrameRate(int32_t minFrameRate, int32_t maxFrameRate) = 0;
46 
47     virtual int32_t SetCameraRotation(bool isEnable, int32_t rotation) = 0;
48 
49     virtual int32_t SetCameraApi(uint32_t apiCompatibleVersion) = 0;
50 
51     virtual int32_t EnableSecure(bool isEnable = false) = 0;
52 
53     virtual int32_t SetMirror(bool isEnable) = 0;
54 
55     virtual int32_t AttachMetaSurface(const sptr<OHOS::IBufferProducer>& producer, int32_t videoMetaType) = 0;
56 
57     DECLARE_INTERFACE_DESCRIPTOR(u"IStreamRepeat");
58 };
59 } // namespace CameraStandard
60 } // namespace OHOS
61 #endif // OHOS_CAMERA_ISTREAM_REPEAT_H
62