|
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 #include "log.h" |
|
23 #include "omxilcallbackmanagerifimpl.h" |
|
24 #include "omxilfsm.h" |
|
25 #include "omxilportmanagerif.h" |
|
26 #include <openmax/il/common/omxilstatedefs.h> |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 XOmxILCallbackManagerIfImpl::XOmxILCallbackManagerIfImpl(OMX_HANDLETYPE apComponentHandle, |
|
32 OMX_PTR apAppData, |
|
33 OMX_CALLBACKTYPE* apCallbacks) |
|
34 : |
|
35 ipHandle(static_cast<OMX_COMPONENTTYPE*>(apComponentHandle)), |
|
36 ipAppData(apAppData), |
|
37 ipCallbacks(apCallbacks), |
|
38 iRegisteredTunnels(), |
|
39 iBufferMarkPropagationPorts(), |
|
40 iBufferMarks(), |
|
41 ipPortManager(0), |
|
42 ipFsm(0) |
|
43 { |
|
44 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::XOmxILCallbackManagerIfImpl")); |
|
45 } |
|
46 |
|
47 |
|
48 XOmxILCallbackManagerIfImpl::~XOmxILCallbackManagerIfImpl() |
|
49 { |
|
50 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::~XOmxILCallbackManagerIfImpl")); |
|
51 // These pointers are cleared to make sure that any further calls on this |
|
52 // object will fail (e.g., from a threaded PF) |
|
53 ipHandle = 0; |
|
54 ipAppData = 0; |
|
55 ipCallbacks = 0; |
|
56 |
|
57 iRegisteredTunnels.Close(); |
|
58 iBufferMarkPropagationPorts.Close(); |
|
59 iBufferMarks.Close(); |
|
60 |
|
61 ipPortManager = 0; |
|
62 |
|
63 ipFsm = 0; |
|
64 |
|
65 } |
|
66 |
|
67 void |
|
68 XOmxILCallbackManagerIfImpl::DoSetPortManager(MOmxILPortManagerIf& apPortManager) |
|
69 { |
|
70 ipPortManager = &apPortManager; |
|
71 } |
|
72 |
|
73 void |
|
74 XOmxILCallbackManagerIfImpl::DoSetFsm(COmxILFsm& apFsm) |
|
75 { |
|
76 ipFsm = &apFsm; |
|
77 } |
|
78 |
|
79 OMX_ERRORTYPE |
|
80 XOmxILCallbackManagerIfImpl::DoRegisterComponentHandle(OMX_HANDLETYPE aComponentHandle) |
|
81 { |
|
82 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::DoRegisterComponentHandle")); |
|
83 |
|
84 __ASSERT_DEBUG(aComponentHandle, |
|
85 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
86 |
|
87 ipHandle = static_cast<OMX_COMPONENTTYPE *>(aComponentHandle); |
|
88 |
|
89 return OMX_ErrorNone; |
|
90 |
|
91 } |
|
92 |
|
93 |
|
94 OMX_ERRORTYPE |
|
95 XOmxILCallbackManagerIfImpl::DoRegisterILClientCallbacks(const OMX_CALLBACKTYPE* apCallbacks, |
|
96 const OMX_PTR apAppData) |
|
97 { |
|
98 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::DoRegisterILClientCallbacks")); |
|
99 |
|
100 ipAppData = const_cast<OMX_PTR>(apAppData); |
|
101 ipCallbacks = const_cast<OMX_CALLBACKTYPE*>(apCallbacks); |
|
102 |
|
103 return OMX_ErrorNone; |
|
104 |
|
105 } |
|
106 |
|
107 OMX_ERRORTYPE |
|
108 XOmxILCallbackManagerIfImpl::DoRegisterTunnelCallback( |
|
109 OMX_U32 aLocalPortIndex, |
|
110 OMX_DIRTYPE aLocalPortDirection, |
|
111 OMX_HANDLETYPE aTunnelledComponentHandle, |
|
112 OMX_U32 aTunnelledPortIndex) |
|
113 { |
|
114 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::DoRegisterTunnelCallback")); |
|
115 |
|
116 OMX_ERRORTYPE omxError = OMX_ErrorNone; |
|
117 |
|
118 if (aTunnelledComponentHandle) |
|
119 { |
|
120 // Register tunnelled port |
|
121 TInt err = iRegisteredTunnels.Append( |
|
122 TTunnelRegistrationInfo(aLocalPortIndex, |
|
123 aLocalPortDirection, |
|
124 aTunnelledComponentHandle, |
|
125 aTunnelledPortIndex)); |
|
126 if (KErrNone != err) |
|
127 { |
|
128 switch (err) |
|
129 { |
|
130 case KErrNoMemory: |
|
131 { |
|
132 omxError = OMX_ErrorInsufficientResources; |
|
133 } |
|
134 break; |
|
135 default: |
|
136 { |
|
137 omxError = OMX_ErrorUndefined; |
|
138 } |
|
139 }; |
|
140 } |
|
141 |
|
142 } |
|
143 else |
|
144 { |
|
145 // Deregister tunnelled port |
|
146 const TUint tunnelCount = iRegisteredTunnels.Count(); |
|
147 for (TUint i=0; i<tunnelCount; ++i) |
|
148 { |
|
149 if (iRegisteredTunnels[i].iLocalPortIndex == |
|
150 aLocalPortIndex) |
|
151 { |
|
152 iRegisteredTunnels.Remove(i); |
|
153 break; |
|
154 } |
|
155 } |
|
156 } |
|
157 |
|
158 return omxError; |
|
159 |
|
160 } |
|
161 |
|
162 OMX_ERRORTYPE |
|
163 XOmxILCallbackManagerIfImpl::DoRegisterBufferMarkPropagationPort( |
|
164 OMX_U32 aPortIndex, |
|
165 OMX_U32 aPropagationPortIndex) |
|
166 { |
|
167 DEBUG_PRINTF3(_L8("XOmxILCallbackManagerIfImpl::DoRegisterBufferMarkPropagationPort : aPortIndex[%d] aPropagationPortIndex[%d] "),aPortIndex, aPropagationPortIndex); |
|
168 |
|
169 TInt err = iBufferMarkPropagationPorts.Append( |
|
170 TBufferMarkPropagationInfo(aPortIndex, |
|
171 aPropagationPortIndex)); |
|
172 |
|
173 OMX_ERRORTYPE omxError = OMX_ErrorNone; |
|
174 if (KErrNone != err) |
|
175 { |
|
176 switch (err) |
|
177 { |
|
178 case KErrNoMemory: |
|
179 { |
|
180 omxError = OMX_ErrorInsufficientResources; |
|
181 } |
|
182 break; |
|
183 default: |
|
184 { |
|
185 omxError = OMX_ErrorUndefined; |
|
186 } |
|
187 }; |
|
188 } |
|
189 |
|
190 return omxError; |
|
191 |
|
192 } |
|
193 |
|
194 |
|
195 |
|
196 OMX_ERRORTYPE |
|
197 XOmxILCallbackManagerIfImpl::DoTransitionCompleteNotification(OMX_STATETYPE aOmxState) |
|
198 { |
|
199 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::DoTransitionCompleteNotification")); |
|
200 |
|
201 return DoEventNotification(OMX_EventCmdComplete, |
|
202 OMX_CommandStateSet, |
|
203 aOmxState, |
|
204 0); |
|
205 |
|
206 } |
|
207 |
|
208 |
|
209 OMX_ERRORTYPE |
|
210 XOmxILCallbackManagerIfImpl::DoCommandCompleteNotification(OMX_COMMANDTYPE aOmxCommand, |
|
211 OMX_U32 aOmxPortIndex) |
|
212 { |
|
213 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::DoCommandCompleteNotification")); |
|
214 |
|
215 return DoEventNotification(OMX_EventCmdComplete, |
|
216 aOmxCommand, |
|
217 aOmxPortIndex, |
|
218 0); |
|
219 |
|
220 } |
|
221 |
|
222 |
|
223 OMX_ERRORTYPE |
|
224 XOmxILCallbackManagerIfImpl::DoErrorEventNotification(OMX_ERRORTYPE aOmxError) |
|
225 { |
|
226 DEBUG_PRINTF2(_L8("XOmxILCallbackManagerIfImpl::DoErrorEventNotification : aOmxError[%X] "), aOmxError); |
|
227 |
|
228 return DoEventNotification(OMX_EventError, |
|
229 aOmxError, |
|
230 0, |
|
231 0); |
|
232 |
|
233 } |
|
234 |
|
235 OMX_ERRORTYPE |
|
236 XOmxILCallbackManagerIfImpl::DoEventNotification(OMX_EVENTTYPE aEvent, |
|
237 TUint32 aData1, |
|
238 TUint32 aData2, |
|
239 OMX_STRING aExtraInfo) |
|
240 { |
|
241 DEBUG_PRINTF5(_L8("XOmxILCallbackManagerIfImpl::DoEventNotification : Handle[%X] aEvent[%u] aData1[%u] aData2[%u]"), ipHandle, aEvent, aData1, aData2); |
|
242 |
|
243 __ASSERT_DEBUG(ipHandle && ipCallbacks, User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
244 |
|
245 |
|
246 ipCallbacks->EventHandler(ipHandle, |
|
247 ipAppData, |
|
248 aEvent, |
|
249 aData1, |
|
250 aData2, |
|
251 aExtraInfo); |
|
252 return OMX_ErrorNone; |
|
253 |
|
254 } |
|
255 |
|
256 |
|
257 OMX_ERRORTYPE |
|
258 XOmxILCallbackManagerIfImpl::DoBufferDoneNotification(OMX_BUFFERHEADERTYPE* apBufferHeader, |
|
259 OMX_U32 aLocalPortIndex, |
|
260 OMX_DIRTYPE aLocalPortDirection) |
|
261 { |
|
262 DEBUG_PRINTF5(_L8("XOmxILCallbackManagerIfImpl::DoBufferDoneNotification : HANDLE [%X] BUFFER [%X] PORT[%d] DIR[%d]"), ipHandle, apBufferHeader, aLocalPortIndex, aLocalPortDirection); |
|
263 |
|
264 __ASSERT_ALWAYS(apBufferHeader && |
|
265 (OMX_DirInput == aLocalPortDirection || |
|
266 OMX_DirOutput == aLocalPortDirection), |
|
267 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
268 |
|
269 __ASSERT_ALWAYS(apBufferHeader->nOffset + apBufferHeader->nFilledLen |
|
270 <= apBufferHeader->nAllocLen, |
|
271 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
272 |
|
273 __ASSERT_DEBUG(ipHandle && ipCallbacks, User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
274 |
|
275 // Look for buffer marks to be signalled or propagated |
|
276 SignalOrPropagateBufferMarks(apBufferHeader, |
|
277 aLocalPortDirection); |
|
278 |
|
279 // find out whether the port is tunnelled or not |
|
280 TBool tunnelled = EFalse; |
|
281 TUint tunnelInfoArrayIndex = 0; |
|
282 const TUint tunnelCount = iRegisteredTunnels.Count(); |
|
283 for (TUint i=0; i<tunnelCount; ++i) |
|
284 { |
|
285 if (iRegisteredTunnels[i].iLocalPortIndex == |
|
286 aLocalPortIndex) |
|
287 { |
|
288 tunnelled = ETrue; |
|
289 tunnelInfoArrayIndex = i; |
|
290 break; |
|
291 } |
|
292 } |
|
293 |
|
294 if (tunnelled) |
|
295 { |
|
296 OMX_COMPONENTTYPE* ipTunnelledComponent = |
|
297 static_cast<OMX_COMPONENTTYPE*>( |
|
298 iRegisteredTunnels[tunnelInfoArrayIndex]. |
|
299 iTunnelledComponentHandle); |
|
300 |
|
301 __ASSERT_DEBUG(ipTunnelledComponent, |
|
302 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
303 |
|
304 // From OMX_Core.h "Callbacks should not return an error to the |
|
305 // component, so if an error occurs, the application shall handle it |
|
306 // internally". Callback return error ignored here. |
|
307 if (OMX_DirInput == aLocalPortDirection) |
|
308 { |
|
309 OMX_FillThisBuffer(ipTunnelledComponent, apBufferHeader); |
|
310 } |
|
311 else |
|
312 { |
|
313 OMX_EmptyThisBuffer(ipTunnelledComponent, apBufferHeader); |
|
314 } |
|
315 |
|
316 } |
|
317 else |
|
318 { |
|
319 OMX_ERRORTYPE (*fp2CBackHandler) |
|
320 (OMX_HANDLETYPE, OMX_PTR, OMX_BUFFERHEADERTYPE*) = |
|
321 (aLocalPortDirection == OMX_DirInput ? |
|
322 ipCallbacks->EmptyBufferDone : |
|
323 ipCallbacks->FillBufferDone); |
|
324 |
|
325 // From OMX_Core.h "Callbacks should not return an error to the |
|
326 // component, so if an error occurs, the application shall handle it |
|
327 // internally". Callback return error ignored here. |
|
328 #ifdef OMX_DEBUG_TRACING_ON |
|
329 if (aLocalPortDirection == OMX_DirInput) |
|
330 { |
|
331 OMX_TRACE_EMPTYBUFFERDONE_IN(ipHandle, ipAppData, apBufferHeader); |
|
332 } |
|
333 else |
|
334 { |
|
335 OMX_TRACE_FILLBUFFERDONE_IN(ipHandle, ipAppData, apBufferHeader); |
|
336 } |
|
337 #endif |
|
338 fp2CBackHandler(ipHandle, |
|
339 ipAppData, |
|
340 apBufferHeader); |
|
341 #ifdef OMX_DEBUG_TRACING_ON |
|
342 if (aLocalPortDirection == OMX_DirInput) |
|
343 { |
|
344 OMX_TRACE_EMPTYBUFFERDONE_OUT(ipHandle, ipAppData, apBufferHeader, 0); |
|
345 } |
|
346 else |
|
347 { |
|
348 OMX_TRACE_FILLBUFFERDONE_OUT(ipHandle, ipAppData, apBufferHeader, 0); |
|
349 } |
|
350 #endif |
|
351 |
|
352 } |
|
353 |
|
354 return OMX_ErrorNone; |
|
355 |
|
356 } |
|
357 |
|
358 OMX_ERRORTYPE |
|
359 XOmxILCallbackManagerIfImpl::DoPortSettingsChangeNotification( |
|
360 OMX_U32 aLocalPortIndex, |
|
361 TUint aPortSettingsIndex, |
|
362 const TDesC8& aPortSettings) |
|
363 { |
|
364 DEBUG_PRINTF2(_L8("XOmxILCallbackManagerIfImpl::DoPortSettingsChangeNotification : aLocalPortIndex[%d]"), aLocalPortIndex); |
|
365 |
|
366 __ASSERT_DEBUG(ipHandle && |
|
367 ipCallbacks && |
|
368 ipPortManager, |
|
369 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
370 |
|
371 HBufC8* pPortSettings = HBufC8::New(aPortSettings.Length()); |
|
372 if (!pPortSettings) |
|
373 { |
|
374 return OMX_ErrorInsufficientResources; |
|
375 } |
|
376 *pPortSettings = aPortSettings; |
|
377 |
|
378 // This is an event that the port may want to convey to the IL Client... |
|
379 OMX_EVENTTYPE eventForILClient = OMX_EventMax; |
|
380 OMX_ERRORTYPE omxRetError = |
|
381 ipPortManager->PortSettingsChangeIndication(aLocalPortIndex, |
|
382 aPortSettingsIndex, |
|
383 *pPortSettings, |
|
384 eventForILClient); |
|
385 |
|
386 delete pPortSettings; |
|
387 pPortSettings = NULL; |
|
388 |
|
389 // Inform the IL Client that some value in one of the ports' configuration |
|
390 // structures has changed... |
|
391 if (OMX_EventMax != eventForILClient) |
|
392 { |
|
393 // Only allow these two port events... |
|
394 __ASSERT_ALWAYS(eventForILClient == OMX_EventPortSettingsChanged || |
|
395 eventForILClient == OMX_EventPortFormatDetected, |
|
396 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
397 |
|
398 // From OMX_Core.h "Callbacks should not return an error to the component, |
|
399 // so if an error occurs, the application shall handle it |
|
400 // internally". Callback return error ignored here. |
|
401 ipCallbacks->EventHandler(ipHandle, |
|
402 ipAppData, |
|
403 eventForILClient, |
|
404 aLocalPortIndex, |
|
405 0, |
|
406 0); |
|
407 } |
|
408 |
|
409 return OMX_ErrorNone; |
|
410 |
|
411 } |
|
412 |
|
413 #ifdef _OMXIL_COMMON_IL516C_ON |
|
414 OMX_ERRORTYPE |
|
415 XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest( |
|
416 OMX_U32 aLocalPortIndex) |
|
417 { |
|
418 DEBUG_PRINTF2(_L8("XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest : " |
|
419 "aLocalPortIndex[%d]"), aLocalPortIndex); |
|
420 |
|
421 __ASSERT_DEBUG(ipHandle && |
|
422 ipCallbacks && |
|
423 ipPortManager, |
|
424 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
425 |
|
426 // find out whether the port is tunnelled or not |
|
427 const TUint tunnelCount = iRegisteredTunnels.Count(); |
|
428 for (TUint i=0; i<tunnelCount; ++i) |
|
429 { |
|
430 if (iRegisteredTunnels[i].iLocalPortIndex == |
|
431 aLocalPortIndex) |
|
432 { |
|
433 |
|
434 OMX_COMPONENTTYPE* ipTunnelledComponent = |
|
435 static_cast<OMX_COMPONENTTYPE*>( |
|
436 iRegisteredTunnels[i]. |
|
437 iTunnelledComponentHandle); |
|
438 |
|
439 __ASSERT_DEBUG(ipTunnelledComponent, |
|
440 User::Panic(KOmxILCallbackManagerIfImplPanicCategory, 1)); |
|
441 |
|
442 DEBUG_PRINTF3(_L8("XOmxILCallbackManagerIfImpl::DoEjectBuffersRequest : " |
|
443 "iTunnelledComponent [%X] iTunnelledPortIndex[%u]"), |
|
444 ipTunnelledComponent, |
|
445 iRegisteredTunnels[i].iTunnelledPortIndex); |
|
446 |
|
447 OMX_PARAM_U32TYPE ejectBufferRequest; |
|
448 ejectBufferRequest.nSize = sizeof(OMX_PARAM_U32TYPE); |
|
449 ejectBufferRequest.nVersion = TOmxILSpecVersion(); |
|
450 ejectBufferRequest.nPortIndex = iRegisteredTunnels[i].iTunnelledPortIndex; |
|
451 ejectBufferRequest.nU32 = 1; // .... we can define a constant to be used here |
|
452 |
|
453 // Returned error ignored here. Cannot handle an error from the |
|
454 // tunnelled component |
|
455 OMX_SetConfig(ipTunnelledComponent, |
|
456 OMX_IndexConfigPortBufferReturnRequest, |
|
457 &ejectBufferRequest); |
|
458 |
|
459 break; |
|
460 } |
|
461 } |
|
462 |
|
463 return OMX_ErrorNone; |
|
464 |
|
465 } |
|
466 #endif |
|
467 |
|
468 void |
|
469 XOmxILCallbackManagerIfImpl::SignalOrPropagateBufferMarks( |
|
470 OMX_BUFFERHEADERTYPE* apBufferHeader, |
|
471 OMX_U32 aLocalPortIndex) |
|
472 { |
|
473 DEBUG_PRINTF(_L8("XOmxILCallbackManagerIfImpl::SignalOrPropagateBufferMarks()")); |
|
474 |
|
475 // Look for buffer marks to be signalled or propagated |
|
476 if (apBufferHeader->hMarkTargetComponent) |
|
477 { |
|
478 // See if this component is the buffer mark target component... |
|
479 if (apBufferHeader->hMarkTargetComponent == ipHandle) |
|
480 { |
|
481 // Inform the IL Client that a marked buffer has been processed... |
|
482 ipCallbacks->EventHandler(ipHandle, |
|
483 ipAppData, |
|
484 OMX_EventMark, |
|
485 0, |
|
486 0, |
|
487 apBufferHeader->pMarkData); |
|
488 |
|
489 // At this point, the mark has been delivered to the IL |
|
490 // Client...Remove the mark from the processed header... |
|
491 apBufferHeader->hMarkTargetComponent = 0; |
|
492 apBufferHeader->pMarkData = 0; |
|
493 |
|
494 } |
|
495 else |
|
496 { |
|
497 // Propagate the mark... |
|
498 |
|
499 // First find the buffer mark propagation port... |
|
500 const TInt index = iBufferMarkPropagationPorts.Find( |
|
501 TBufferMarkPropagationInfo(aLocalPortIndex), |
|
502 TIdentityRelation<TBufferMarkPropagationInfo>( |
|
503 &TBufferMarkPropagationInfo::Compare)); |
|
504 |
|
505 // Note that sink components don't propagate marks... |
|
506 if (index != KErrNotFound) |
|
507 { |
|
508 const TBufferMarkPropagationInfo& propInfo = |
|
509 iBufferMarkPropagationPorts[index]; |
|
510 |
|
511 // Let's check for the special case: The case for a source |
|
512 // component where the output port is both the port that marks |
|
513 // the headers and the port that propagates them ... Therefore |
|
514 // no need to store the mark for later propagation... |
|
515 if (propInfo.iPropagationPortIndex != aLocalPortIndex) |
|
516 { |
|
517 // Now, store temporarily the mark so the next time we send |
|
518 // a buffer done callback in that propagation port, we mark |
|
519 // that header accordingly... |
|
520 // Unsuccessful insertion is ignored. |
|
521 iBufferMarks.Append( |
|
522 TOutputPortBufferMarkInfo( |
|
523 propInfo.iPropagationPortIndex, |
|
524 apBufferHeader->hMarkTargetComponent, |
|
525 apBufferHeader->pMarkData)); |
|
526 |
|
527 // At this point the mark has been set for propagation to |
|
528 // an output port. Remove the mark from the processed |
|
529 // header... |
|
530 apBufferHeader->hMarkTargetComponent = 0; |
|
531 apBufferHeader->pMarkData = 0; |
|
532 } |
|
533 } |
|
534 } |
|
535 } |
|
536 else |
|
537 { |
|
538 if(iBufferMarks.Count() != 0) |
|
539 { |
|
540 // Let's see if we have a mark waiting to go out...This will find the |
|
541 // first mark in the local list of marks ... |
|
542 const TInt index = iBufferMarks.Find( |
|
543 TOutputPortBufferMarkInfo(aLocalPortIndex), |
|
544 TIdentityRelation<TOutputPortBufferMarkInfo>( |
|
545 &TOutputPortBufferMarkInfo::Compare)); |
|
546 if (index != KErrNotFound) |
|
547 { |
|
548 const TOutputPortBufferMarkInfo& markInfo = |
|
549 iBufferMarks[index]; |
|
550 |
|
551 // Mark the header... |
|
552 apBufferHeader->hMarkTargetComponent = markInfo.ipMarkTargetComponent; |
|
553 apBufferHeader->pMarkData = markInfo.ipMarkData; |
|
554 |
|
555 // Remove the mark info from the local store |
|
556 iBufferMarks.Remove(index); |
|
557 } |
|
558 } |
|
559 |
|
560 } |
|
561 |
|
562 |
|
563 } |
|
564 |
|
565 void |
|
566 XOmxILCallbackManagerIfImpl::HandleInsufficientResources() |
|
567 { |
|
568 DEBUG_PRINTF3(_L8("XOmxILCallbackManagerIfImpl::HandleInsufficientResources : ipCallbacks[%X] ipHandle[%X]"), ipCallbacks, ipHandle); |
|
569 |
|
570 if (ipCallbacks && ipHandle) |
|
571 { |
|
572 // This is a best-effort action, let's try to inform the IL Client of |
|
573 // the lack of resources... |
|
574 ipCallbacks->EventHandler(ipHandle, |
|
575 ipAppData, |
|
576 OMX_EventError, |
|
577 (OMX_U32)OMX_ErrorInsufficientResources, |
|
578 0, |
|
579 0); |
|
580 } |
|
581 } |