|
1 // Copyright (c) 2006-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 #ifndef DEVSOUNDADAPTATIONINFOIMPLBODY_H |
|
17 #define DEVSOUNDADAPTATIONINFOIMPLBODY_H |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <ecom/ecom.h> |
|
21 #include <a3f/a3f_trace_utils.h> |
|
22 #include <a3f/a3ffourcclookup.h> |
|
23 #include <mmf/common/mmfutilities.h> // For TFourCC |
|
24 #include "devsoundadaptationinfoimpl.h" |
|
25 |
|
26 #define KFOURCCLENGTH 4 |
|
27 |
|
28 class MA3FDevSoundAdaptationInfoObserver; |
|
29 |
|
30 /* |
|
31 The real implementation of CA3FDevsoundAdaptationInfo. |
|
32 */ |
|
33 NONSHARABLE_CLASS(CA3FDevSoundAdaptationInfoImpl::CBody) : public CActive, public MTruePauseCustomInterface |
|
34 { |
|
35 public: |
|
36 |
|
37 /* |
|
38 Factory |
|
39 */ |
|
40 static CBody* NewL(MA3FDevSoundAdaptationInfoObserver& aObserver, CFourCCConvertor& aFourCcConvertor); |
|
41 |
|
42 /* |
|
43 Destructor. |
|
44 */ |
|
45 ~CBody(); |
|
46 |
|
47 TInt RequestMaxGain(TUid aCodecType); |
|
48 TInt RequestSupportedFormats(TUid aCodecType, RArray<TUid>& aSupportedFormats); |
|
49 |
|
50 // From CActive |
|
51 TInt Extension_(TUint aExtensionId, TAny*& aExtPtr, TAny*); |
|
52 |
|
53 // from MTruePauseCustomInterface |
|
54 TBool IsResumeSupported(TUid aCodecType, TUid aFormat); |
|
55 |
|
56 private: |
|
57 |
|
58 static TBool IsDataTypeMatch(TFourCC aFourCCPCM16,TFourCC aFourCC); |
|
59 |
|
60 void SeekHwDevicePluginsL(RArray<TFourCC>& aSupportedDataTypes, TUid aCodecType); |
|
61 |
|
62 void ReadSupportedFormatsL(TUid aCodecType, RArray<TUid>& aSupportedFormats); |
|
63 |
|
64 TBool FourCCExists(RArray<TFourCC>& aSupportedDataTypes,TFourCC aFourCCEntry); |
|
65 |
|
66 void ReadFourCC(CImplementationInformation* aHwDeviceResourceEntry, TFourCC& aFourCCLeft, TFourCC& aFourCCRight); |
|
67 |
|
68 protected: |
|
69 void ConstructL(MA3FDevSoundAdaptationInfoObserver& aAdaptationInfoObserver, CFourCCConvertor& aFourCcConvertor); |
|
70 CBody(); |
|
71 |
|
72 // from CActive |
|
73 void RunL(); |
|
74 void DoCancel(); |
|
75 TInt RunError(TInt aError); |
|
76 |
|
77 private: |
|
78 |
|
79 MA3FDevSoundAdaptationInfoObserver* iAdaptationInfoObserver; |
|
80 |
|
81 // Pointer to fourcc convertor |
|
82 // Not owned. |
|
83 CFourCCConvertor* iFourCcConvertor; |
|
84 |
|
85 TBool iMaxGainRequested; |
|
86 TBool iFormatsRequested; |
|
87 |
|
88 TUid iCodecType; |
|
89 }; |
|
90 |
|
91 |
|
92 #endif // DEVSOUNDADAPTATIONINFOIMPLBODY_H |