|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CMCECOMH263CODEC_H |
|
22 #define CMCECOMH263CODEC_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <mceh263codec.h> |
|
26 #include "mcecomvideocodec.h" |
|
27 #include "mcedefs.h" |
|
28 |
|
29 const TInt KMceH263Level10 = 10; |
|
30 const TReal KMceH263Level10Framerate = 15; |
|
31 const TInt KMceH263Level45 = 45; |
|
32 const TReal KMceH263Level45Framerate = 15; |
|
33 const TInt KMceH263DefaultFrameSize = 3000; |
|
34 const TInt KMceH263DefaultAllowedBitrate = KMceAllowedH263BitrateAll; |
|
35 const TInt KMceH263DefaultMaxBitrate = KMceH263Level10Bitrate; |
|
36 const TInt KMceH263DefaultBitrate = KMceH263Level10Bitrate; |
|
37 |
|
38 |
|
39 // CLASS DECLARATION |
|
40 /** |
|
41 * Container class for the codec information. |
|
42 * |
|
43 * @lib |
|
44 */ |
|
45 class CMceComH263Codec : public CMceComVideoCodec |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * @param aSdpName sdp name |
|
52 */ |
|
53 static CMceComH263Codec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 * @param aSdpName sdp name |
|
58 */ |
|
59 static CMceComH263Codec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 ~CMceComH263Codec(); |
|
65 |
|
66 public: // from CMceComCodec |
|
67 |
|
68 /** |
|
69 * Sets bitrate used with codec for encoding. |
|
70 * @param aBitrate bitrate value for encoding |
|
71 * @return KErrNotSupported if codec doesn't support bitrate |
|
72 * value issued |
|
73 */ |
|
74 TInt SetBitrate( TUint aBitrate ); |
|
75 |
|
76 /** |
|
77 * Sets bitrates allowed with codec. |
|
78 * @param aBitrates allowed bitrate values |
|
79 * @return KErrNotSupported if codec doesn't support bitrate |
|
80 * values issued |
|
81 */ |
|
82 TInt SetAllowedBitrates( TUint aBitrates ); |
|
83 |
|
84 /** |
|
85 * Returns max bit rate |
|
86 * @return max bit rate |
|
87 */ |
|
88 TUint GetMaxBitRate(); |
|
89 |
|
90 /** |
|
91 * Sets maximum bitrate of the codec. |
|
92 * @param aMaxBitrate value of maximum bitrate used for encoding |
|
93 * @return KErrNotSupported if codec doesn't support bitrate |
|
94 * values issued |
|
95 */ |
|
96 TInt SetMaxBitrate( TUint aMaxBitrate ); |
|
97 |
|
98 /** |
|
99 * Resolve allowed bitrates based on given bitrate value. |
|
100 * @param aBitrate |
|
101 * @param aAllowedBitrates, on return contains allowed bitrates |
|
102 * @return error code |
|
103 */ |
|
104 TInt ResolveAllowedBitrates( TUint aBitrate, TUint& aAllowedBitrates ); |
|
105 |
|
106 public: // serialization etc |
|
107 |
|
108 /** |
|
109 * Clones |
|
110 * @return clone |
|
111 */ |
|
112 CMceComVideoCodec* CloneL(); |
|
113 |
|
114 private: |
|
115 |
|
116 /** |
|
117 * C++ default constructor. |
|
118 */ |
|
119 CMceComH263Codec(); |
|
120 |
|
121 /** |
|
122 * By default Symbian 2nd phase constructor is private. |
|
123 */ |
|
124 void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); |
|
125 |
|
126 /** |
|
127 * second-phase copy constructor |
|
128 */ |
|
129 void ConstructL( CMceComH263Codec& aCodec ); |
|
130 |
|
131 |
|
132 }; |
|
133 |
|
134 |
|
135 #endif // CMCECOMH263CODEC_H |
|
136 |
|
137 // End of File |