Remove build warnings and fixed svace issues
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / component / common / Exynos_OMX_Basecomponent.h
1 /*
2  *
3  * Copyright 2012 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       Exynos_OMX_Basecomponent.h
20  * @brief
21  * @author     SeungBeom Kim (sbcrux.kim@samsung.com)
22  *             Yunji Kim (yunji.kim@samsung.com)
23  * @version    2.0.0
24  * @history
25  *    2012.02.20 : Create
26  */
27
28 #ifndef EXYNOS_OMX_BASECOMP
29 #define EXYNOS_OMX_BASECOMP
30
31 #include "Exynos_OMX_Def.h"
32 #include "OMX_Component.h"
33 #include "Exynos_OSAL_Queue.h"
34 #include "Exynos_OMX_Baseport.h"
35
36
37 typedef struct _EXYNOS_OMX_MESSAGE
38 {
39     OMX_U32 messageType;
40     OMX_U32 messageParam;
41     OMX_PTR pCmdData;
42 } EXYNOS_OMX_MESSAGE;
43
44 /* for Check TimeStamp after Seek */
45 typedef struct _EXYNOS_OMX_TIMESTAMP
46 {
47     OMX_BOOL  needSetStartTimeStamp;
48     OMX_BOOL  needCheckStartTimeStamp;
49     OMX_TICKS startTimeStamp;
50     OMX_U32   nStartFlags;
51     OMX_BOOL  bImmediateDisplay;
52 } EXYNOS_OMX_TIMESTAMP;
53
54 typedef struct _EXYNOS_OMX_BASECOMPONENT
55 {
56     OMX_STRING                  componentName;
57     OMX_VERSIONTYPE             componentVersion;
58     OMX_VERSIONTYPE             specVersion;
59
60     OMX_STATETYPE               currentState;
61     EXYNOS_OMX_TRANS_STATETYPE  transientState;
62
63     EXYNOS_CODEC_TYPE           codecType;
64     EXYNOS_OMX_PRIORITYMGMTTYPE compPriority;
65     OMX_MARKTYPE                propagateMarkType;
66     OMX_HANDLETYPE              compMutex;
67
68     OMX_HANDLETYPE              hComponentHandle;
69
70     /* Message Handler */
71     OMX_BOOL                    bExitMessageHandlerThread;
72     OMX_HANDLETYPE              hMessageHandler;
73     OMX_HANDLETYPE              msgSemaphoreHandle;
74     EXYNOS_QUEUE                messageQ;
75
76     /* Port */
77     OMX_PORT_PARAM_TYPE         portParam;
78     EXYNOS_OMX_BASEPORT        *pExynosPort;
79
80     OMX_HANDLETYPE              pauseEvent;
81
82     /* Callback function */
83     OMX_CALLBACKTYPE           *pCallbacks;
84     OMX_PTR                     callbackData;
85
86     /* Save Timestamp */
87     OMX_TICKS                   timeStamp[MAX_TIMESTAMP];
88     EXYNOS_OMX_TIMESTAMP        checkTimeStamp;
89
90     /* Save Flags */
91     OMX_U32                     nFlags[MAX_FLAGS];
92
93     OMX_BOOL                    getAllDelayBuffer;
94     OMX_BOOL                    reInputData;
95
96     OMX_BOOL bUseFlagEOF;
97     OMX_BOOL bSaveFlagEOS;
98
99     /* Check for Old & New OMX Process type switch */
100     OMX_BOOL bMultiThreadProcess;
101
102     OMX_ERRORTYPE (*exynos_codec_componentInit)(OMX_COMPONENTTYPE *pOMXComponent);
103     OMX_ERRORTYPE (*exynos_codec_componentTerminate)(OMX_COMPONENTTYPE *pOMXComponent);
104
105     OMX_ERRORTYPE (*exynos_AllocateTunnelBuffer)(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex);
106     OMX_ERRORTYPE (*exynos_FreeTunnelBuffer)(EXYNOS_OMX_BASEPORT *pOMXBasePort, OMX_U32 nPortIndex);
107     OMX_ERRORTYPE (*exynos_BufferProcessCreate)(OMX_HANDLETYPE pOMXComponent);
108     OMX_ERRORTYPE (*exynos_BufferProcessTerminate)(OMX_HANDLETYPE pOMXComponent);
109     OMX_ERRORTYPE (*exynos_BufferFlush)(OMX_COMPONENTTYPE *pOMXComponent, OMX_S32 nPortIndex, OMX_BOOL bEvent);
110 } EXYNOS_OMX_BASECOMPONENT;
111
112 OMX_ERRORTYPE Exynos_OMX_GetParameter(
113     OMX_IN OMX_HANDLETYPE hComponent,
114     OMX_IN OMX_INDEXTYPE  nParamIndex,
115     OMX_INOUT OMX_PTR     ComponentParameterStructure);
116
117 OMX_ERRORTYPE Exynos_OMX_SetParameter(
118     OMX_IN OMX_HANDLETYPE hComponent,
119     OMX_IN OMX_INDEXTYPE  nIndex,
120     OMX_IN OMX_PTR        ComponentParameterStructure);
121
122 OMX_ERRORTYPE Exynos_OMX_GetConfig(
123     OMX_IN OMX_HANDLETYPE hComponent,
124     OMX_IN OMX_INDEXTYPE  nIndex,
125     OMX_INOUT OMX_PTR     pComponentConfigStructure);
126
127 OMX_ERRORTYPE Exynos_OMX_SetConfig(
128     OMX_IN OMX_HANDLETYPE hComponent,
129     OMX_IN OMX_INDEXTYPE  nIndex,
130     OMX_IN OMX_PTR        pComponentConfigStructure);
131
132 OMX_ERRORTYPE Exynos_OMX_GetExtensionIndex(
133     OMX_IN OMX_HANDLETYPE  hComponent,
134     OMX_IN OMX_STRING      cParameterName,
135     OMX_OUT OMX_INDEXTYPE *pIndexType);
136
137 OMX_ERRORTYPE Exynos_OMX_BaseComponent_Constructor(OMX_IN OMX_HANDLETYPE hComponent);
138 OMX_ERRORTYPE Exynos_OMX_BaseComponent_Destructor(OMX_IN OMX_HANDLETYPE hComponent);
139
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
143
144     OMX_ERRORTYPE Exynos_OMX_Check_SizeVersion(OMX_PTR header, OMX_U32 size);
145
146
147 #ifdef __cplusplus
148 };
149 #endif
150
151 #endif