24 |
24 |
25 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
25 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
26 |
26 |
27 #include "omxilport.h" |
27 #include "omxilport.h" |
28 #include "omxilindexmanager.h" |
28 #include "omxilindexmanager.h" |
|
29 #include "omxilportmanagerif.h" |
29 |
30 |
30 /** |
31 /** |
31 Port Manager Panic category |
32 Port Manager Panic category |
32 */ |
33 */ |
33 _LIT(KOmxILPortManagerPanicCategory, "OmxILPortManager"); |
34 _LIT(KOmxILPortManagerPanicCategory, "OmxILPortManager"); |
43 It keeps and manages a list of the ports configured in the component. The |
44 It keeps and manages a list of the ports configured in the component. The |
44 Port Manager is used by the FSM object (@see COmxILFsm) to communicate with |
45 Port Manager is used by the FSM object (@see COmxILFsm) to communicate with |
45 the ports. |
46 the ports. |
46 |
47 |
47 */ |
48 */ |
48 NONSHARABLE_CLASS(COmxILPortManager) : public COmxILIndexManager |
49 NONSHARABLE_CLASS(COmxILPortManager) : public COmxILIndexManager, |
|
50 public MOmxILPortManagerIf |
49 { |
51 { |
50 |
52 |
51 public: |
53 public: |
52 /* |
54 |
53 @param aImmediateReturnTimeBuffer Indicates whether the component needs to |
|
54 return the arriving buffer to the sender immediately or not . This is particularly |
|
55 related to time port (e.g. COmxILClientClockPort), where notification |
|
56 could be requested on every frame. Returning the buffer immediately to the |
|
57 the sender (e.g. Clock Component) would avoid the sender from buffer starvation. |
|
58 By default, time related component will need to return the buffer sooner, except |
|
59 Clock Component (the buffer sender) |
|
60 */ |
|
61 IMPORT_C static COmxILPortManager* NewL( |
55 IMPORT_C static COmxILPortManager* NewL( |
62 COmxILProcessingFunction& aProcessingFunction, |
56 COmxILProcessingFunction& aProcessingFunction, |
63 MOmxILCallbackManagerIf& aCallbacks, |
57 MOmxILCallbackManagerIf& aCallbacks, |
64 const OMX_VERSIONTYPE& aOmxVersion, |
58 const OMX_VERSIONTYPE& aOmxVersion, |
65 OMX_U32 aNumberOfAudioPorts, |
59 OMX_U32 aNumberOfAudioPorts, |
119 |
113 |
120 OMX_ERRORTYPE TunnellingBufferDeallocation( |
114 OMX_ERRORTYPE TunnellingBufferDeallocation( |
121 TBool& aComponentDePopulationCompleted); |
115 TBool& aComponentDePopulationCompleted); |
122 |
116 |
123 OMX_ERRORTYPE InitiateTunnellingDataFlow( |
117 OMX_ERRORTYPE InitiateTunnellingDataFlow( |
124 OMX_U32 aPortIndex = OMX_ALL); |
118 OMX_U32 aPortIndex = OMX_ALL, |
|
119 OMX_BOOL aSuppliersAndNonSuppliers = OMX_FALSE); |
125 |
120 |
126 OMX_ERRORTYPE BufferIndication( |
121 OMX_ERRORTYPE BufferIndication( |
127 OMX_BUFFERHEADERTYPE* apBufferHeader, |
122 OMX_BUFFERHEADERTYPE* apBufferHeader, |
128 OMX_DIRTYPE aDirection, |
123 OMX_DIRTYPE aDirection, |
129 OMX_BOOL aPortIsDisabled = OMX_FALSE); |
124 OMX_BOOL aPortIsDisabled = OMX_FALSE); |
167 |
162 |
168 |
163 |
169 private: |
164 private: |
170 |
165 |
171 COmxILPortManager(COmxILProcessingFunction& aProcessingFunction, |
166 COmxILPortManager(COmxILProcessingFunction& aProcessingFunction, |
172 MOmxILCallbackManagerIf& aCallbacks, |
167 MOmxILCallbackManagerIf& aCallbacks); |
173 const OMX_VERSIONTYPE& aOmxVersion, |
168 |
174 OMX_U32 aNumberOfAudioPorts, |
169 // From MOmxILPortManagerIf |
175 OMX_U32 aStartAudioPortNumber, |
170 void ConstructL(COmxILProcessingFunction& aProcessingFunction, |
176 OMX_U32 aNumberOfImagePorts, |
171 MOmxILCallbackManagerIf& aCallbacks, |
177 OMX_U32 aStartImagePortNumber, |
172 const OMX_VERSIONTYPE& aOmxVersion, |
178 OMX_U32 aNumberOfVideoPorts, |
173 OMX_U32 aNumberOfAudioPorts, |
179 OMX_U32 aStartVideoPortNumber, |
174 OMX_U32 aStartAudioPortNumber, |
180 OMX_U32 aNumberOfOtherPorts, |
175 OMX_U32 aNumberOfImagePorts, |
181 OMX_U32 aStartOtherPortNumber, |
176 OMX_U32 aStartImagePortNumber, |
182 OMX_BOOL aImmediateReturnTimeBuffer); |
177 OMX_U32 aNumberOfVideoPorts, |
183 |
178 OMX_U32 aStartVideoPortNumber, |
184 void ConstructL(); |
179 OMX_U32 aNumberOfOtherPorts, |
|
180 OMX_U32 aStartOtherPortNumber, |
|
181 OMX_BOOL aImmediateReturnTimeBuffer = OMX_TRUE); |
|
182 |
185 |
183 |
186 void AppendPortL(const COmxILPort* aPort); |
184 void AppendPortL(const COmxILPort* aPort); |
187 |
185 |
188 inline OMX_ERRORTYPE CheckPortIndex(OMX_U32 aPortIndex) const; |
186 inline OMX_ERRORTYPE CheckPortIndex(OMX_U32 aPortIndex) const; |
189 |
187 |