|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMCEAMRWBCODEC_H |
|
22 #define CMCEAMRWBCODEC_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <mceamrcodec.h> |
|
26 #include <mcedefs.h> |
|
27 |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // AMR-WB Codec possible bitrates |
|
32 const TInt KMceAmrWbBitrate660( 6600 ); |
|
33 const TInt KMceAmrWbBitrate885( 8850 ); |
|
34 const TInt KMceAmrWbBitrate1265( 12650 ); |
|
35 const TInt KMceAmrWbBitrate1425( 14250 ); |
|
36 const TInt KMceAmrWbBitrate1585( 15850 ); |
|
37 const TInt KMceAmrWbBitrate1825( 18250 ); |
|
38 const TInt KMceAmrWbBitrate1985( 19850 ); |
|
39 const TInt KMceAmrWbBitrate2305( 23050 ); |
|
40 const TInt KMceAmrWbBitrate2385( 23850 ); |
|
41 |
|
42 const TUint KMceAllowedAmrWbBitrate660 = 0x0001; |
|
43 const TUint KMceAllowedAmrWbBitrate885 = 0x0002; |
|
44 const TUint KMceAllowedAmrWbBitrate1265 = 0x0004; |
|
45 const TUint KMceAllowedAmrWbBitrate1425 = 0x0008; |
|
46 const TUint KMceAllowedAmrWbBitrate1585 = 0x0010; |
|
47 const TUint KMceAllowedAmrWbBitrate1825 = 0x0020; |
|
48 const TUint KMceAllowedAmrWbBitrate1985 = 0x0040; |
|
49 const TUint KMceAllowedAmrWbBitrate2305 = 0x0080; |
|
50 const TUint KMceAllowedAmrWbBitrate2385 = 0x0100; |
|
51 const TUint KMceAllowedAmrWbBitrateAll = 0x0FFF; |
|
52 |
|
53 // Allowed bitrates bitfield can contain additional information |
|
54 const TUint KMceAllowedAmrWbAdditionalInfo = 0xF000; |
|
55 |
|
56 // If this bit is not present, mode-change-period=1 |
|
57 const TUint KMceAllowedAmrWbModeChangePeriod2 = 0x1000; |
|
58 |
|
59 // If this bit is not present, mode-change-neighbor=0 |
|
60 const TUint KMceAllowedAmrWbModeChangeNeighbor1 = 0x2000; |
|
61 |
|
62 |
|
63 // CLASS DECLARATION |
|
64 |
|
65 /** |
|
66 * Class for the AMR WB codec information. |
|
67 * |
|
68 * It checks the validity of inserted values for AMR WB. |
|
69 * |
|
70 * @lib mceclient.lib |
|
71 */ |
|
72 class CMceAmrWbCodec : public CMceAmrCodec |
|
73 { |
|
74 public: // Constructors and destructor |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 IMPORT_C ~CMceAmrWbCodec(); |
|
80 |
|
81 public: // From CMceAmrCodec |
|
82 |
|
83 /** |
|
84 * Clones codec, ownership is transferred. |
|
85 * @return cloned codec |
|
86 */ |
|
87 IMPORT_C CMceAudioCodec* CloneL() const; |
|
88 |
|
89 public: |
|
90 |
|
91 /** |
|
92 * Two-phased constructor. |
|
93 * @param aSdpName sdp name |
|
94 */ |
|
95 static CMceAmrWbCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
96 |
|
97 /** |
|
98 * Two-phased constructor. |
|
99 * @param aSdpName sdp name |
|
100 */ |
|
101 static CMceAmrWbCodec* NewLC(TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
102 |
|
103 private: |
|
104 |
|
105 /** |
|
106 * C++ default constructor. |
|
107 */ |
|
108 CMceAmrWbCodec(); |
|
109 |
|
110 /** |
|
111 * By default Symbian 2nd phase constructor is private. |
|
112 */ |
|
113 void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
114 |
|
115 |
|
116 // For testing |
|
117 MCE_UNIT_TEST_DEFS |
|
118 }; |
|
119 |
|
120 |
|
121 #endif // CMCEAMRWBCODEC_H |
|
122 |
|
123 // End of File |