1 /* 2 * Copyright (c) 2020-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 COMMON_PLATFORM_VO_H 17 #define COMMON_PLATFORM_VO_H 18 19 #include <stdint.h> 20 21 #ifdef __cplusplus 22 #if __cplusplus 23 extern "C" { 24 #endif 25 #endif /* End of #ifdef __cplusplus */ 26 27 typedef int32_t HalVideoOutputHdl; 28 29 typedef struct { 30 int32_t regionPositionX; 31 int32_t regionPositionY; 32 int32_t regionWidth; 33 int32_t regionHeight; 34 uint32_t priority; 35 } HalVideoOutputAttr; 36 37 int32_t HalCreateVideoOutput(HalVideoOutputHdl *handle, HalVideoOutputAttr attr); 38 39 int32_t HalConfigVideoOutput(HalVideoOutputHdl handle, HalVideoOutputAttr attr); 40 41 int32_t HalGetVideoOutputConfig(HalVideoOutputHdl handle, HalVideoOutputAttr *attr); 42 43 int32_t HalDestroyVideoOutput(HalVideoOutputHdl handle); 44 45 int32_t HalStartVideoOutput(HalVideoOutputHdl handle); 46 47 int32_t HalStopVideoOutput(HalVideoOutputHdl handle); 48 49 int32_t HalWriteVo(HalVideoOutputHdl handle, const void *buffer); 50 51 int32_t HalPlayerVoInit(HalVideoOutputHdl *handle); 52 53 int32_t HalPlayerSysInit(void); 54 55 int32_t HalPlayerSysDeInit(void); 56 57 void HalPlayerVoDeinit(HalVideoOutputHdl handle); 58 59 int32_t HalCreateCameraVideoOutput(uint32_t deviceId, HalVideoOutputAttr *attr); 60 61 int32_t HalDestroyCameraVideoOutput(); 62 63 int32_t VoLayerInit(uint32_t devId); 64 65 void VoLayerDeInit(uint32_t devId); 66 #ifdef __cplusplus 67 #if __cplusplus 68 } 69 #endif 70 #endif /* End of #ifdef __cplusplus */ 71 72 #endif /* End of #ifndef COMMON_PLATFORM_VO_H */ 73