equal
deleted
inserted
replaced
18 #ifndef ECAMWEBCAMERAVFACTIVE_H |
18 #ifndef ECAMWEBCAMERAVFACTIVE_H |
19 #define ECAMWEBCAMERAVFACTIVE_H |
19 #define ECAMWEBCAMERAVFACTIVE_H |
20 |
20 |
21 #include "ecamwebcameraplugin.h" |
21 #include "ecamwebcameraplugin.h" |
22 |
22 |
|
23 const TInt KVfWidth = 640; // viewfinder image width |
|
24 const TInt KVfHeight = 480; // viewfinder image height |
|
25 |
|
26 const TInt KVfLineBytes = KVfWidth * 3; // bytes of one line |
|
27 |
23 /** |
28 /** |
24 * Perform a viewfinder function. |
29 * Perform a viewfinder function. |
25 */ |
30 */ |
26 class CWebCameraVfActive : public CActive |
31 class CWebCameraVfActive : public CActive |
27 , public MDirectScreenAccess |
32 , public MDirectScreenAccess |
34 */ |
39 */ |
35 static CWebCameraVfActive* NewL(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver); |
40 static CWebCameraVfActive* NewL(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver); |
36 |
41 |
37 CWebCameraVfActive(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver); |
42 CWebCameraVfActive(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver); |
38 |
43 |
39 /**> Destructor */ |
44 /** |
|
45 Destructor |
|
46 */ |
40 ~CWebCameraVfActive(); |
47 ~CWebCameraVfActive(); |
|
48 |
|
49 /** |
|
50 Init ViewFinder. |
|
51 */ |
|
52 TInt InitViewFinder(); |
41 |
53 |
42 /** |
54 /** |
43 Starts transfer of view finder data to the given portion of the screen using |
55 Starts transfer of view finder data to the given portion of the screen using |
44 direct screen access. |
56 direct screen access. |
45 |
57 |
55 @param aScreenRect |
67 @param aScreenRect |
56 Portion of the screen to which view finder data is to be |
68 Portion of the screen to which view finder data is to be |
57 transferred. This is in screen co-ordinates and may be modified if, for example, |
69 transferred. This is in screen co-ordinates and may be modified if, for example, |
58 the camera requires the destination to have a certain byte alignment. |
70 the camera requires the destination to have a certain byte alignment. |
59 */ |
71 */ |
60 void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect); |
72 void StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect, TUint8* aChunkBase, TInt& aChunkSize); |
61 |
73 |
62 /** |
74 /** |
63 Stops transfer of view finder data to the screen. |
75 Stops transfer of view finder data to the screen. |
64 */ |
76 */ |
65 void StopViewFinder(); |
77 void StopViewFinder(); |
106 /** |
118 /** |
107 Draw the image of the view finder on screen. |
119 Draw the image of the view finder on screen. |
108 */ |
120 */ |
109 void UpdateViewL(); |
121 void UpdateViewL(); |
110 |
122 |
|
123 /** |
|
124 bitmap data set for CFbsBitmap. |
|
125 */ |
|
126 TInt BitmapDataSet(TDes8& aBitmap, CFbsBitmap& aVfBitmap); |
|
127 |
111 private: |
128 private: |
112 void RunL(); |
129 void RunL(); |
113 void DoCancel(); |
130 void DoCancel(); |
114 |
131 |
115 private: |
132 private: |
124 CDirectScreenAccess* iDSA; ///< DirectScreenAccess object. |
141 CDirectScreenAccess* iDSA; ///< DirectScreenAccess object. |
125 TRect iScreenRect; ///< The region to draw. |
142 TRect iScreenRect; ///< The region to draw. |
126 TRect iClipRect; ///< The clipping region to draw. |
143 TRect iClipRect; ///< The clipping region to draw. |
127 |
144 |
128 TBool iTestFlug; ///< for test |
145 TBool iTestFlug; ///< for test |
|
146 |
|
147 TUint8* iChuckBase; ///< |
|
148 TInt iChuckRemSize; ///< |
129 }; |
149 }; |
130 |
150 |
131 |
151 |
132 #endif // ECAMWEBCAMERAPLUGIN_H |
152 #endif // ECAMWEBCAMERAPLUGIN_H |