|
1 /* |
|
2 * Copyright (c) 2007 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: CCamSnapshotProvider class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAM_SNAPSHOTPROVIDER_H |
|
20 #define CAM_SNAPSHOTPROVIDER_H |
|
21 |
|
22 |
|
23 #include "camcameracontrollerflags.hrh" // build flags, keep first |
|
24 #include <ecam/mcamerasnapshot.h> |
|
25 |
|
26 |
|
27 class CCamera; |
|
28 class MCameraObserver2; |
|
29 class MCamCameraObservable; |
|
30 class CPeriodic; |
|
31 class CCamSnapshot; |
|
32 |
|
33 |
|
34 #ifdef CAMERAAPP_CAPI_V2_SS |
|
35 #define CAMERASNAPSHOT CCamera::CCameraSnapshot |
|
36 #else |
|
37 // To be able to link without additional build time variation |
|
38 // in source files. |
|
39 #define CAMERASNAPSHOT CCamSnapshot |
|
40 #endif |
|
41 |
|
42 |
|
43 // =========================================================================== |
|
44 // |
|
45 class CCamSnapshotProvider : public CBase, |
|
46 public MCameraSnapshot |
|
47 { |
|
48 // ------------------------------------------------------- |
|
49 // Constructors and destructor |
|
50 public: |
|
51 |
|
52 static CCamSnapshotProvider* NewL( CCamera& aCamera, |
|
53 MCameraObserver2& aObserver, |
|
54 MCamCameraObservable& aObservable ); |
|
55 |
|
56 virtual ~CCamSnapshotProvider(); |
|
57 |
|
58 private: |
|
59 |
|
60 /** |
|
61 * 2nd phase constructor |
|
62 */ |
|
63 void ConstructL( CCamera& aCamera, |
|
64 MCameraObserver2& aObserver, |
|
65 MCamCameraObservable& aObservable ); |
|
66 |
|
67 /** |
|
68 * 1st phase constructor |
|
69 */ |
|
70 CCamSnapshotProvider(); |
|
71 |
|
72 // ------------------------------------------------------- |
|
73 // From MCameraSnapshot |
|
74 // |
|
75 // All inlines as just relayed to the currently used |
|
76 // snapshot producer. |
|
77 public: |
|
78 |
|
79 inline virtual TUint32 SupportedFormats(); |
|
80 inline virtual void PrepareSnapshotL( CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio ); |
|
81 inline virtual void PrepareSnapshotL( CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio ); |
|
82 inline virtual void SetBgColorL( const TRgb& aBgColor); |
|
83 inline virtual void SetPositionL( const TPoint& aPosition); |
|
84 inline virtual TBool IsSnapshotActive() const; |
|
85 inline virtual void StartSnapshot(); |
|
86 inline virtual void StopSnapshot(); |
|
87 inline virtual MCameraBuffer& SnapshotDataL( RArray<TInt>& aFrameIndexOrder ); |
|
88 inline virtual void Release(); |
|
89 |
|
90 // ======================================================= |
|
91 // Data |
|
92 private: |
|
93 |
|
94 CAMERASNAPSHOT* iSs1; |
|
95 CCamSnapshot* iSs2; |
|
96 |
|
97 // ======================================================= |
|
98 }; |
|
99 |
|
100 #include "camsnapshotprovider.inl" |
|
101 |
|
102 // =========================================================================== |
|
103 #endif // CAM_SNAPSHOTPROVIDER_H |
|
104 |
|
105 // end of file |