|
1 /* |
|
2 * Copyright (c) 2006 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: This class implements resource file handling for AAC PlayControllerPlugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "AACAudioPlayControllerResource.h" |
|
21 #include <AACAudioPlayControllerResource.rsg> |
|
22 #include <data_caging_path_literals.hrh> |
|
23 |
|
24 // LOCAL CONSTANTS AND MACROS |
|
25 _LIT(KDirAndFile, "z:AACAudioPlayControllerResource.rsc"); |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CAACAudioPlayControllerResource::CAACAudioPlayControllerResource |
|
31 // C++ default constructor can NOT contain any code, that |
|
32 // might leave. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CAACAudioPlayControllerResource::CAACAudioPlayControllerResource() |
|
36 { |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CAACAudioPlayControllerResource::ConstructL |
|
41 // Symbian 2nd phase constructor can leave. |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 void CAACAudioPlayControllerResource::ConstructL() |
|
45 { |
|
46 #ifdef _DEBUG |
|
47 RDebug::Print(_L("CAACAudioPlayControllerResource::ConstructL")); |
|
48 #endif |
|
49 // ReadResourceFileL(KResourceFile, AACDECODER); |
|
50 TParse* fp = new(ELeave) TParse(); |
|
51 fp->Set(KDirAndFile, &KDC_RESOURCE_FILES_DIR, NULL); |
|
52 |
|
53 ReadResourceFileL(fp->FullName(), AACDECODER); |
|
54 delete fp; |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // CAACAudioPlayControllerResource::NewL |
|
59 // Two-phased constructor. |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 CAACAudioPlayControllerResource* CAACAudioPlayControllerResource::NewL() |
|
63 { |
|
64 #ifdef _DEBUG |
|
65 RDebug::Print(_L("CAACAudioPlayControllerResource::NewL")); |
|
66 #endif |
|
67 CAACAudioPlayControllerResource* self = new(ELeave) CAACAudioPlayControllerResource(); |
|
68 CleanupStack::PushL(self); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop(self); // self |
|
71 return self; |
|
72 } |
|
73 |
|
74 // Destructor |
|
75 CAACAudioPlayControllerResource::~CAACAudioPlayControllerResource() |
|
76 { |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CAACAudioPlayControllerResource::ReadCodecConfigParametersL |
|
81 // Reads the configuration parameters for AAC Decoder. |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 void CAACAudioPlayControllerResource::ReadCodecConfigParametersL() |
|
85 { |
|
86 #ifdef _DEBUG |
|
87 RDebug::Print(_L("CAACAudioPlayControllerResource::ReadCodecConfigParametersL")); |
|
88 #endif |
|
89 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [0] Input Sampling Freq |
|
90 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [1] Input Channels |
|
91 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [2] Input Profile |
|
92 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [3] Input Frame Length |
|
93 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [4] Down Mixing |
|
94 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [5] Output Channel Selection |
|
95 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [6] Decimation Factor |
|
96 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [7] Concealment Level |
|
97 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [8] Sample Length |
|
98 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [9] Output Sample Frequency |
|
99 iCodecConfigParams.Append(iResourceReader.ReadInt32()); // [10] Ext Object Type |
|
100 iCodecConfigParams.Append(NULL); // [11] frame table pointer |
|
101 iCodecConfigParams.Append(NULL); // [12] format type - TEAacPlusFormat |
|
102 iCodecConfigParams.Append(NULL); // [13] render control |
|
103 iCodecConfigParams.Append(NULL); // [14] mark play end control |
|
104 iCodecConfigParams.Append(NULL); // [15] enable / disable |
|
105 } |
|
106 |
|
107 // End of File |