|
1 /* |
|
2 * Copyright (c) 2004 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: Class definition for the AMR utility functions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAMRAUDIOCONTROLLERUTILITY_H |
|
21 #define CAMRAUDIOCONTROLLERUTILITY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "AdvancedAudioUtility.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CMMFDataBuffer; |
|
28 |
|
29 // CLASS DEFINITIONS |
|
30 |
|
31 /** |
|
32 * This class provides AMR utility functions. |
|
33 * |
|
34 * @lib CAMRAudioControllerUtility.lib |
|
35 * @since 3.0 |
|
36 */ |
|
37 class CAMRAudioControllerUtility : public CAdvancedAudioUtility |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 IMPORT_C static CAMRAudioControllerUtility* NewL(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 IMPORT_C virtual ~CAMRAudioControllerUtility(); |
|
50 |
|
51 public: // Functions from base classes |
|
52 |
|
53 /** |
|
54 * From CAdvancedAudioUtility |
|
55 * Scans header information |
|
56 * @param aDataBuf |
|
57 * @return void |
|
58 */ |
|
59 void ScanHeaderL(CMMFDataBuffer* aDataBuf); |
|
60 |
|
61 /** |
|
62 * From CAdvancedAudioUtility |
|
63 * Returns the byte position of the first frame. |
|
64 * @param aBuf Pointer to the data |
|
65 * @param aBufLen Length of the data |
|
66 * @return byte position of the first frame |
|
67 */ |
|
68 TInt SeekSync( CMMFDataBuffer* aBuf, TInt aBufLen ); |
|
69 |
|
70 /** |
|
71 * From CAdvancedAudioUtility |
|
72 * Returns frame info. |
|
73 * @param aBuf Pointer to the data |
|
74 * @param aBufLen Length of the data |
|
75 * @param aInfo Contains the frame info on return |
|
76 * @return frame length |
|
77 */ |
|
78 TInt FrameInfo( const TUint8* aBuf, TInt aBufLen, TAudioFrameInfo& aInfo ); |
|
79 |
|
80 /** |
|
81 * From CAdvancedAudioUtility |
|
82 * Returns frame header size. |
|
83 * @param none |
|
84 * @return frame header size |
|
85 */ |
|
86 TInt FrameHeaderSize(); |
|
87 |
|
88 private: |
|
89 |
|
90 /** |
|
91 * C++ default constructor. |
|
92 */ |
|
93 CAMRAudioControllerUtility(); |
|
94 |
|
95 /** |
|
96 * By default Symbian 2nd phase constructor is private. |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 private: // Data |
|
101 |
|
102 TInt iFrameDataOffset; |
|
103 }; |
|
104 |
|
105 #endif // CAMRAUDIOCONTROLLERUTILITY_H |
|
106 |
|
107 // End of File |