1 /* 2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 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 __MPI_VO_H__ 17 #define __MPI_VO_H__ 18 19 #include "hi_comm_vo.h" 20 21 #ifdef __cplusplus 22 #if __cplusplus 23 extern "C" { 24 #endif 25 #endif /* __cplusplus */ 26 27 28 /* Video Relative Settings */ 29 HI_S32 HI_MPI_VO_SetVideoLayerAttr(VO_LAYER VoLayer, const VO_VIDEO_LAYER_ATTR_S *pstLayerAttr); 30 HI_S32 HI_MPI_VO_GetVideoLayerAttr(VO_LAYER VoLayer, VO_VIDEO_LAYER_ATTR_S *pstLayerAttr); 31 32 HI_S32 HI_MPI_VO_EnableVideoLayer(VO_LAYER VoLayer); 33 HI_S32 HI_MPI_VO_DisableVideoLayer(VO_LAYER VoLayer); 34 35 HI_S32 HI_MPI_VO_BindVideoLayer(VO_LAYER VoLayer, VO_DEV VoDev); 36 HI_S32 HI_MPI_VO_UnBindVideoLayer(VO_LAYER VoLayer, VO_DEV VoDev); 37 38 HI_S32 HI_MPI_VO_SetVideoLayerPriority(VO_LAYER VoLayer, HI_U32 u32Priority); 39 HI_S32 HI_MPI_VO_GetVideoLayerPriority(VO_LAYER VoLayer, HI_U32 *pu32Priority); 40 41 HI_S32 HI_MPI_VO_SetVideoLayerCSC(VO_LAYER VoLayer, const VO_CSC_S *pstVideoCSC); 42 HI_S32 HI_MPI_VO_GetVideoLayerCSC(VO_LAYER VoLayer, VO_CSC_S *pstVideoCSC); 43 44 HI_S32 HI_MPI_VO_SetVideoLayerPartitionMode(VO_LAYER VoLayer, VO_PART_MODE_E enPartMode); 45 HI_S32 HI_MPI_VO_GetVideoLayerPartitionMode(VO_LAYER VoLayer, VO_PART_MODE_E *penPartMode); 46 47 HI_S32 HI_MPI_VO_BatchBegin(VO_LAYER VoLayer); 48 HI_S32 HI_MPI_VO_BatchEnd(VO_LAYER VoLayer); 49 50 HI_S32 HI_MPI_VO_SetVideoLayerBoundary(VO_LAYER VoLayer, const VO_LAYER_BOUNDARY_S *pstLayerBoundary); 51 HI_S32 HI_MPI_VO_GetVideoLayerBoundary(VO_LAYER VoLayer, VO_LAYER_BOUNDARY_S *pstLayerBoundary); 52 53 HI_S32 HI_MPI_VO_SetVideoLayerParam(VO_LAYER VoLayer, const VO_LAYER_PARAM_S *pstLayerParam); 54 HI_S32 HI_MPI_VO_GetVideoLayerParam(VO_LAYER VoLayer, VO_LAYER_PARAM_S *pstLayerParam); 55 56 HI_S32 HI_MPI_VO_SetVideoLayerDecompress(VO_LAYER VoLayer, HI_BOOL bSupportDecompress); 57 HI_S32 HI_MPI_VO_GetVideoLayerDecompress(VO_LAYER VoLayer, HI_BOOL *pbSupportDecompress); 58 59 HI_S32 HI_MPI_VO_SetVideoLayerCrop(VO_LAYER VoLayer, const CROP_INFO_S *pstCropInfo); 60 HI_S32 HI_MPI_VO_GetVideoLayerCrop(VO_LAYER VoLayer, CROP_INFO_S *pstCropInfo); 61 62 /* Display relative operations */ 63 HI_S32 HI_MPI_VO_SetPlayToleration(VO_LAYER VoLayer, HI_U32 u32Toleration); 64 HI_S32 HI_MPI_VO_GetPlayToleration(VO_LAYER VoLayer, HI_U32 *pu32Toleration); 65 66 HI_S32 HI_MPI_VO_GetScreenFrame(VO_LAYER VoLayer, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec); 67 HI_S32 HI_MPI_VO_ReleaseScreenFrame(VO_LAYER VoLayer, const VIDEO_FRAME_INFO_S *pstVFrame); 68 69 HI_S32 HI_MPI_VO_SetDisplayBufLen(VO_LAYER VoLayer, HI_U32 u32BufLen); 70 HI_S32 HI_MPI_VO_GetDisplayBufLen(VO_LAYER VoLayer, HI_U32 *pu32BufLen); 71 72 /* Channel Relative Operations */ 73 HI_S32 HI_MPI_VO_SetChnAttr(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_ATTR_S *pstChnAttr); 74 HI_S32 HI_MPI_VO_GetChnAttr(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_ATTR_S *pstChnAttr); 75 76 HI_S32 HI_MPI_VO_EnableChn(VO_LAYER VoLayer, VO_CHN VoChn); 77 HI_S32 HI_MPI_VO_DisableChn(VO_LAYER VoLayer, VO_CHN VoChn); 78 79 HI_S32 HI_MPI_VO_SetChnParam(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_PARAM_S *pstChnParam); 80 HI_S32 HI_MPI_VO_GetChnParam(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_PARAM_S *pstChnParam); 81 82 HI_S32 HI_MPI_VO_SetChnDisplayPosition(VO_LAYER VoLayer, VO_CHN VoChn, const POINT_S *pstDispPos); 83 HI_S32 HI_MPI_VO_GetChnDisplayPosition(VO_LAYER VoLayer, VO_CHN VoChn, POINT_S *pstDispPos); 84 85 HI_S32 HI_MPI_VO_SetChnFrameRate(VO_LAYER VoLayer, VO_CHN VoChn, HI_S32 s32ChnFrmRate); 86 HI_S32 HI_MPI_VO_GetChnFrameRate(VO_LAYER VoLayer, VO_CHN VoChn, HI_S32 *ps32ChnFrmRate); 87 88 HI_S32 HI_MPI_VO_GetChnFrame(VO_LAYER VoLayer, VO_CHN VoChn, VIDEO_FRAME_INFO_S *pstFrame, HI_S32 s32MilliSec); 89 HI_S32 HI_MPI_VO_ReleaseChnFrame(VO_LAYER VoLayer, VO_CHN VoChn, const VIDEO_FRAME_INFO_S *pstFrame); 90 91 HI_S32 HI_MPI_VO_PauseChn(VO_LAYER VoLayer, VO_CHN VoChn); 92 HI_S32 HI_MPI_VO_ResumeChn(VO_LAYER VoLayer, VO_CHN VoChn); 93 HI_S32 HI_MPI_VO_StepChn(VO_LAYER VoLayer, VO_CHN VoChn); 94 95 HI_S32 HI_MPI_VO_RefreshChn(VO_LAYER VoLayer, VO_CHN VoChn); 96 97 HI_S32 HI_MPI_VO_ShowChn(VO_LAYER VoLayer, VO_CHN VoChn); 98 HI_S32 HI_MPI_VO_HideChn(VO_LAYER VoLayer, VO_CHN VoChn); 99 100 HI_S32 HI_MPI_VO_SetZoomInWindow(VO_LAYER VoLayer, VO_CHN VoChn, const VO_ZOOM_ATTR_S *pstZoomAttr); 101 HI_S32 HI_MPI_VO_GetZoomInWindow(VO_LAYER VoLayer, VO_CHN VoChn, VO_ZOOM_ATTR_S *pstZoomAttr); 102 103 HI_S32 HI_MPI_VO_GetChnPTS(VO_LAYER VoLayer, VO_CHN VoChn, HI_U64 *pu64ChnPTS); 104 HI_S32 HI_MPI_VO_QueryChnStatus(VO_LAYER VoLayer, VO_CHN VoChn, VO_QUERY_STATUS_S *pstStatus); 105 106 HI_S32 HI_MPI_VO_SendFrame(VO_LAYER VoLayer, VO_CHN VoChn, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec); 107 108 HI_S32 HI_MPI_VO_ClearChnBuf(VO_LAYER VoLayer, VO_CHN VoChn, HI_BOOL bClrAll); 109 110 HI_S32 HI_MPI_VO_SetChnBorder(VO_LAYER VoLayer, VO_CHN VoChn, const VO_BORDER_S *pstBorder); 111 HI_S32 HI_MPI_VO_GetChnBorder(VO_LAYER VoLayer, VO_CHN VoChn, VO_BORDER_S *pstBorder); 112 113 HI_S32 HI_MPI_VO_SetChnBoundary(VO_LAYER VoLayer, VO_CHN VoChn, const VO_CHN_BOUNDARY_S *pstChnBoundary); 114 HI_S32 HI_MPI_VO_GetChnBoundary(VO_LAYER VoLayer, VO_CHN VoChn, VO_CHN_BOUNDARY_S *pstChnBoundary); 115 116 HI_S32 HI_MPI_VO_SetChnRecvThreshold(VO_LAYER VoLayer, VO_CHN VoChn, HI_U32 u32Threshold); 117 HI_S32 HI_MPI_VO_GetChnRecvThreshold(VO_LAYER VoLayer, VO_CHN VoChn, HI_U32 *pu32Threshold); 118 119 HI_S32 HI_MPI_VO_SetChnRotation(VO_LAYER VoLayer, VO_CHN VoChn, ROTATION_E enRotation); 120 HI_S32 HI_MPI_VO_GetChnRotation(VO_LAYER VoLayer, VO_CHN VoChn, ROTATION_E *penRotation); 121 122 HI_S32 HI_MPI_VO_GetChnRegionLuma(VO_LAYER VoLayer, VO_CHN VoChn, VO_REGION_INFO_S *pstRegionInfo, 123 HI_U64 *pu64LumaData, HI_S32 s32MilliSec); 124 125 /* WBC(Write Back Control) Relative Settings */ 126 HI_S32 HI_MPI_VO_SetWBCSource(VO_WBC VoWBC, const VO_WBC_SOURCE_S *pstWBCSource); 127 HI_S32 HI_MPI_VO_GetWBCSource(VO_WBC VoWBC, VO_WBC_SOURCE_S *pstWBCSources); 128 129 HI_S32 HI_MPI_VO_SetWBCAttr(VO_WBC VoWBC, const VO_WBC_ATTR_S *pstWBCAttr); 130 HI_S32 HI_MPI_VO_GetWBCAttr(VO_WBC VoWBC, VO_WBC_ATTR_S *pstWBCAttr); 131 132 HI_S32 HI_MPI_VO_EnableWBC(VO_WBC VoWBC); 133 HI_S32 HI_MPI_VO_DisableWBC(VO_WBC VoWBC); 134 135 HI_S32 HI_MPI_VO_SetWBCMode(VO_WBC VoWBC, VO_WBC_MODE_E enWBCMode); 136 HI_S32 HI_MPI_VO_GetWBCMode(VO_WBC VoWBC, VO_WBC_MODE_E *penWBCMode); 137 138 HI_S32 HI_MPI_VO_SetWBCDepth(VO_WBC VoWBC, HI_U32 u32Depth); 139 HI_S32 HI_MPI_VO_GetWBCDepth(VO_WBC VoWBC, HI_U32 *pu32Depth); 140 141 HI_S32 HI_MPI_VO_GetWBCFrame(VO_WBC VoWBC, VIDEO_FRAME_INFO_S *pstVFrame, HI_S32 s32MilliSec); 142 HI_S32 HI_MPI_VO_ReleaseWBCFrame(VO_WBC VoWBC, const VIDEO_FRAME_INFO_S *pstVFrame); 143 144 HI_S32 HI_MPI_VO_SetChnMirror(VO_LAYER VoLayer, VO_CHN VoChn, VO_MIRROR_MODE_E enMirrorMode); 145 HI_S32 HI_MPI_VO_GetChnMirror(VO_LAYER VoLayer, VO_CHN VoChn, VO_MIRROR_MODE_E *penMirrorMode); 146 HI_S32 HI_MPI_VO_SetVideoLayerEarlyDisplay(VO_LAYER VoLayer, HI_BOOL bEarlyDisplayEn); 147 HI_S32 HI_MPI_VO_GetVideoLayerEarlyDisplay(VO_LAYER VoLayer, HI_BOOL *pbEarlyDisplayEn); 148 149 #ifdef __cplusplus 150 #if __cplusplus 151 } 152 #endif 153 #endif /* __cplusplus */ 154 155 #endif /* __MPI_VO_H__ */ 156