1ba487d97Sopenharmony_ci/*
2ba487d97Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3ba487d97Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4ba487d97Sopenharmony_ci * you may not use this file except in compliance with the License.
5ba487d97Sopenharmony_ci * You may obtain a copy of the License at
6ba487d97Sopenharmony_ci *
7ba487d97Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8ba487d97Sopenharmony_ci *
9ba487d97Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10ba487d97Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11ba487d97Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12ba487d97Sopenharmony_ci * See the License for the specific language governing permissions and
13ba487d97Sopenharmony_ci * limitations under the License.
14ba487d97Sopenharmony_ci */
15ba487d97Sopenharmony_ci
16ba487d97Sopenharmony_ci#ifndef COMMON_PLATFORM_VO_H
17ba487d97Sopenharmony_ci#define COMMON_PLATFORM_VO_H
18ba487d97Sopenharmony_ci
19ba487d97Sopenharmony_ci#include <stdint.h>
20ba487d97Sopenharmony_ci
21ba487d97Sopenharmony_ci#ifdef __cplusplus
22ba487d97Sopenharmony_ci#if __cplusplus
23ba487d97Sopenharmony_ciextern "C" {
24ba487d97Sopenharmony_ci#endif
25ba487d97Sopenharmony_ci#endif /* End of #ifdef __cplusplus */
26ba487d97Sopenharmony_ci
27ba487d97Sopenharmony_citypedef int32_t HalVideoOutputHdl;
28ba487d97Sopenharmony_ci
29ba487d97Sopenharmony_citypedef struct {
30ba487d97Sopenharmony_ci    int32_t regionPositionX;
31ba487d97Sopenharmony_ci    int32_t regionPositionY;
32ba487d97Sopenharmony_ci    int32_t regionWidth;
33ba487d97Sopenharmony_ci    int32_t regionHeight;
34ba487d97Sopenharmony_ci    uint32_t priority;
35ba487d97Sopenharmony_ci} HalVideoOutputAttr;
36ba487d97Sopenharmony_ci
37ba487d97Sopenharmony_ciint32_t HalCreateVideoOutput(HalVideoOutputHdl *handle, HalVideoOutputAttr attr);
38ba487d97Sopenharmony_ci
39ba487d97Sopenharmony_ciint32_t HalConfigVideoOutput(HalVideoOutputHdl handle, HalVideoOutputAttr attr);
40ba487d97Sopenharmony_ci
41ba487d97Sopenharmony_ciint32_t HalGetVideoOutputConfig(HalVideoOutputHdl handle, HalVideoOutputAttr *attr);
42ba487d97Sopenharmony_ci
43ba487d97Sopenharmony_ciint32_t HalDestroyVideoOutput(HalVideoOutputHdl handle);
44ba487d97Sopenharmony_ci
45ba487d97Sopenharmony_ciint32_t HalStartVideoOutput(HalVideoOutputHdl handle);
46ba487d97Sopenharmony_ci
47ba487d97Sopenharmony_ciint32_t HalStopVideoOutput(HalVideoOutputHdl handle);
48ba487d97Sopenharmony_ci
49ba487d97Sopenharmony_ciint32_t HalWriteVo(HalVideoOutputHdl handle, const void *buffer);
50ba487d97Sopenharmony_ci
51ba487d97Sopenharmony_ciint32_t HalPlayerVoInit(HalVideoOutputHdl *handle);
52ba487d97Sopenharmony_ci
53ba487d97Sopenharmony_ciint32_t HalPlayerSysInit(void);
54ba487d97Sopenharmony_ci
55ba487d97Sopenharmony_ciint32_t HalPlayerSysDeInit(void);
56ba487d97Sopenharmony_ci
57ba487d97Sopenharmony_civoid HalPlayerVoDeinit(HalVideoOutputHdl handle);
58ba487d97Sopenharmony_ci
59ba487d97Sopenharmony_ciint32_t HalCreateCameraVideoOutput(uint32_t deviceId, HalVideoOutputAttr *attr);
60ba487d97Sopenharmony_ci
61ba487d97Sopenharmony_ciint32_t HalDestroyCameraVideoOutput();
62ba487d97Sopenharmony_ci
63ba487d97Sopenharmony_ciint32_t VoLayerInit(uint32_t devId);
64ba487d97Sopenharmony_ci
65ba487d97Sopenharmony_civoid VoLayerDeInit(uint32_t devId);
66ba487d97Sopenharmony_ci#ifdef __cplusplus
67ba487d97Sopenharmony_ci#if __cplusplus
68ba487d97Sopenharmony_ci}
69ba487d97Sopenharmony_ci#endif
70ba487d97Sopenharmony_ci#endif /* End of #ifdef __cplusplus */
71ba487d97Sopenharmony_ci
72ba487d97Sopenharmony_ci#endif  /* End of #ifndef COMMON_PLATFORM_VO_H */
73