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 #ifndef MCEVIDEOCODEC_H |
|
20 #define MCEVIDEOCODEC_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "mcecodec.h" |
|
25 #include "mcedefs.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CMceComVideoCodec; |
|
29 class TMceVideoCodecFactory; |
|
30 class TCCMRVideoCodingOptions; |
|
31 |
|
32 // CONSTANTS |
|
33 const TMceCodecType KMceVideoCodec = 2; |
|
34 |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Base class for video codecs. |
|
40 * |
|
41 * It defines setters and getters for generic video codec attributes. |
|
42 * These attributes are used in single video stream and they |
|
43 * are negotiated with remote terminal. |
|
44 * |
|
45 * @lib mceclient.lib |
|
46 */ |
|
47 class CMceVideoCodec : public CMceCodec |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CMceVideoCodec(); |
|
55 |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Clones the codec. |
|
61 * @return cloned codec; ownership is transferred |
|
62 */ |
|
63 virtual CMceVideoCodec* CloneL() const = 0; |
|
64 |
|
65 /** |
|
66 * Sets maximum bitrate of the codec. |
|
67 * @param aMaxBitrate value of maximum bitrate used for encoding |
|
68 * @leave KErrNotSupported if codec doesn't support frame sizes issued |
|
69 */ |
|
70 virtual void SetMaxBitrateL( TUint aMaxBitrate ) = 0; |
|
71 |
|
72 /** |
|
73 * Sets resolutions allowed with the codec. |
|
74 * @param aResolutions bitfield of allowed resolutions |
|
75 * @leave KErrNotSupported if codec doesn't support resolutions issued |
|
76 */ |
|
77 virtual void SetAllowedResolutionsL( TUint aResolutions ) = 0; |
|
78 |
|
79 /** |
|
80 * Sets resolution of the video. |
|
81 * @param aResolution resolution of the video in pixels |
|
82 * @leave KErrNotSupported if codec doesn't support resolution issued |
|
83 */ |
|
84 virtual void SetResolutionL( TSize aResolution ) = 0; |
|
85 |
|
86 /** |
|
87 * Sets frame rates allowed with the codec. |
|
88 * @param aFrameRates allowed frame rate values as a bitfield |
|
89 * @leave KErrNotSupported if codec doesn't support frame rates issued |
|
90 */ |
|
91 virtual void SetAllowedFrameRatesL( TUint aFrameRates ) = 0; |
|
92 |
|
93 /** |
|
94 * Sets frame rate used with the codec for encoding. |
|
95 * @param aFrameRate frame rate for encoding |
|
96 * @leave KErrNotSupported if codec doesn't support frame rate value |
|
97 * issued |
|
98 */ |
|
99 virtual void SetFrameRateL( TReal aFrameRate ) = 0; |
|
100 |
|
101 /** |
|
102 * Sets preferred encoding device for uplink stream and preferred decoding |
|
103 * device for downlink stream. |
|
104 * @param aEncodingDecodingDevice |
|
105 * @leave KErrNotSupported if setting preferred device is not possible |
|
106 */ |
|
107 virtual void SetPreferredEncodingDecodingDeviceL( |
|
108 TUid aEncodingDecodingDevice ) = 0; |
|
109 |
|
110 /** |
|
111 * Set config key (sprop-parameter-sets) |
|
112 * @param aConfigKey, config key as Base64 encoded |
|
113 * @leave KErrNotSupported if setting config key is not possible |
|
114 */ |
|
115 virtual void SetConfigKeyL( const TDesC8& aConfigKey ) = 0; |
|
116 |
|
117 |
|
118 public: // Getters |
|
119 |
|
120 /** |
|
121 * Gets maximum bit rate currently allowed |
|
122 * @return maximum bit rate |
|
123 */ |
|
124 IMPORT_C TUint MaxBitRate() const; |
|
125 |
|
126 /** |
|
127 * Gets currently allowed resolutions as a bitfield |
|
128 * @return currently allowed resolutions as a bitfield |
|
129 */ |
|
130 IMPORT_C TUint AllowedResolutions() const; |
|
131 |
|
132 /** |
|
133 * Gets current resolution |
|
134 * @return current resolution |
|
135 */ |
|
136 IMPORT_C TSize Resolution() const; |
|
137 |
|
138 /** |
|
139 * Gets frame rates currently allowed for encoding and decoding. |
|
140 * @return allowed frame rate values as a bitfield |
|
141 */ |
|
142 IMPORT_C TUint AllowedFrameRates() const; |
|
143 |
|
144 /** |
|
145 * Gets frame rate currently used for encoding and decoding. |
|
146 * @return current frame rate value |
|
147 */ |
|
148 IMPORT_C TReal FrameRate() const; |
|
149 |
|
150 /** |
|
151 * Get config key (sprop-parameter-sets) |
|
152 * @return config key as Base64 encoded or NULL, ownership |
|
153 * is transferred. |
|
154 */ |
|
155 IMPORT_C HBufC8* ConfigKeyL() const; |
|
156 |
|
157 |
|
158 protected: // New functions |
|
159 |
|
160 /** |
|
161 * C++ default constructor. |
|
162 */ |
|
163 CMceVideoCodec(); |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 private: // Reserved for future use |
|
169 |
|
170 TAny* iReserved; |
|
171 |
|
172 public: // stub data |
|
173 |
|
174 TReal iFrameRate; |
|
175 TUint iMaxBitRate; |
|
176 TUint iAllowedResolutions; |
|
177 TInt iResolutionWidth; |
|
178 TInt iResolutionHeight; |
|
179 TUint iAllowedFrameRates; |
|
180 TUint iClockRate; |
|
181 |
|
182 HBufC8* iConfigKey; |
|
183 TUid iEncodingDecodingDevice; |
|
184 |
|
185 }; |
|
186 |
|
187 |
|
188 #endif |
|
189 |
|
190 // End of File |
|