488b93ee204b92f26b44bc5102197969260be422
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / osal / Exynos_OSAL_Platform_Specific.h
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_Platform_Specific.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_PLATFORM_SPECIFIC
30 #define Exynos_OSAL_PLATFORM_SPECIFIC
31
32 #include "OMX_Types.h"
33 #include "OMX_Core.h"
34 #include "OMX_Index.h"
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 typedef struct GstOmxDecOutputBuffer GstOmxDecOutputBuffer;
41 typedef struct EnableGemBuffersParams EnableGemBuffersParams;
42
43 struct GstOmxDecOutputBuffer {
44   int fd_y;
45   int fd_uv;
46   void *vaddr_y;
47   void *vaddr_uv;
48 };
49
50 struct EnableGemBuffersParams
51 {
52   OMX_U32 nSize;
53   OMX_VERSIONTYPE nVersion;
54   OMX_U32 nPortIndex;
55   OMX_BOOL enable;
56 };
57
58 OMX_ERRORTYPE Exynos_OSAL_GetPBParameter(OMX_IN OMX_HANDLETYPE hComponent,
59                                           OMX_IN OMX_INDEXTYPE nIndex,
60                                           OMX_INOUT OMX_PTR ComponentParameterStructure);
61
62 OMX_ERRORTYPE Exynos_OSAL_SetPBParameter(OMX_IN OMX_HANDLETYPE hComponent,
63                                           OMX_IN OMX_INDEXTYPE nIndex,
64                                           OMX_IN OMX_PTR ComponentParameterStructure);
65
66 OMX_ERRORTYPE Exynos_OSAL_LockPB(OMX_IN OMX_PTR pBuffer,
67                                   OMX_IN OMX_U32 width,
68                                   OMX_IN OMX_U32 height,
69                                   OMX_IN OMX_COLOR_FORMATTYPE format,
70                                   OMX_OUT OMX_U32 *pStride,
71                                   OMX_OUT OMX_PTR planes);
72
73 #ifdef SLP_PLATFORM
74 OMX_ERRORTYPE Exynos_OSAL_UnlockPB(OMX_IN OMX_PTR pBuffer, OMX_IN EXYNOS_OMX_DATA *pData, EXYNOS_OMX_BASEPORT *pExynosPort, EXYNOS_OMX_BASEPORT *pExynosInPort);
75 #else
76 OMX_ERRORTYPE Exynos_OSAL_UnlockPB(OMX_IN OMX_PTR pBuffer, OMX_IN EXYNOS_OMX_DATA *pData);
77 #endif
78
79
80 OMX_ERRORTYPE Exynos_OSAL_LockPBHandle(OMX_IN OMX_U32 pBuffer,
81                                         OMX_IN OMX_U32 width,
82                                         OMX_IN OMX_U32 height,
83                                         OMX_IN OMX_COLOR_FORMATTYPE format,
84                                         OMX_OUT OMX_PTR planes);
85
86 OMX_ERRORTYPE Exynos_OSAL_UnlockPBHandle(OMX_IN OMX_U32 pBuffer);
87
88 OMX_ERRORTYPE Exynos_OSAL_GetInfoFromMetaData(OMX_IN OMX_BYTE pBuffer,
89                                               OMX_OUT OMX_PTR *pOutBuffer);
90
91 #if 0 /* SLP_PLATFORM */
92 OMX_ERRORTYPE Exynos_OSAL_CheckPB(OMX_IN EXYNOS_OMX_DATA *pBuffer,
93                                    OMX_OUT OMX_BOOL *bIsPBEnabled);
94 #endif
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif