|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @prototype |
|
20 */ |
|
21 |
|
22 #include <ecam/mcamerasnapshot.h> |
|
23 #include <ecamimageprocessing.h> |
|
24 #include <ecam/camerahistogram.h> |
|
25 #include <ecam/implementationfactoryintf.h> |
|
26 |
|
27 /** |
|
28 Factory function that creates a new camera snapshot object on the heap. |
|
29 |
|
30 @param aCamera |
|
31 A reference to the camera object for which a camera snapshot object is to be created. |
|
32 |
|
33 @leave KErrNoMemory if out of memory; also any system wide error. |
|
34 |
|
35 @return A pointer to the newly created camera snapshot object. |
|
36 |
|
37 @note This will be deprecated shortly. Snapshot should be used via CCameraImageCapture::GetSnapshotHandleL() or |
|
38 CCameraVideoCaptureControl::GetSnapshotHandleL(). |
|
39 |
|
40 @note Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events. |
|
41 */ |
|
42 EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraSnapshot::NewL(CCamera& aCamera) |
|
43 { |
|
44 CCamera::CCameraSnapshot* self = new (ELeave) CCamera::CCameraSnapshot(aCamera); |
|
45 CleanupStack::PushL(self); |
|
46 self->ConstructL(); |
|
47 CleanupStack::Pop(self); |
|
48 return self; |
|
49 } |
|
50 |
|
51 /** |
|
52 @internalComponent |
|
53 |
|
54 Factory function that creates a new camera snapshot object specifically for image capture or video capture. |
|
55 |
|
56 @param aCamera |
|
57 A reference to the camera object for which a camera snapshot object is to be created. |
|
58 |
|
59 @param aImplFactory |
|
60 A reference to the MImplementationFactory derived object. |
|
61 |
|
62 @param aClientViewFinderId |
|
63 The client viewfinder on which this client snapshot will be displayed. |
|
64 |
|
65 @leave KErrNoMemory if out of memory; also any system wide error. |
|
66 |
|
67 @return A pointer to a fully constructed camera snapshot object. |
|
68 */ |
|
69 EXPORT_C CCamera::CCameraSnapshot* CCamera::CCameraSnapshot::CreateL(CCamera& aCamera, MImplementationFactory& aImplFactory, TInt aClientViewFinderId) |
|
70 { |
|
71 CCamera::CCameraSnapshot* self = new (ELeave) CCamera::CCameraSnapshot(aCamera); |
|
72 CleanupStack::PushL(self); |
|
73 self->ConstructL(aImplFactory, aClientViewFinderId); |
|
74 CleanupStack::Pop(self); |
|
75 return self; |
|
76 } |
|
77 |
|
78 /** |
|
79 CCameraSnapshot second phase constructor. |
|
80 |
|
81 This function is used to initialise internal state of the object. |
|
82 It uses reference to the camera to retrieve snapshot interface pointer. |
|
83 |
|
84 @leave KErrNotSupported if this functionality is not supported; also any system wide error. |
|
85 */ |
|
86 void CCamera::CCameraSnapshot::ConstructL() |
|
87 { |
|
88 iImpl = static_cast<MCameraSnapshot*>(iOwner.CustomInterface(KECamMCameraSnapshotUid)); |
|
89 |
|
90 if (iImpl == NULL) |
|
91 { |
|
92 User::Leave(KErrNotSupported); |
|
93 } |
|
94 |
|
95 iImpl2 = static_cast<MCameraSnapshot2*>(iOwner.CustomInterface(KECamMCameraSnapshot2Uid)); |
|
96 } |
|
97 |
|
98 /** |
|
99 @internalComponent |
|
100 |
|
101 CCameraSnapshot second phase constructor |
|
102 |
|
103 Function used to initialise internal state of the object specifically for image capture or video capture. |
|
104 This may be used in other possible cases as well. |
|
105 |
|
106 @param aImplFactory |
|
107 A constant reference to the MImplementationFactory derived object. |
|
108 |
|
109 @param aClientViewFinderId |
|
110 The client viewfinder on which this client snapshot will be displayed. |
|
111 |
|
112 @leave KErrNoMemory Out of memory; or any other error code as well. |
|
113 |
|
114 @note This method is supposed to be used by this class only. |
|
115 */ |
|
116 void CCamera::CCameraSnapshot::ConstructL(const MImplementationFactory& aImplFactory, TInt aClientViewFinderId) |
|
117 { |
|
118 TInt err = KErrNone; |
|
119 TAny* implPtr = NULL; |
|
120 |
|
121 err = aImplFactory.GetImpl(implPtr, KECamMCameraSnapshotUid); |
|
122 if (err != KErrNone) |
|
123 { |
|
124 User::Leave(err); |
|
125 } |
|
126 iImpl = static_cast<MCameraSnapshot*>(implPtr); |
|
127 |
|
128 implPtr = NULL; |
|
129 err = aImplFactory.GetImpl(implPtr, KECamMCameraSnapshot2Uid); |
|
130 if (err != KErrNone && err != KErrNotSupported) |
|
131 { |
|
132 User::Leave(err); |
|
133 } |
|
134 iImpl2 = static_cast<MCameraSnapshot2*>(implPtr); |
|
135 |
|
136 iImpl2->SetClientViewFinderId(aClientViewFinderId); |
|
137 } |
|
138 |
|
139 /** |
|
140 Constructor for the CCamera::CCameraSnapshot class. |
|
141 |
|
142 @param aOwner |
|
143 A reference to the camera object for which a camera snapshot object is to be created. |
|
144 */ |
|
145 CCamera::CCameraSnapshot::CCameraSnapshot(CCamera& aOwner):iOwner(aOwner), iImpl(NULL), iImpl2(NULL) |
|
146 { |
|
147 } |
|
148 |
|
149 /** |
|
150 @released |
|
151 |
|
152 Destructor for the CCamera::CCameraSnapshot class. |
|
153 |
|
154 @note The child objects(for example,hisotgrams) created out of this snapshot class object shall be |
|
155 delete beforehand. |
|
156 |
|
157 */ |
|
158 EXPORT_C CCamera::CCameraSnapshot::~CCameraSnapshot() |
|
159 { |
|
160 if (iImpl != NULL) |
|
161 { |
|
162 iImpl->Release(); |
|
163 } |
|
164 if (iImpl2 != NULL) |
|
165 { |
|
166 iImpl2->Release(); |
|
167 } |
|
168 } |
|
169 |
|
170 /** |
|
171 @released |
|
172 |
|
173 Gets a list of camera formats for which the ECam implementation supports snapshots. |
|
174 |
|
175 @return Bit field containing the supported camera formats as CCamera::TFormat values. |
|
176 */ |
|
177 EXPORT_C TUint32 CCamera::CCameraSnapshot::SupportedFormats() |
|
178 { |
|
179 return iImpl->SupportedFormats(); |
|
180 } |
|
181 |
|
182 /** |
|
183 @deprecated Use void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters); |
|
184 |
|
185 Sets the properties of the snapshot data including the background colour and the position of the snapshot. |
|
186 |
|
187 @param aFormat |
|
188 The image format that the snapshot must have. |
|
189 @param aPosition |
|
190 The top left corner position (in pixels) which determines the layout of the snapshot image |
|
191 within the dimensions provided by the aSize parameter when the snapshot has been scaled |
|
192 maintaining its aspect ratio. See also SetPositionL(). |
|
193 @param aSize |
|
194 The size of the snapshot in pixels. |
|
195 @param aBgColor |
|
196 The background colour to be used if the snapshot has been scaled (maintaining its aspect ratio) |
|
197 and does not fully fill the dimension provided by the aSize parameter. See also SetBgColorL(). |
|
198 @param aMaintainAspectRatio |
|
199 Set to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down. |
|
200 |
|
201 @leave KErrNotSupported if the specified image format is not supported; also any system wide error. |
|
202 */ |
|
203 EXPORT_C void CCamera::CCameraSnapshot::PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio) |
|
204 { |
|
205 iImpl->PrepareSnapshotL(aFormat, aPosition, aSize, aBgColor, aMaintainAspectRatio); |
|
206 } |
|
207 |
|
208 /** |
|
209 @deprecated Use void PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters); |
|
210 |
|
211 Sets the properties of the snapshot data, excluding the background colour and the position of the snapshot. |
|
212 This method can be used when the client wishes to determine the layout and background colour after the |
|
213 snapshot image has been generated. See also SetPositionL() and SetBgColorL(). |
|
214 |
|
215 @param aFormat |
|
216 The image format that the snapshot must have. |
|
217 @param aSize |
|
218 The size of the snapshot in pixels. |
|
219 @param aMaintainAspectRatio |
|
220 Set to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down. |
|
221 |
|
222 @leave KErrNotSupported if the specified image format is not supported; also any system wide error. |
|
223 */ |
|
224 EXPORT_C void CCamera::CCameraSnapshot::PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio) |
|
225 { |
|
226 iImpl->PrepareSnapshotL(aFormat, aSize, aMaintainAspectRatio); |
|
227 } |
|
228 |
|
229 /** |
|
230 @deprecated Use void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters); |
|
231 |
|
232 Sets the background colour to be used if the snapshot has been scaled (maintaining its aspect ratio) |
|
233 and does not fully fill the snapshot size as specified in PrepareSnapshot(). |
|
234 |
|
235 @param aBgColor |
|
236 The new background colour. |
|
237 |
|
238 @leave KErrNotSupported if the specified image format is not supported; also any system wide error. |
|
239 */ |
|
240 EXPORT_C void CCamera::CCameraSnapshot::SetBgColorL(const TRgb& aBgColor) |
|
241 { |
|
242 iImpl->SetBgColorL(aBgColor); |
|
243 } |
|
244 |
|
245 /** |
|
246 @deprecated Use void SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters); |
|
247 |
|
248 Sets the top left corner position (in pixels), where the snapshot should be laid out after scaling |
|
249 down (maintaining its aspect ratio). The position is within the dimensions provided by the snapshot |
|
250 size specified in PrepareSnapshot(). |
|
251 |
|
252 @param aPosition |
|
253 The top left corner position in pixels of the snapshot. |
|
254 |
|
255 @leave KErrNotSupported if the specified image format is not supported; also any system wide error. |
|
256 */ |
|
257 EXPORT_C void CCamera::CCameraSnapshot::SetPositionL(const TPoint& aPosition) |
|
258 { |
|
259 iImpl->SetPositionL(aPosition); |
|
260 } |
|
261 |
|
262 /** |
|
263 @deprecated Use void GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const; |
|
264 |
|
265 Determines if the snapshot feature is active. |
|
266 |
|
267 @return ETrue, if StartSnapshot() has been called, otherwise EFalse. |
|
268 */ |
|
269 EXPORT_C TBool CCamera::CCameraSnapshot::IsSnapshotActive() const |
|
270 { |
|
271 return iImpl->IsSnapshotActive(); |
|
272 } |
|
273 |
|
274 /** |
|
275 @deprecated Use void EnableSnapshotL(); |
|
276 |
|
277 Activates the snapshot feature. Calls to this method when the snapshot feature is already active |
|
278 will be ignored. |
|
279 |
|
280 The client will not receive snapshot notifications until the snapshot feature is activated. |
|
281 |
|
282 @see KUidECamEventCameraSnapshot |
|
283 */ |
|
284 EXPORT_C void CCamera::CCameraSnapshot::StartSnapshot() |
|
285 { |
|
286 iImpl->StartSnapshot(); |
|
287 } |
|
288 |
|
289 /** |
|
290 @deprecated Use void DisableSnapshotL(); |
|
291 |
|
292 Deactivates the snapshot feature if it is active. |
|
293 |
|
294 Once the snapshot has been deactivated, the client will no longer receive notifications about snapshots. |
|
295 */ |
|
296 EXPORT_C void CCamera::CCameraSnapshot::StopSnapshot() |
|
297 { |
|
298 iImpl->StopSnapshot(); |
|
299 } |
|
300 |
|
301 /** |
|
302 @deprecated Use callbacks: MCaptureImageObserver::ClientSnapshotForImageReady and MCaptureVideoObserver::ClientSnapshotReady |
|
303 |
|
304 Returns the snapshot data from ECam implementation to the client. |
|
305 |
|
306 The data is returned in an MCameraBuffer object. In the case where the driving mode returns more |
|
307 than one image (burst mode, bracket mode, etc.) the buffer contains several snapshots which may |
|
308 be returned in any order. The aFrameIndexOrder array provides the image sequence numbers in the |
|
309 order in which the snapshots for those images are returned within the MCameraBuffer. |
|
310 |
|
311 @note The client application using this API should provide MCameraObserver2 interface to be |
|
312 signalled when snapshot data is available to be retrieved from the ECAM implementation. |
|
313 |
|
314 @see KUidECamEventCameraSnapshot |
|
315 |
|
316 @param aFrameIndexOrder |
|
317 A reference to an array that will receive the image sequence numbers in the order to which |
|
318 the snapshots within MCameraBuffer relate. |
|
319 |
|
320 @return A reference to an MCameraBuffer which will contain the returned snapshot image data. |
|
321 |
|
322 @leave KErrNoMemory if the ECam implementation has not been able to create the camera buffer; |
|
323 also any system wide error. |
|
324 */ |
|
325 EXPORT_C MCameraBuffer& CCamera::CCameraSnapshot::SnapshotDataL(RArray<TInt>& aFrameIndexOrder) |
|
326 { |
|
327 return iImpl->SnapshotDataL(aFrameIndexOrder); |
|
328 } |
|
329 |
|
330 /** |
|
331 Retrieve pointer to histogram API in order to use it specifically for snapshots. |
|
332 |
|
333 @return Pointer to use histogram API specifically for the snapshots. |
|
334 |
|
335 @leave May leave with any error code. |
|
336 |
|
337 @note Different types of histogram may be used for a snapshot. Every time this method will be called on the |
|
338 CCameraSnapshot class object, a new type of histogram will be created. |
|
339 */ |
|
340 EXPORT_C CCamera::CCameraV2Histogram* CCamera::CCameraSnapshot::CreateHistogramHandleL() const |
|
341 { |
|
342 if(iImpl2 != NULL) |
|
343 { |
|
344 MImplementationFactory* implFactory = NULL; |
|
345 |
|
346 iImpl2->CreateHistogramImplFactoryL(implFactory); |
|
347 |
|
348 CleanupReleasePushL(*implFactory); |
|
349 CCamera::CCameraV2Histogram* histogram = CCamera::CCameraV2Histogram::CreateL(iOwner, *implFactory); |
|
350 CleanupStack::Pop(implFactory); |
|
351 |
|
352 implFactory->Release(); |
|
353 return histogram; |
|
354 } |
|
355 else |
|
356 { |
|
357 return NULL; |
|
358 } |
|
359 } |
|
360 |
|
361 /** |
|
362 Sets the properties of the snapshot. ECam implementation may use a different size than that specified by this method. |
|
363 GetSnapshotParametersL may be used by the client know the actual parameters being used for snapshot creation. |
|
364 |
|
365 @param aSnapshotParameters |
|
366 The snaspshot parameters. |
|
367 |
|
368 @leave May leave with any error code. |
|
369 |
|
370 @note This method is used to provide snapshot parameters. |
|
371 */ |
|
372 EXPORT_C void CCamera::CCameraSnapshot::PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters) |
|
373 { |
|
374 if(iImpl2 != NULL) |
|
375 { |
|
376 iImpl2->PrepareSnapshotL(aSnapshotParameters); |
|
377 } |
|
378 else |
|
379 { |
|
380 User::Leave(KErrNotSupported); |
|
381 } |
|
382 } |
|
383 |
|
384 /** |
|
385 Retrieves the snapshot parameters used by the ECam implementation for snapshot creation. |
|
386 |
|
387 @param aSnapshotParameters |
|
388 Retrieves the currently used snapshot parameters. |
|
389 |
|
390 @leave May leave with any error code. |
|
391 |
|
392 @note This method is used to retrieve snapshot parameters. |
|
393 */ |
|
394 EXPORT_C void CCamera::CCameraSnapshot::GetSnapshotParametersL(CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters) |
|
395 { |
|
396 if(iImpl2 != NULL) |
|
397 { |
|
398 iImpl2->GetSnapshotParametersL(aSnapshotParameters); |
|
399 } |
|
400 else |
|
401 { |
|
402 User::Leave(KErrNotSupported); |
|
403 } |
|
404 } |
|
405 |
|
406 /** |
|
407 Sets/updates the snapshot parameters. |
|
408 |
|
409 @param aSnapshotParameters |
|
410 The desired snapshot parameters. |
|
411 |
|
412 @leave May leave with any error code. |
|
413 |
|
414 @note This method is used to set/update snapshot parameters. |
|
415 */ |
|
416 EXPORT_C void CCamera::CCameraSnapshot::SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters) |
|
417 { |
|
418 if(iImpl2 != NULL) |
|
419 { |
|
420 iImpl2->SetSnapshotParametersL(aSnapshotParameters); |
|
421 } |
|
422 else |
|
423 { |
|
424 User::Leave(KErrNotSupported); |
|
425 } |
|
426 } |
|
427 |
|
428 /** |
|
429 Retrieves the current status for the snapshot. |
|
430 |
|
431 @param aSnapshotState |
|
432 Retrieves information about the snapshot current state. |
|
433 |
|
434 @leave May leave with any error code. |
|
435 |
|
436 @note This method is used to retrieve the snapshot status. |
|
437 */ |
|
438 EXPORT_C void CCamera::CCameraSnapshot::GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const |
|
439 { |
|
440 if(iImpl2 != NULL) |
|
441 { |
|
442 iImpl2->GetSnapshotStatusL(aSnapshotState); |
|
443 } |
|
444 else |
|
445 { |
|
446 User::Leave(KErrNotSupported); |
|
447 } |
|
448 } |
|
449 |
|
450 /** |
|
451 The method specifies the frames to be used from video captured data in order to create snapshot for video. |
|
452 |
|
453 @param aSnapshotVideoFrames |
|
454 A TSnapshotVideoFrames used to specify the desired frames to be used for creating snapshots for video. |
|
455 |
|
456 @leave May leave with any error code. |
|
457 */ |
|
458 EXPORT_C void CCamera::CCameraSnapshot::SelectSnapshotVideoFramesL(CCamera::CCameraSnapshot::TSnapshotVideoFrames aSnapshotVideoFrames) |
|
459 { |
|
460 if(iImpl2 != NULL) |
|
461 { |
|
462 iImpl2->SelectSnapshotVideoFramesL(aSnapshotVideoFrames); |
|
463 } |
|
464 else |
|
465 { |
|
466 User::Leave(KErrNotSupported); |
|
467 } |
|
468 } |
|
469 |
|
470 /** |
|
471 Activates the snapshot feature. Calls to this method when the snapshot feature is already active will be ignored. |
|
472 |
|
473 The client will not receive snapshot notifications until the snapshot feature is activated. |
|
474 |
|
475 Client shall implement the observers: MCaptureImageObserver and MCaptureVideoObserver. Snapshot notifications will be send |
|
476 to the clients via these observers and not through events. |
|
477 |
|
478 @leave KErrNotSupported if the implementation of this method is not present. |
|
479 */ |
|
480 EXPORT_C void CCamera::CCameraSnapshot::EnableSnapshotL() |
|
481 { |
|
482 if(iImpl2 != NULL) |
|
483 { |
|
484 iImpl2->EnableSnapshot(); |
|
485 } |
|
486 else |
|
487 { |
|
488 User::Leave(KErrNotSupported); |
|
489 } |
|
490 } |
|
491 |
|
492 /** |
|
493 Deactivates the snapshot feature if it is active. |
|
494 |
|
495 Once the snapshot has been deactivated, the client will no longer receive notifications about snapshots. |
|
496 |
|
497 @leave KErrNotSupported if the implementation of this method is not present. |
|
498 */ |
|
499 EXPORT_C void CCamera::CCameraSnapshot::DisableSnapshotL() |
|
500 { |
|
501 if(iImpl2 != NULL) |
|
502 { |
|
503 iImpl2->DisableSnapshot(); |
|
504 } |
|
505 else |
|
506 { |
|
507 User::Leave(KErrNotSupported); |
|
508 } |
|
509 } |
|
510 |
|
511 /** |
|
512 Constructor for the TSnapshotParameters class. |
|
513 Sets the size and version of this class. |
|
514 */ |
|
515 EXPORT_C CCamera::CCameraSnapshot::TSnapshotParameters::TSnapshotParameters() |
|
516 { |
|
517 iSize = sizeof(CCamera::CCameraSnapshot::TSnapshotParameters); |
|
518 iVersion = KECamSnapshotParametersCurrentVersion; |
|
519 } |
|
520 |
|
521 /** |
|
522 Returns the size of the class. Used for extensibility by deriving from this base class and adding new member variables. |
|
523 Intended to be used for implementation of methods where this class reference is passed as function arguments. |
|
524 Implementation of such methods can find out the whether the actual class passed is base or the derived one. So, if a new application |
|
525 is made to run on an old implementation, an error may occur once the old implementation detects this by getting |
|
526 the size information of the T class passed. Also, if an old application is made to run on a new implementation, this can be |
|
527 corrrectly handled if the derived class variables handling is done in a proper 'if-else' statement. |
|
528 |
|
529 @return The size of the class. |
|
530 |
|
531 @note The size will be modified when the T-class gets updated. |
|
532 */ |
|
533 EXPORT_C TUint CCamera::CCameraSnapshot::TSnapshotParameters::Size() const |
|
534 { |
|
535 return iSize; |
|
536 } |
|
537 |
|
538 /** |
|
539 Returns the version of the class. Used for extensibility specially when the class members are not added but the Reserved |
|
540 members get used at a later stage. |
|
541 |
|
542 @return The version of the class. |
|
543 |
|
544 @note The version will be modified when the T-class gets updated. |
|
545 */ |
|
546 EXPORT_C TUint CCamera::CCameraSnapshot::TSnapshotParameters::Version() const |
|
547 { |
|
548 return iVersion; |
|
549 } |
|
550 |
|
551 /** |
|
552 Indicates whether the aspect ratio of the snapshot image has to maintained (if ETrue) or not (if EFalse) |
|
553 while scaling down. |
|
554 |
|
555 @return TBool: ETrue implies aspect ratio has to be maintained, EFalse otherwise. |
|
556 |
|
557 @see CCamera::CCameraSnapshot::TSnapshotParameters::iIsAspectRatioMaintained |
|
558 */ |
|
559 EXPORT_C TBool CCamera::CCameraSnapshot::TSnapshotParameters::IsAspectRatioMaintained() const |
|
560 { |
|
561 if (iIsAspectRatioMaintained) |
|
562 { |
|
563 return ETrue; |
|
564 } |
|
565 else |
|
566 { |
|
567 return EFalse; |
|
568 } |
|
569 } |
|
570 |
|
571 /** |
|
572 Sets the state to inform whether the aspect ratio of the snapshot image has to be maintained or not while scaling |
|
573 down. |
|
574 |
|
575 @param aIsAspectRatioMaintained |
|
576 ETrue implies must be maintained, EFalse otherwise. |
|
577 |
|
578 @see CCamera::CCameraSnapshot::TSnapshotParameters::iIsAspectRatioMaintained |
|
579 */ |
|
580 EXPORT_C void CCamera::CCameraSnapshot::TSnapshotParameters::SetAspectRatioState(TBool aIsAspectRatioMaintained) |
|
581 { |
|
582 iIsAspectRatioMaintained = static_cast<TUint>(aIsAspectRatioMaintained); |
|
583 } |