|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 /** |
|
18 @file |
|
19 @internalComponent |
|
20 */ |
|
21 |
|
22 |
|
23 // ComponentTunnelRequest must be used in the following states: |
|
24 // - Any state, (but the port will have to be disabled) |
|
25 // |
|
26 inline OMX_ERRORTYPE |
|
27 COmxILFsm::COmxILState::ComponentTunnelRequest( |
|
28 COmxILFsm& aFsm, |
|
29 OMX_U32 aPort, |
|
30 OMX_HANDLETYPE aTunneledComp, |
|
31 OMX_U32 aTunneledPort, |
|
32 OMX_TUNNELSETUPTYPE* apTunnelSetup) |
|
33 { |
|
34 return aFsm.iPortManager.TunnelRequest( |
|
35 aPort, |
|
36 aTunneledComp, |
|
37 aTunneledPort, |
|
38 apTunnelSetup, |
|
39 OMX_TRUE // Port must be disabled |
|
40 ); |
|
41 } |
|
42 |
|
43 // ComponentTunnelRequestV2 must be used in the following states: |
|
44 // - OMX_StateLoaded |
|
45 // |
|
46 inline OMX_ERRORTYPE |
|
47 COmxILFsm::COmxILState::ComponentTunnelRequestV2( |
|
48 COmxILFsm& aFsm, |
|
49 OMX_U32 aPort, |
|
50 OMX_HANDLETYPE aTunneledComp, |
|
51 OMX_U32 aTunneledPort, |
|
52 OMX_TUNNELSETUPTYPE* apTunnelSetup) |
|
53 { |
|
54 return aFsm.iPortManager.TunnelRequest( |
|
55 aPort, |
|
56 aTunneledComp, |
|
57 aTunneledPort, |
|
58 apTunnelSetup, |
|
59 OMX_FALSE // Port does not need to be disabled |
|
60 ); |
|
61 } |
|
62 |
|
63 // This PopulateBuffer version must be used in the following states: |
|
64 // - OMX_StateIdle, |
|
65 // - OMX_StateExecuting, |
|
66 // - OMX_StatePaused |
|
67 // |
|
68 inline OMX_ERRORTYPE |
|
69 COmxILFsm::COmxILState::PopulateBuffer(COmxILFsm& aFsm, |
|
70 OMX_BUFFERHEADERTYPE** appBufferHdr, |
|
71 OMX_U32 aPortIndex, |
|
72 OMX_PTR apAppPrivate, |
|
73 OMX_U32 aSizeBytes, |
|
74 OMX_U8* apBuffer, |
|
75 TBool& portPopulationCompleted) |
|
76 { |
|
77 return aFsm.iPortManager.PopulateBuffer( |
|
78 appBufferHdr, |
|
79 aPortIndex, |
|
80 apAppPrivate, |
|
81 aSizeBytes, |
|
82 apBuffer, |
|
83 portPopulationCompleted, |
|
84 OMX_TRUE // Port must be disabled |
|
85 ); |
|
86 } |
|
87 |
|
88 // This PopulateBuffer version must be used in the following states: |
|
89 // - OMX_StateLoaded, |
|
90 // - OMX_StateWaitForResources |
|
91 // |
|
92 inline OMX_ERRORTYPE |
|
93 COmxILFsm::COmxILState::PopulateBufferV2( |
|
94 COmxILFsm& aFsm, |
|
95 OMX_BUFFERHEADERTYPE** appBufferHdr, |
|
96 OMX_U32 aPortIndex, |
|
97 OMX_PTR apAppPrivate, |
|
98 OMX_U32 aSizeBytes, |
|
99 OMX_U8* apBuffer, |
|
100 TBool& portPopulationCompleted) |
|
101 { |
|
102 return aFsm.iPortManager.PopulateBuffer( |
|
103 appBufferHdr, |
|
104 aPortIndex, |
|
105 apAppPrivate, |
|
106 aSizeBytes, |
|
107 apBuffer, |
|
108 portPopulationCompleted, |
|
109 OMX_FALSE // Port does not need to be disabled |
|
110 ); |
|
111 } |
|
112 |
|
113 |
|
114 // This FreeBuffer version is used in the following states: |
|
115 // - OMX_StateLoaded, |
|
116 // - OMX_StateWaitForResources |
|
117 // - OMX_StateExecuting, |
|
118 // - OMX_StatePaused, |
|
119 // AND the port must be disabled |
|
120 inline OMX_ERRORTYPE |
|
121 COmxILFsm::COmxILState::FreeBuffer(COmxILFsm& aFsm, |
|
122 OMX_U32 aPortIndex, |
|
123 OMX_BUFFERHEADERTYPE* apBuffer, |
|
124 TBool& aPortDepopulationCompleted) |
|
125 { |
|
126 return aFsm.iPortManager.FreeBuffer( |
|
127 aPortIndex, |
|
128 apBuffer, |
|
129 aPortDepopulationCompleted, |
|
130 OMX_TRUE // Port should be disabled, otherwise |
|
131 // OMX_ErrorPortUnpopulated might be sent |
|
132 ); |
|
133 } |
|
134 |
|
135 // This FreeBuffer version is used in the following states: |
|
136 // - OMX_StateIdle, |
|
137 // |
|
138 inline OMX_ERRORTYPE |
|
139 COmxILFsm::COmxILState::FreeBufferV2(COmxILFsm& aFsm, |
|
140 OMX_U32 aPortIndex, |
|
141 OMX_BUFFERHEADERTYPE* apBuffer, |
|
142 TBool& aPortDepopulationCompleted) |
|
143 { |
|
144 return aFsm.iPortManager.FreeBuffer( |
|
145 aPortIndex, |
|
146 apBuffer, |
|
147 aPortDepopulationCompleted, |
|
148 OMX_FALSE // Port does not need to be disabled |
|
149 ); |
|
150 } |
|
151 |
|
152 // This EmptyThisBuffer version must be used in the following states: |
|
153 // - OMX_StateLoaded, |
|
154 // - OMX_StateWaitForResources |
|
155 // AND the port must be disabled |
|
156 inline OMX_ERRORTYPE |
|
157 COmxILFsm::COmxILState::EmptyThisBuffer(COmxILFsm& aFsm, |
|
158 OMX_BUFFERHEADERTYPE* apBuffer) |
|
159 { |
|
160 return aFsm.iPortManager.BufferIndication( |
|
161 apBuffer, |
|
162 OMX_DirInput, |
|
163 OMX_TRUE // Port must be disabled |
|
164 ); |
|
165 } |
|
166 |
|
167 // This EmptyThisBuffer version must be used in the following states: |
|
168 // - OMX_StateIdle, |
|
169 // - OMX_StateExecuting, |
|
170 // - OMX_StatePaused |
|
171 // |
|
172 inline OMX_ERRORTYPE |
|
173 COmxILFsm::COmxILState::EmptyThisBufferV2(COmxILFsm& aFsm, |
|
174 OMX_BUFFERHEADERTYPE* apBuffer) |
|
175 { |
|
176 return aFsm.iPortManager.BufferIndication( |
|
177 apBuffer, |
|
178 OMX_DirInput, |
|
179 OMX_FALSE // Port does not need to be disabled |
|
180 ); |
|
181 } |
|
182 |
|
183 // This FillThisBuffer version must be used in the following states: |
|
184 // - OMX_StateLoaded, |
|
185 // - OMX_StateWaitForResources |
|
186 // AND the port must be disabled |
|
187 inline OMX_ERRORTYPE |
|
188 COmxILFsm::COmxILState::FillThisBuffer(COmxILFsm& aFsm, |
|
189 OMX_BUFFERHEADERTYPE* apBuffer) |
|
190 { |
|
191 return aFsm.iPortManager.BufferIndication( |
|
192 apBuffer, |
|
193 OMX_DirOutput, |
|
194 OMX_TRUE // Port must be disabled |
|
195 ); |
|
196 } |
|
197 |
|
198 // This FillThisBuffer version must be used in the following states: |
|
199 // - OMX_StateIdle, |
|
200 // - OMX_StateExecuting, |
|
201 // - OMX_StatePaused |
|
202 // |
|
203 inline OMX_ERRORTYPE |
|
204 COmxILFsm::COmxILState::FillThisBufferV2(COmxILFsm& aFsm, |
|
205 OMX_BUFFERHEADERTYPE* apBuffer) |
|
206 { |
|
207 return aFsm.iPortManager.BufferIndication( |
|
208 apBuffer, |
|
209 OMX_DirOutput, |
|
210 OMX_FALSE // Port does not need to be disabled |
|
211 ); |
|
212 } |
|
213 |