1 /* 2 * 3 * Copyright 2010 Samsung Electronics S.LSI Co. LTD 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /* 19 * @file SEC_OSAL_Buffer.h 20 * @brief 21 * @author SeungBeom Kim (sbcrux.kim (at) samsung.com) 22 * Jinsung Yang (jsgood.yang (at) samsung.com) 23 * @version 1.0.2 24 * @history 25 * 2011.5.15 : Create 26 */ 27 28 #ifndef SEC_OSAL_BUFFER 29 #define SEC_OSAL_BUFFER 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 #include "OMX_Types.h" 36 37 typedef struct { 38 void *YPhyAddr; // [IN/OUT] physical address of Y 39 void *CPhyAddr; // [IN/OUT] physical address of CbCr 40 void *YVirAddr; // [IN/OUT] virtual address of Y 41 void *CVirAddr; // [IN/OUT] virtual address of CbCr 42 int YSize; // [IN/OUT] input size of Y data 43 int CSize; // [IN/OUT] input size of CbCr data 44 } BUFFER_ADDRESS_INFO; 45 46 47 OMX_ERRORTYPE checkVersionANB(OMX_PTR ComponentParameterStructure); 48 OMX_U32 checkPortIndexANB(OMX_PTR ComponentParameterStructure); 49 OMX_U32 getMetadataBufferType(const uint8_t *ptr); 50 OMX_ERRORTYPE enableAndroidNativeBuffer(OMX_HANDLETYPE hComponent, OMX_PTR ComponentParameterStructure); 51 OMX_ERRORTYPE getAndroidNativeBuffer(OMX_HANDLETYPE hComponent, OMX_PTR ComponentParameterStructure); 52 OMX_ERRORTYPE useAndroidNativeBuffer(OMX_HANDLETYPE hComponent, OMX_PTR ComponentParameterStructure); 53 OMX_U32 getVADDRfromANB(OMX_PTR pUnreadableBuffer, OMX_U32 Width, OMX_U32 Height, void *vaddress[]); 54 OMX_U32 putVADDRtoANB(OMX_PTR pUnreadableBuffer); 55 OMX_ERRORTYPE enableStoreMetaDataInBuffers(OMX_HANDLETYPE hComponent, OMX_PTR ComponentParameterStructure); 56 OMX_BOOL isMetadataBufferTypeGrallocSource(OMX_BYTE pInputDataBuffer); 57 OMX_ERRORTYPE preprocessMetaDataInBuffers(OMX_HANDLETYPE hComponent, OMX_BYTE pInputDataBuffer, BUFFER_ADDRESS_INFO *pInputInfo); 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif 64 65