equal
deleted
inserted
replaced
16 * Implementation file for CxeQualityPresetsSymbian class |
16 * Implementation file for CxeQualityPresetsSymbian class |
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
20 #include <e32std.h> // For Symbian types used in mmsenginedomaincrkeys.h |
20 #include <e32std.h> // For Symbian types used in mmsenginedomaincrkeys.h |
21 #include <mmsenginedomaincrkeys.h> |
21 #include <MmsEngineDomainCRKeys.h> |
22 |
22 |
23 #include "cxutils.h" |
23 #include "cxutils.h" |
24 #include "cxenamespace.h" |
24 #include "cxenamespace.h" |
25 #include "cxesettings.h" |
25 #include "cxesettings.h" |
26 #include "cxequalitydetails.h" |
26 #include "cxequalitydetails.h" |
27 #include "cxequalitypresetssymbian.h" |
27 #include "cxequalitypresetssymbian.h" |
28 |
28 |
|
29 #include "OstTraceDefinitions.h" |
|
30 #ifdef OST_TRACE_COMPILER_IN_USE |
|
31 #include "cxequalitypresetssymbianTraces.h" |
|
32 #endif |
29 |
33 |
30 // constants |
34 // constants |
31 namespace |
35 namespace |
32 { |
36 { |
33 // Display IDs for cameras, used when requesting data from ICM |
37 // Display IDs for cameras, used when requesting data from ICM |
81 Returns sorted list of image qualities in descending order. |
85 Returns sorted list of image qualities in descending order. |
82 */ |
86 */ |
83 QList<CxeImageDetails> CxeQualityPresetsSymbian::imageQualityPresets(Cxe::CameraIndex cameraId) |
87 QList<CxeImageDetails> CxeQualityPresetsSymbian::imageQualityPresets(Cxe::CameraIndex cameraId) |
84 { |
88 { |
85 CX_DEBUG_ENTER_FUNCTION(); |
89 CX_DEBUG_ENTER_FUNCTION(); |
|
90 OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_GETIMAGEPRESETS_IN, "msg: e_CX_QUALITYPRESETS_GETIMAGEPRESETS 1"); |
86 |
91 |
87 QList<CxeImageDetails> presetList; |
92 QList<CxeImageDetails> presetList; |
88 |
93 |
89 if (!mIcm) { |
94 if (!mIcm) { |
90 CX_DEBUG(("ICM not initialized, returning empty image qualities list")); |
95 CX_DEBUG(("ICM not initialized, returning empty image qualities list")); |
125 } |
130 } |
126 |
131 |
127 delete levels; |
132 delete levels; |
128 levels = NULL; |
133 levels = NULL; |
129 |
134 |
|
135 OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_GETIMAGEPRESETS_OUT, "msg: e_CX_QUALITYPRESETS_GETIMAGEPRESETS 0"); |
130 CX_DEBUG_EXIT_FUNCTION(); |
136 CX_DEBUG_EXIT_FUNCTION(); |
131 return presetList; |
137 return presetList; |
132 } |
138 } |
133 |
139 |
134 |
140 |
140 Returns sorted list if image qualities in descending order. |
146 Returns sorted list if image qualities in descending order. |
141 */ |
147 */ |
142 QList<CxeVideoDetails> CxeQualityPresetsSymbian::videoQualityPresets(Cxe::CameraIndex cameraId) |
148 QList<CxeVideoDetails> CxeQualityPresetsSymbian::videoQualityPresets(Cxe::CameraIndex cameraId) |
143 { |
149 { |
144 CX_DEBUG_ENTER_FUNCTION(); |
150 CX_DEBUG_ENTER_FUNCTION(); |
|
151 OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_GETVIDEOPRESETS_IN, "msg: e_CX_QUALITYPRESETS_GETVIDEOPRESETS 1"); |
145 |
152 |
146 QList<CxeVideoDetails> presetList; |
153 QList<CxeVideoDetails> presetList; |
147 |
154 |
148 if (!mIcm) { |
155 if (!mIcm) { |
149 CX_DEBUG(("ICM not initialized, returning empty video qualities list")); |
156 CX_DEBUG(("ICM not initialized, returning empty video qualities list")); |
190 // Get the average video bitrate scaler |
197 // Get the average video bitrate scaler |
191 TCamcorderMMFPluginSettings mmfPluginSettings; |
198 TCamcorderMMFPluginSettings mmfPluginSettings; |
192 mIcm->GetCamcorderMMFPluginSettings(mmfPluginSettings); |
199 mIcm->GetCamcorderMMFPluginSettings(mmfPluginSettings); |
193 mCMRAvgVideoBitRateScaler = mmfPluginSettings.iCMRAvgVideoBitRateScaler; |
200 mCMRAvgVideoBitRateScaler = mmfPluginSettings.iCMRAvgVideoBitRateScaler; |
194 |
201 |
|
202 OstTrace0(camerax_performance, CXEQUALITYPRESETSSYMBIAN_GETVIDEOPRESETS_OUT, "msg: e_CX_QUALITYPRESETS_GETVIDEOPRESETS 0"); |
195 CX_DEBUG_EXIT_FUNCTION(); |
203 CX_DEBUG_EXIT_FUNCTION(); |
196 return presetList; |
204 return presetList; |
197 } |
205 } |
198 |
206 |
199 |
207 |
207 { |
215 { |
208 CxeImageDetails newPreset; |
216 CxeImageDetails newPreset; |
209 // set setting values from quality set |
217 // set setting values from quality set |
210 newPreset.mWidth = set.iImageWidth; |
218 newPreset.mWidth = set.iImageWidth; |
211 newPreset.mHeight = set.iImageHeight; |
219 newPreset.mHeight = set.iImageHeight; |
212 newPreset.mImageFileExtension = toString(set.iImageFileExtension); |
|
213 newPreset.mEstimatedSize = set.iEstimatedSize; |
220 newPreset.mEstimatedSize = set.iEstimatedSize; |
214 newPreset.mMpxCount = calculateMegaPixelCount(set.iImageWidth, |
221 newPreset.mMpxCount = calculateMegaPixelCount(set.iImageWidth, |
215 set.iImageHeight); |
222 set.iImageHeight); |
|
223 newPreset.mPossibleImages = CxeImageDetails::UNKNOWN; |
|
224 newPreset.mImageFileExtension = toString(set.iImageFileExtension); |
216 newPreset.mAspectRatio = calculateAspectRatio(set.iImageWidth, |
225 newPreset.mAspectRatio = calculateAspectRatio(set.iImageWidth, |
217 set.iImageHeight); |
226 set.iImageHeight); |
218 |
227 |
219 return newPreset; |
228 return newPreset; |
220 } |
229 } |
228 { |
237 { |
229 CxeVideoDetails newPreset; |
238 CxeVideoDetails newPreset; |
230 // set setting values from quality set |
239 // set setting values from quality set |
231 newPreset.mWidth = set.iVideoWidth; |
240 newPreset.mWidth = set.iVideoWidth; |
232 newPreset.mHeight = set.iVideoHeight; |
241 newPreset.mHeight = set.iVideoHeight; |
|
242 |
|
243 newPreset.mRemainingTime = CxeVideoDetails::UNKNOWN; |
233 |
244 |
234 // Check if this is a sharing (mms) quality, and set size limit accordingly. |
245 // Check if this is a sharing (mms) quality, and set size limit accordingly. |
235 if (set.iCamcorderVisible < MMS_QUALITY_CAMCORDERVISIBLE_LIMIT) { |
246 if (set.iCamcorderVisible < MMS_QUALITY_CAMCORDERVISIBLE_LIMIT) { |
236 QVariant size; |
247 QVariant size; |
237 mSettings.get(KCRUidMmsEngine.iUid, KMmsEngineMaximumSendSize, Cxe::Repository, size); |
248 mSettings.get(KCRUidMmsEngine.iUid, KMmsEngineMaximumSendSize, Cxe::Repository, size); |