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#ifndef OHOS_CAMERA_HAL_H 16ba487d97Sopenharmony_ci#define OHOS_CAMERA_HAL_H 17ba487d97Sopenharmony_ci 18ba487d97Sopenharmony_ci#include "stdbool.h" 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_ci#define HAL_MEDIA_OK 0 28ba487d97Sopenharmony_ci#define HAL_MEDIA_ERR 1 29ba487d97Sopenharmony_ci 30ba487d97Sopenharmony_citypedef int32_t HalProcessorHdl; 31ba487d97Sopenharmony_ci#define HAL_INVALID_PROCESSOR (-1) 32ba487d97Sopenharmony_ci#define HAL_MAX_VPSS_NUM 10 33ba487d97Sopenharmony_ci/* necessary and significant attr */ 34ba487d97Sopenharmony_citypedef struct { 35ba487d97Sopenharmony_ci uint32_t width; 36ba487d97Sopenharmony_ci uint32_t height; 37ba487d97Sopenharmony_ci uint32_t fps; 38ba487d97Sopenharmony_ci} HalVideoProcessorAttr; 39ba487d97Sopenharmony_ci 40ba487d97Sopenharmony_ciHalProcessorHdl HalCreateVideoProcessor(HalVideoProcessorAttr *attr); 41ba487d97Sopenharmony_civoid HalCameraGetProcessorAttr(HalProcessorHdl hdls[HAL_MAX_VPSS_NUM], HalVideoProcessorAttr attrs[HAL_MAX_VPSS_NUM], 42ba487d97Sopenharmony_ci int32_t *size); 43ba487d97Sopenharmony_ciuint32_t HalGetProcessorDeviceId(HalProcessorHdl hdl); 44ba487d97Sopenharmony_civoid HalDestroyVideoProcessor(); 45ba487d97Sopenharmony_ci 46ba487d97Sopenharmony_ci/* camera */ 47ba487d97Sopenharmony_ciint32_t HalMediaInitialize(); 48ba487d97Sopenharmony_ciint32_t HalCameraInitialize(); 49ba487d97Sopenharmony_civoid HalCameraUnInitialize(); 50ba487d97Sopenharmony_ci#ifdef __cplusplus 51ba487d97Sopenharmony_ci#if __cplusplus 52ba487d97Sopenharmony_ci} 53ba487d97Sopenharmony_ci#endif 54ba487d97Sopenharmony_ci#endif /* End of #ifdef __cplusplus */ 55ba487d97Sopenharmony_ci#endif // OHOS_CAMERA_HAL_H