|
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 #ifndef OMXILMICSOURCEAPB0PORT_H |
|
23 #define OMXILMICSOURCEAPB0PORT_H |
|
24 |
|
25 #include <openmax/il/common/omxilaudioport.h> |
|
26 |
|
27 class COmxILMicSourceProcessingFunction; |
|
28 |
|
29 class COmxILMicSourceAPB0Port : public COmxILAudioPort |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 static COmxILMicSourceAPB0Port* NewL( |
|
35 const TOmxILCommonPortData& aCommonPortData, |
|
36 const RArray<OMX_AUDIO_CODINGTYPE>& aSupportedAudioFormats, |
|
37 const OMX_AUDIO_PARAM_PCMMODETYPE& aParamAudioPcm, |
|
38 const OMX_AUDIO_CONFIG_VOLUMETYPE& aConfigAudioVolume, |
|
39 const OMX_AUDIO_CONFIG_MUTETYPE& aConfigAudioMute, |
|
40 COmxILMicSourceProcessingFunction& aProcessingFunction); |
|
41 |
|
42 |
|
43 ~COmxILMicSourceAPB0Port(); |
|
44 |
|
45 OMX_ERRORTYPE GetLocalOmxParamIndexes(RArray<TUint>& aIndexArray) const; |
|
46 |
|
47 OMX_ERRORTYPE GetLocalOmxConfigIndexes(RArray<TUint>& aIndexArray) const; |
|
48 |
|
49 OMX_ERRORTYPE GetParameter(OMX_INDEXTYPE aParamIndex, |
|
50 TAny* apComponentParameterStructure) const; |
|
51 |
|
52 OMX_ERRORTYPE SetParameter(OMX_INDEXTYPE aParamIndex, |
|
53 const TAny* apComponentParameterStructure, |
|
54 TBool& aUpdateProcessingFunction); |
|
55 |
|
56 OMX_ERRORTYPE GetConfig(OMX_INDEXTYPE aConfigIndex, |
|
57 TAny* apComponentConfigStructure) const; |
|
58 |
|
59 OMX_ERRORTYPE SetConfig(OMX_INDEXTYPE aConfigIndex, |
|
60 const TAny* apComponentConfigStructure, |
|
61 TBool& aUpdateProcessingFunction); |
|
62 |
|
63 protected: |
|
64 |
|
65 COmxILMicSourceAPB0Port( |
|
66 const OMX_AUDIO_PARAM_PCMMODETYPE& aParamAudioPcm, |
|
67 const OMX_AUDIO_CONFIG_VOLUMETYPE& aConfigAudioVolume, |
|
68 const OMX_AUDIO_CONFIG_MUTETYPE& aConfigAudioMute, |
|
69 COmxILMicSourceProcessingFunction& iProcessingFunction); |
|
70 |
|
71 void ConstructL(const TOmxILCommonPortData& aCommonPortData, const RArray<OMX_AUDIO_CODINGTYPE>& aSupportedAudioFormats); |
|
72 |
|
73 OMX_ERRORTYPE SetFormatInPortDefinition( |
|
74 const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition, |
|
75 TBool& aUpdateProcessingFunction); |
|
76 |
|
77 TBool IsTunnelledPortCompatible( |
|
78 const OMX_PARAM_PORTDEFINITIONTYPE& aPortDefinition) const; |
|
79 |
|
80 OMX_ERRORTYPE DoBufferAllocation(OMX_U32 aSizeBytes, OMX_U8*& apPortSpecificBuffer, OMX_PTR& apPortPrivate, OMX_PTR& apPlatformPrivate, OMX_PTR apAppPrivate = 0); |
|
81 void DoBufferDeallocation(OMX_PTR apPortSpecificBuffer, OMX_PTR apPortPrivate, OMX_PTR apPlatformPrivate, OMX_PTR apAppPrivate = 0); |
|
82 OMX_ERRORTYPE DoBufferWrapping(OMX_U32 aSizeBytes, OMX_U8* apBuffer, OMX_PTR& apPortPrivate, OMX_PTR& apPlatformPrivate, OMX_PTR apAppPrivate = 0); |
|
83 void DoBufferUnwrapping(OMX_PTR apPortSpecificBuffer, OMX_PTR apPortPrivate, OMX_PTR apPlatformPrivate, OMX_PTR apAppPrivate = 0); |
|
84 |
|
85 protected: |
|
86 |
|
87 OMX_AUDIO_PARAM_PCMMODETYPE iParamAudioPcm; |
|
88 OMX_AUDIO_CONFIG_VOLUMETYPE iConfigAudioVolume; |
|
89 OMX_AUDIO_CONFIG_MUTETYPE iConfigAudioMute; |
|
90 RBuf8 iMimeTypeBuf; |
|
91 |
|
92 COmxILMicSourceProcessingFunction& iProcessingFunction; |
|
93 }; |
|
94 |
|
95 #endif // OMXILMICSOURCEAPB0PORT_H |