Update contrib.
1 // Copyright (c) 2007-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef TESTSNAPSHOT_H
19 #define TESTSNAPSHOT_H
21 #include "TestCamera.h"
22 #include <ecam/mcamerasnapshot.h>
24 const TInt KNumOfSnapshotExtensions = 1;
26 // Implementations of the MCameraSnapshot class
27 class CTestCamSnapshot : public CBase,
28 public MCameraSnapshot
30 friend class CTestCamera;
32 static CTestCamSnapshot* NewL(CTestCamera& aOwner);
38 //from MCameraSnapshot
39 TUint32 SupportedFormats();
41 void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio);
43 void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio);
45 void SetBgColorL(const TRgb& aBgColor);
47 void SetPositionL(const TPoint& aPosition);
49 TBool IsSnapshotActive() const;
55 MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder);
58 void ServiceSnapshot(const CFbsBitGc& aSourceBitmapGc);
59 void ServiceBurstImageSnapshot(const CFbsBitGc& aSourceBitmapGc);
62 CTestCamSnapshot(CTestCamera& aOwner);
65 void DoStartSnapshotL();
72 CFbsBitmap* iSnapshot;
73 CFbsBitmapDevice* iSnapshotDev;
74 CFbsBitGc* iSnapshotGc;
76 CFbsBitmap* iSnapshotImage;
77 CFbsBitmapDevice* iSnapshotImageDev;
78 CFbsBitGc* iSnapshotImageGc;
80 TRect iSnapshotImageRect;
81 CCamera::TFormat iSnapshotFormat;
84 TUint32 iImageFormatsSupported;
86 RArray<TRect> iSupportedSnapshotRect;
88 RTestCameraFrameBuffer iSnapshotBuffer;
90 volatile TBool iSnapshotPrepared;
91 volatile TBool iSnapshotActive;
95 #endif // TESTSNAPSHOT_H