|
1 /* |
|
2 * Copyright (c) 2007-2009 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: Types used by camera dynamic configuration. Previously |
|
15 * defined separately for each product in camproductconstants.h |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CAMCONFIGURATIONTYPES_H |
|
22 #define CAMCONFIGURATIONTYPES_H |
|
23 |
|
24 |
|
25 // Video qualities |
|
26 // Used to also index to the KVideoQualitySettings array. |
|
27 // Make sure the CamUtility returns rigth count of |
|
28 // supported video qualities. |
|
29 enum TCamVideoQuality |
|
30 { |
|
31 EVideoHigh, |
|
32 EVideoNormal, |
|
33 EVideoMMS, |
|
34 EVideoQualityLast |
|
35 }; |
|
36 |
|
37 |
|
38 enum TCamImageQuality |
|
39 { |
|
40 EImageQualityPrintHigh, |
|
41 EImageQualityPrint, |
|
42 EImageQualityPrintLow, |
|
43 EImageQualityEmail, |
|
44 EImageQualityMMS, |
|
45 EImageQualitySecondary, |
|
46 EImageQualityLast |
|
47 }; |
|
48 |
|
49 enum TCamImageResolution |
|
50 { |
|
51 EImageResolutionMMS, // 0.3 MPix / MMS |
|
52 EImageResolution0_8MP, // 0.8 MPix = XGA |
|
53 EImageResolution1MP, // 1 MPix |
|
54 EImageResolution1_3MP, // 1.3 MPix |
|
55 EImageResolution2MP, // 2 MPix |
|
56 EImageResolution3MP, // 3 MPix |
|
57 EImageResolution5MP, // 5 MPix |
|
58 EImageResolution8MP, // 8 MPix |
|
59 EImageResolution12MP, // 12 MPix |
|
60 EImageResolutionW6MP, // 6 MPix 16:9 |
|
61 EImageResolutionW9MP, // 9 MPix 16:9 |
|
62 EImageResolutionCIF, // CIF |
|
63 EImageResolutionQVGA, // QVGA, for secondary camera |
|
64 EImageResolutionWVGA, // WVGA |
|
65 EImageResolutionLast // End marker |
|
66 }; |
|
67 |
|
68 // Supported video resolutions |
|
69 // Converted to TCamVideoResolution in MapVideoResolution |
|
70 enum TVideoResolution |
|
71 { |
|
72 EVideoResolutionQCIF, |
|
73 EVideoResolutionQVGA, |
|
74 EVideoResolutionVGA, |
|
75 EVideoResolutionNHD, |
|
76 EVideoResolutionWVGA, |
|
77 EVideoResolutionHD |
|
78 }; |
|
79 |
|
80 // Image compression levels |
|
81 enum TCamImageCompression |
|
82 { |
|
83 EPhotoQualitySuperFine = 99, |
|
84 EPhotoQualityFine = 85, // 1:10 |
|
85 EPhotoQualityStandard = 70, |
|
86 EPhotoQualityBasic = 50, // 1:20 |
|
87 EPhotoQualityMMS = 25 |
|
88 }; |
|
89 |
|
90 // Image quality data |
|
91 // typedef struct |
|
92 struct TCamPhotoQualitySetting |
|
93 { |
|
94 TCamImageQuality iPhotoQualityId; |
|
95 TCamImageResolution iPhotoResolution; |
|
96 TInt iQualityLevel; // TCamImageCompression |
|
97 }; // TCamPhotoQualitySetting; |
|
98 |
|
99 // Structure representing a video quality level |
|
100 // The text pointers must be const, so no const_casts are needed |
|
101 struct TVideoQualitySettings |
|
102 { |
|
103 TInt iQualityLevel; // identifier |
|
104 TInt iVideoResolution; // resolution (ie CIF/QCIF) |
|
105 TReal iVideoFrameRate; // video frame rate |
|
106 TInt iVideoBitRate; // video bit rate |
|
107 TInt iAudioBitRate; // audio bit rate |
|
108 const TUint8* iVideoMimeType; // MIME type |
|
109 const TUint16* iPreferredSupplier; // Supplier |
|
110 const TUint8* iVideoCodec; // video codec |
|
111 const TUint8* iAudioCodec; // audio codec |
|
112 TInt iVideoFileType; // video file type (i.e mpeg4, H263) |
|
113 TInt iVideoLength; // video length (max or short for sharing) |
|
114 }; |
|
115 |
|
116 |
|
117 // New dynamic configuration related types |
|
118 // ----------------------------------------------------------------- |
|
119 |
|
120 // Settings slider and precapture quality icons |
|
121 // Used for image and video quality data |
|
122 struct TCamQualityIcons |
|
123 { |
|
124 TInt iSettingsIconId; |
|
125 TInt iSettingsIconMask; |
|
126 TInt iPrecapIconId; |
|
127 TInt iPrecapIconMask; |
|
128 }; |
|
129 |
|
130 // File type icon |
|
131 struct TCamFileTypeIcons |
|
132 { |
|
133 TInt iIconId; |
|
134 TInt iMask; |
|
135 }; |
|
136 |
|
137 // Item types, used when appending data into integer arrays |
|
138 enum TCamItemType |
|
139 { |
|
140 ECamItemSame, |
|
141 ECamItemPhotoSize, |
|
142 ECamItemPhotoQuality, |
|
143 ECamItemSettingsIconId, |
|
144 ECamItemPrecapIconId, |
|
145 ECamItemSecondaryIconId, |
|
146 ECamItemPhotoJpegSize, |
|
147 ECamItemSeqPostProcSize |
|
148 }; |
|
149 |
|
150 // Photo size. Used to create image size data (resolution+enums) constant array |
|
151 struct TCamPhotoSize |
|
152 { |
|
153 TCamPhotoSizeId iSizeId; |
|
154 TCamImageResolution iResolution; |
|
155 TCamImageQualitySetting iQualitySettingId; |
|
156 TInt iWidth; |
|
157 TInt iHeight; |
|
158 }; |
|
159 |
|
160 // Video size. Used to create video size data (resolution+enums) constant array |
|
161 struct TCamVideoSize |
|
162 { |
|
163 TCamVideoResolution iCamVideoRes; |
|
164 TVideoResolution iVideoRes; |
|
165 TInt iWidth; |
|
166 TInt iHeight; |
|
167 }; |
|
168 |
|
169 // Image quality data structure, which contains all the |
|
170 // information needed for each quality/size in the application |
|
171 struct TCamImageQualityData |
|
172 { |
|
173 // This quality is for primary camera |
|
174 TBool iPrimaryCamera; |
|
175 |
|
176 // Two different ways of representing the same image quality, |
|
177 // used in different parts of the application |
|
178 TCamPhotoSize iPhotoSize; |
|
179 TCamPhotoQualitySetting iPhotoQualitySetting; |
|
180 |
|
181 // Description Id. Combination of size (5m/3m...), usage (print/email/...) |
|
182 // and size (small/medium/large ). |
|
183 TCamPhotoQualityDescription iDescription; |
|
184 |
|
185 // Quality icons |
|
186 TCamQualityIcons iQualityIcons; |
|
187 |
|
188 // Estimated file size |
|
189 TInt iFileSize; |
|
190 }; |
|
191 |
|
192 struct TCamVideoQualityData |
|
193 { |
|
194 // Quality settings (resolution, bitrate, file type etc), which were |
|
195 // previously in constant array KVideoQualitySettings |
|
196 // iQualitySettings.iQuality level (0,1,...X) is used for indexing, last one is MMS |
|
197 TVideoQualitySettings iQualitySettings; |
|
198 |
|
199 // Video resolution |
|
200 TCamVideoResolution iVideoResolution; |
|
201 |
|
202 // High/(normal high)/normal/(normal low)/sharing |
|
203 TCamVideoQualitySettings iQualitySetting; |
|
204 |
|
205 // Description ID for the quality |
|
206 TCamVideoQualityDescription iDescription; |
|
207 |
|
208 // Icon IDs |
|
209 TCamQualityIcons iQualityIcons; |
|
210 |
|
211 TCamFileTypeIcons iFileTypeIcons; |
|
212 }; |
|
213 |
|
214 // Image type - small/medium/large |
|
215 enum TCamImageType |
|
216 { |
|
217 ECamImageTypeSmall, |
|
218 ECamImageTypeMedium, |
|
219 ECamImageTypeLarge, |
|
220 ECamImageTypeLast |
|
221 }; |
|
222 |
|
223 // Photo description and matching quality (print/email/mms etc) |
|
224 struct TCamImageQualityMapping |
|
225 { |
|
226 TCamPhotoQualityDescription iDesc; |
|
227 TCamImageQuality iQuality; |
|
228 }; |
|
229 |
|
230 // Mapping between CamcorderVisible value and video description |
|
231 struct TCamVideoQualityMapping |
|
232 { |
|
233 TCamVideoQualityDescription iDesc; |
|
234 TInt iCamcorderVisibleMin; |
|
235 }; |
|
236 |
|
237 // Panics |
|
238 enum TCamConfigurationPanics |
|
239 { |
|
240 ECamConfigPanicUnknownKey, |
|
241 ECamConfigPanicUnknownType, |
|
242 ECamConfigPanicNoQuality, |
|
243 ECamConfigPanicNoDescription, |
|
244 ECamConfigPanicNoVideoRes, |
|
245 ECamConfigPanicNoVideoType, |
|
246 ECamConfigPanicInvalidNumberOfQualities, |
|
247 ECamConfigPanicInvalidItem |
|
248 }; |
|
249 |
|
250 #endif // CAMCONFIGURATIONTYPES_H |
|
251 |