1 /*
2  * Copyright (c) 2023-2023 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_VIDEO_OUTPUT_IMPL_H
17 #define OHOS_VIDEO_OUTPUT_IMPL_H
18 
19 #include "kits/native/include/camera/camera.h"
20 #include "kits/native/include/camera/video_output.h"
21 #include "output/video_output.h"
22 
23 struct Camera_VideoOutput {
24 public:
25     explicit Camera_VideoOutput(OHOS::sptr<OHOS::CameraStandard::VideoOutput> &innerVideoOutput);
26     ~Camera_VideoOutput();
27 
28     Camera_ErrorCode RegisterCallback(VideoOutput_Callbacks* callback);
29 
30     Camera_ErrorCode UnregisterCallback(VideoOutput_Callbacks* callback);
31 
32     Camera_ErrorCode Start();
33 
34     Camera_ErrorCode Stop();
35 
36     Camera_ErrorCode Release();
37 
38     OHOS::sptr<OHOS::CameraStandard::VideoOutput> GetInnerVideoOutput();
39 
40     Camera_ErrorCode GetVideoProfile(Camera_VideoProfile** profile);
41 
42     Camera_ErrorCode GetSupportedFrameRates(Camera_FrameRateRange** frameRateRange, uint32_t* size);
43 
44     Camera_ErrorCode DeleteFrameRates(Camera_FrameRateRange* frameRateRange);
45 
46     Camera_ErrorCode SetFrameRate(int32_t minFps, int32_t maxFps);
47 
48     Camera_ErrorCode GetActiveFrameRate(Camera_FrameRateRange* frameRateRange);
49 
50     Camera_ErrorCode GetVideoRotation(int32_t imageRotation, Camera_ImageRotation* cameraImageRotation);
51 
52 private:
53     OHOS::sptr<OHOS::CameraStandard::VideoOutput> innerVideoOutput_;
54 };
55 #endif // OHOS_VIDEO_OUTPUT_IMPL_H
56