|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #ifndef COMXILCLOCKPROCESSINGFUNCTION_H |
|
25 #define COMXILCLOCKPROCESSINGFUNCTION_H |
|
26 |
|
27 #include "omxilprocessingfunction.h" |
|
28 #include "clocksupervisor.h" |
|
29 #include "clockthreadnotifier.h" |
|
30 |
|
31 class COmxILClockComponent; |
|
32 |
|
33 class COmxILClockProcessingFunction : public COmxILProcessingFunction |
|
34 { |
|
35 public: |
|
36 static COmxILClockProcessingFunction* NewL(MOmxILCallbackNotificationIf& aCallbacks, COmxILClockComponent& aComponent); |
|
37 ~COmxILClockProcessingFunction(); |
|
38 |
|
39 OMX_ERRORTYPE ProduceRequest(OMX_INDEXTYPE aIdx, CClockSupervisor::TEntryPoint aEntryPoint, TAny* pComponentConfigStructure); |
|
40 |
|
41 // from COmxILProcessingFunction |
|
42 OMX_ERRORTYPE StateTransitionIndication(COmxILFsm::TStateIndex aNewState); |
|
43 OMX_ERRORTYPE BufferFlushingIndication(TUint32 aPortIndex, OMX_DIRTYPE aDirection); |
|
44 OMX_ERRORTYPE ParamIndication(OMX_INDEXTYPE aParamIndex, const TAny* apComponentParameterStructure); |
|
45 OMX_ERRORTYPE ConfigIndication(OMX_INDEXTYPE aConfigIndex, const TAny* apComponentConfigStructure); |
|
46 OMX_ERRORTYPE BufferIndication(OMX_BUFFERHEADERTYPE* apBufferHeader, OMX_DIRTYPE aDirection); |
|
47 OMX_BOOL BufferRemovalIndication(OMX_BUFFERHEADERTYPE* apBufferHeader, OMX_DIRTYPE aDirection); |
|
48 |
|
49 // used by CClockSupervisor |
|
50 OMX_BUFFERHEADERTYPE* AcquireBuffer(TInt aPortIndex); |
|
51 void SendBuffer(OMX_BUFFERHEADERTYPE* aBuffer); |
|
52 TBool PortEnabled(TInt aPortIndex) const; |
|
53 TBool IsExecuting() const; |
|
54 void InvalidateComponent(); |
|
55 |
|
56 |
|
57 private: |
|
58 COmxILClockProcessingFunction(MOmxILCallbackNotificationIf& aCallbacks, COmxILClockComponent& aComponent); |
|
59 void ConstructL(); |
|
60 void DoBufferFlushingIndication(TUint32 aPortIndex); |
|
61 |
|
62 private: |
|
63 CClockSupervisor* iClock; |
|
64 CClockThreadNotifier* iThreadNotifier; |
|
65 COmxILClockComponent& iComponent; |
|
66 RPointerArray<CCirBuf<OMX_BUFFERHEADERTYPE*> > iBufferQueues; |
|
67 RMutex iBufferMutex; |
|
68 TBool iExecuting; |
|
69 }; |
|
70 |
|
71 #endif //COMXILCLOCKPROCESSINGFUNCTION_H |