|
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 file defines the AAC Play Controller Decoder class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAACPLAYCONTROLLERDECODER_H |
|
20 #define CAACPLAYCONTROLLERDECODER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "AdvancedAudioDecoder.h" |
|
24 #include <EAacPlusUtil.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CMMFCodec; |
|
28 class CEAacPlusUtil; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * This class defines the AAC play controller decoder. |
|
33 * |
|
34 * @lib AACAudioPlayController.lib |
|
35 * @since 3.0 |
|
36 */ |
|
37 class CAACAudioPlayControllerDecoder : public CAdvancedAudioDecoder |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CAACAudioPlayControllerDecoder* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CAACAudioPlayControllerDecoder(); |
|
51 |
|
52 public: // Functions from base classes |
|
53 |
|
54 /** |
|
55 * From CAdvancedAudioDecoder |
|
56 * Check if the audio converter is hardware accelerated. |
|
57 * @since 3.0 |
|
58 * @return ETrue if hardare accelerated, otherwise, EFalse. |
|
59 */ |
|
60 TBool IsHwAccelerated(); |
|
61 TCodecProcessResult ProcessL(CMMFBuffer& aSrc, CMMFBuffer& aDst); |
|
62 TInt CodecConfig(RArray<TInt>& aCodecConfigData); |
|
63 TInt CodecCmd(TCodecCmd aCmd); |
|
64 |
|
65 private: // Functions from base classes |
|
66 void ResetL(); |
|
67 |
|
68 private: |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 CAACAudioPlayControllerDecoder(); |
|
73 |
|
74 /** |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 // these are defined for us in hwdecoder implementation only |
|
80 void InitCodecConfigs(); |
|
81 TInt SeekSync(TUint8* aBuf, TInt aBufLen); |
|
82 TInt FrameLength(const TUint8* aBuf,TInt aBufLen,TInt& aFrameLength); |
|
83 TInt SeekAdtsSync(TUint8* aBuf, TInt aBufLen); |
|
84 TBool IsValidAdtsFrame(const TUint8* aPtr, TInt aBufLen); |
|
85 |
|
86 private: // Data |
|
87 |
|
88 CEAacPlusUtil* iAacUtil; |
|
89 CEAacPlusUtil::TEAacPlusFormatType iFormatType; |
|
90 CEAacPlusUtil::TEAacPlusFrameLenConfig iFrameLenConfig; |
|
91 }; |
|
92 |
|
93 |
|
94 #endif // CAACPLAYCONTROLLERDECODER_H |
|
95 |