Commit | Line | Data |
---|---|---|
a9bdc01e T |
1 | /* |
2 | * Copyright 2012 Samsung Electronics S.LSI Co. LTD | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | ||
17 | /* | |
18 | * @file Exynos_OSAL_Android.h | |
19 | * @brief | |
20 | * @author Seungbeom Kim (sbcrux.kim@samsung.com) | |
21 | * @author Hyeyeon Chung (hyeon.chung@samsung.com) | |
22 | * @author Yunji Kim (yunji.kim@samsung.com) | |
23 | * @author Jinsung Yang (jsgood.yang@samsung.com) | |
24 | * @version 2.0.0 | |
25 | * @history | |
26 | * 2012.02.20 : Create | |
27 | */ | |
28 | ||
29 | #ifndef Exynos_OSAL_ANDROID | |
30 | #define Exynos_OSAL_ANDROID | |
31 | ||
32 | #include "OMX_Types.h" | |
33 | #include "OMX_Core.h" | |
34 | #include "OMX_Index.h" | |
35 | #include "Exynos_OSAL_SharedMemory.h" | |
36 | ||
37 | #ifdef __cplusplus | |
38 | extern "C" { | |
39 | #endif | |
40 | ||
41 | OMX_ERRORTYPE Exynos_OSAL_GetAndroidParameter(OMX_IN OMX_HANDLETYPE hComponent, | |
42 | OMX_IN OMX_INDEXTYPE nIndex, | |
43 | OMX_INOUT OMX_PTR ComponentParameterStructure); | |
44 | ||
45 | OMX_ERRORTYPE Exynos_OSAL_SetAndroidParameter(OMX_IN OMX_HANDLETYPE hComponent, | |
46 | OMX_IN OMX_INDEXTYPE nIndex, | |
47 | OMX_IN OMX_PTR ComponentParameterStructure); | |
48 | ||
49 | OMX_COLOR_FORMATTYPE Exynos_OSAL_GetANBColorFormat(OMX_IN OMX_PTR handle); | |
50 | ||
51 | OMX_ERRORTYPE Exynos_OSAL_LockMetaData(OMX_IN OMX_PTR pBuffer, | |
52 | OMX_IN OMX_U32 width, | |
53 | OMX_IN OMX_U32 height, | |
54 | OMX_IN OMX_COLOR_FORMATTYPE format, | |
55 | OMX_OUT OMX_U32 *pStride, | |
56 | OMX_OUT OMX_PTR planes); | |
57 | ||
58 | OMX_ERRORTYPE Exynos_OSAL_UnlockMetaData(OMX_IN OMX_PTR pBuffer); | |
59 | ||
60 | OMX_ERRORTYPE Exynos_OSAL_LockANBHandle(OMX_IN OMX_PTR pBuffer, | |
61 | OMX_IN OMX_U32 width, | |
62 | OMX_IN OMX_U32 height, | |
63 | OMX_IN OMX_COLOR_FORMATTYPE format, | |
64 | OMX_OUT OMX_U32 *pStride, | |
65 | OMX_OUT OMX_PTR planes); | |
66 | ||
67 | OMX_HANDLETYPE Exynos_OSAL_RefANB_Create(); | |
68 | OMX_ERRORTYPE Exynos_OSAL_RefANB_Reset(OMX_HANDLETYPE hREF); | |
69 | OMX_ERRORTYPE Exynos_OSAL_RefANB_Terminate(OMX_HANDLETYPE hREF); | |
70 | OMX_ERRORTYPE Exynos_OSAL_RefANB_Increase(OMX_HANDLETYPE hREF, OMX_PTR pBuffer, PLANE_TYPE ePlaneType); | |
71 | OMX_ERRORTYPE Exynos_OSAL_RefANB_Decrease(OMX_HANDLETYPE hREF, OMX_S32 bufferFd); | |
72 | ||
73 | OMX_ERRORTYPE Exynos_OSAL_UnlockANBHandle(OMX_IN OMX_PTR pBuffer); | |
74 | ||
75 | OMX_ERRORTYPE Exynos_OSAL_GetInfoFromMetaData(OMX_IN OMX_BYTE pBuffer, | |
76 | OMX_OUT OMX_PTR *pOutBuffer); | |
77 | OMX_ERRORTYPE Exynos_OSAL_GetBufferFdFromMetaData(OMX_IN OMX_BYTE pBuffer, OMX_OUT OMX_PTR *pOutBuffer); | |
78 | ||
79 | OMX_PTR Exynos_OSAL_AllocMetaDataBuffer(OMX_HANDLETYPE hSharedMemory, EXYNOS_CODEC_TYPE codecType, OMX_U32 nPortIndex, OMX_U32 nSizeBytes, MEMORY_TYPE eMemoryType); | |
80 | OMX_ERRORTYPE Exynos_OSAL_FreeMetaDataBuffer(OMX_HANDLETYPE hSharedMemory, EXYNOS_CODEC_TYPE codecType, OMX_U32 nPortIndex, OMX_PTR pTempBuffer); | |
81 | OMX_ERRORTYPE Exynos_OSAL_SetDataLengthToMetaData(OMX_IN OMX_BYTE pBuffer, OMX_IN OMX_U32 dataLength); | |
82 | ||
83 | OMX_ERRORTYPE Exynos_OSAL_CheckANB(OMX_IN EXYNOS_OMX_DATA *pBuffer, | |
84 | OMX_OUT OMX_BOOL *bIsANBEnabled); | |
85 | ||
86 | OMX_ERRORTYPE Exynos_OSAL_SetPrependSPSPPSToIDR(OMX_PTR pComponentParameterStructure, | |
87 | OMX_PTR pbPrependSpsPpsToIdr); | |
88 | ||
89 | OMX_ERRORTYPE Exynos_OSAL_SetAndroidParameter(OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nIndex, OMX_IN OMX_PTR ComponentParameterStructure); | |
90 | ||
91 | OMX_ERRORTYPE useAndroidNativeBuffer(EXYNOS_OMX_BASEPORT *pExynosPort, OMX_BUFFERHEADERTYPE **ppBufferHdr, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes, OMX_U8 *pBuffer); | |
92 | ||
93 | OMX_U32 Exynos_OSAL_GetDisplayExtraBufferCount(void); | |
94 | #ifdef __cplusplus | |
95 | } | |
96 | #endif | |
97 | ||
98 | #endif |