|
1 /* |
|
2 * Copyright (c) 2005 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 CMCECOMAMRWBCODEC_H |
|
22 #define CMCECOMAMRWBCODEC_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "mcecomaudiocodec.h" |
|
26 #include "mcecomamrcodec.h" |
|
27 #include "mcedefs.h" |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * Container class for the codec information. |
|
33 * |
|
34 * @lib |
|
35 */ |
|
36 class CMceComAMRWbCodec : public CMceComAMRCodec |
|
37 |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 * @param aSdpName sdp name |
|
44 */ |
|
45 static CMceComAMRWbCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aSdpName sdp name |
|
50 */ |
|
51 static CMceComAMRWbCodec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CMceComAMRWbCodec(); |
|
57 |
|
58 public: // from CMceComCodec |
|
59 |
|
60 /** |
|
61 * Sets bitrate used with codec for encoding. |
|
62 * @param aBitrate bitrate value for encoding |
|
63 * @return KErrNotSupported if codec doesn't support bitrate |
|
64 * value issued |
|
65 */ |
|
66 TInt SetBitrate( TUint aBitrate ); |
|
67 |
|
68 /** |
|
69 * Sets bitrates allowed with codec. |
|
70 * @param aBitrates allowed bitrate values |
|
71 * @return KErrNotSupported if codec doesn't support bitrate |
|
72 * values issued |
|
73 */ |
|
74 TInt SetAllowedBitrates( TUint aBitrates ); |
|
75 |
|
76 /** |
|
77 * Returns max bit rate |
|
78 * @return max bit rate |
|
79 */ |
|
80 TUint GetMaxBitRate(); |
|
81 |
|
82 /** |
|
83 * Resolve allowed bitrates based on given bitrate value. |
|
84 * @param aBitrate |
|
85 * @param aAllowedBitrates, on return contains allowed bitrates |
|
86 * @return error code |
|
87 */ |
|
88 TInt ResolveAllowedBitrates( TUint aBitrate, TUint& aAllowedBitrates ); |
|
89 |
|
90 |
|
91 #ifdef MCE_COMMON_SERVER_SIDE |
|
92 |
|
93 protected: // from CMceComCodec |
|
94 |
|
95 /** |
|
96 * Validates codec values based on mcc codec |
|
97 * @param aMccCodec mcc codec |
|
98 * @param aStream stream |
|
99 * @param aRole role |
|
100 */ |
|
101 CMceComCodec* DoMccValidateL( CMccCodecInformation& aMccCodec, |
|
102 CMceSrvStream& aStream, |
|
103 TMceNegotiationRole aRole ); |
|
104 |
|
105 /** |
|
106 * Set default fmtp line |
|
107 */ |
|
108 void DoSetDefaultFmtpAttributeL(); |
|
109 |
|
110 #endif |
|
111 |
|
112 public: // serialization etc |
|
113 |
|
114 /** |
|
115 * Clones |
|
116 */ |
|
117 CMceComAudioCodec* CloneL(); |
|
118 |
|
119 private: |
|
120 |
|
121 /** |
|
122 * C++ default constructor. |
|
123 */ |
|
124 CMceComAMRWbCodec(); |
|
125 |
|
126 #ifdef EUNIT_TEST |
|
127 friend class UT_CMceComAMRWbCodec; |
|
128 #endif |
|
129 |
|
130 }; |
|
131 |
|
132 |
|
133 |
|
134 #endif // CMCECOMAMRWBCODEC_H |
|
135 |
|
136 // End of File |