|
1 /* |
|
2 * Copyright (c) 2004-2006 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: Remote video handling class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVTENGDRAWDSA_H |
|
21 #define CVTENGDRAWDSA_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include "CVtEngRemoteVideo.h" |
|
26 #include "TVtEngRenderConfigDSA.h" |
|
27 |
|
28 // FORWARDS |
|
29 |
|
30 class TDisplaySinkParamsDSA; |
|
31 |
|
32 /** |
|
33 * Direct Screen Access drawer |
|
34 * |
|
35 * @lib videoteleng.lib |
|
36 * @since Series 60 3.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CVtEngDrawDSA ) : public CVtEngRemoteVideo::CVtEngDraw, |
|
39 public MVtEngScalerObserver |
|
40 { |
|
41 public: // constructor and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aObserver call back interface to Display Sink |
|
46 * @return instance of CVtEngDrawDSA |
|
47 */ |
|
48 static CVtEngDrawDSA* NewL( MDisplaySinkObserver* aObserver ); |
|
49 |
|
50 // Destructor |
|
51 ~CVtEngDrawDSA(); |
|
52 |
|
53 private: // construction |
|
54 |
|
55 /** |
|
56 * C++ constructor as private. |
|
57 * @param aObserver callback interface for Display Sink |
|
58 */ |
|
59 CVtEngDrawDSA( MDisplaySinkObserver* aObserver ); |
|
60 |
|
61 private: // from CVtEngDraw |
|
62 |
|
63 /** |
|
64 * @see CVtEngDraw::BaseConstructL |
|
65 */ |
|
66 void BaseConstructL(); |
|
67 |
|
68 /** |
|
69 * @see CVtEngDraw::CreateSinkL |
|
70 */ |
|
71 MDisplaySink* CreateSinkL(); |
|
72 |
|
73 /** |
|
74 * @see CVtEngDraw::BaseRefreshL |
|
75 */ |
|
76 void BaseRefreshL(); |
|
77 |
|
78 /** |
|
79 * @see CVtEngDraw::BaseRefreshBitmapsL |
|
80 */ |
|
81 void BaseRefreshBitmapsL(); |
|
82 |
|
83 /** |
|
84 * @see CVtEngDraw::BaseDoCancel |
|
85 */ |
|
86 void BaseDoCancel(); |
|
87 |
|
88 /** |
|
89 * @see CVtEngDraw::BaseVerifyConfigL |
|
90 */ |
|
91 void BaseVerifyConfigL(); |
|
92 |
|
93 /** |
|
94 * @see CVtEngDraw::BaseRestartL |
|
95 */ |
|
96 void BaseRestartL(); |
|
97 |
|
98 /** |
|
99 * @see CVtEngDraw::BaseAbortNow |
|
100 */ |
|
101 void BaseAbortNow(); |
|
102 |
|
103 /** |
|
104 * @see CVtEngDraw::BaseStartDrawL |
|
105 */ |
|
106 void BaseStartDrawL(); |
|
107 |
|
108 /** |
|
109 * @see CVtEngDraw::BaseStopDraw |
|
110 */ |
|
111 void BaseStopDraw(); |
|
112 |
|
113 /** |
|
114 * @see CVtEngDraw::BaseSetConfigL |
|
115 */ |
|
116 void BaseSetConfigL( const TVtEngRenderConfig& aConfig ); |
|
117 |
|
118 /** |
|
119 * @see CVtEngDraw::BaseSetUIForegroundL |
|
120 */ |
|
121 void BaseSetUIForegroundL( TBool aForeground ); |
|
122 |
|
123 /** |
|
124 * @see CVtEngDraw::BaseVideoFrameSizeChangedL |
|
125 */ |
|
126 void BaseVideoFrameSizeChangedL( const TSize& ); |
|
127 |
|
128 /** |
|
129 * @see CVtEngDraw::BaseRequestLastFrame |
|
130 */ |
|
131 void BaseRequestLastFrame(); |
|
132 |
|
133 /** |
|
134 * @see CVtEngDraw::Config |
|
135 */ |
|
136 TVtEngRenderConfig& Config(); |
|
137 |
|
138 private: // from CActive |
|
139 |
|
140 /** |
|
141 * Handles prepared bitmap from display sink. |
|
142 * @see CActive::RunL |
|
143 */ |
|
144 void RunL(); |
|
145 |
|
146 public: // from MVtEngScalerObserver |
|
147 |
|
148 /** |
|
149 * From MVtEngScalerObserver, this method is called when |
|
150 * scaling is finished. |
|
151 * @see MVtEngScalerObserver::ScalingCompleted |
|
152 */ |
|
153 virtual void ScalingCompleted( |
|
154 CFbsBitmap* aBitmap, TInt aError ); |
|
155 |
|
156 private: // New functions |
|
157 |
|
158 /** |
|
159 * Does the drawing. |
|
160 * @param aBitmap a bitmap to draw |
|
161 */ |
|
162 void DrawBitmap( CFbsBitmap& aBitmap ); |
|
163 |
|
164 /** |
|
165 * Fills TDisplaySinkParamsDSA struct |
|
166 */ |
|
167 void GetSinkParams( TDisplaySinkParamsDSA& aSinkParams ); |
|
168 |
|
169 private: // data |
|
170 |
|
171 // Bitmapts for remote video (double buffering). |
|
172 CFbsBitmap* iBitmap1; |
|
173 CFbsBitmap* iBitmap2; |
|
174 |
|
175 // Bitmap indexes indicating which. |
|
176 // bitmap was provided. |
|
177 MDisplaySink::TBitmapNo iBitmapNo; |
|
178 |
|
179 // If a bitmap has been set available. |
|
180 TBool iBitmapSetAvail; |
|
181 |
|
182 // VT image scaler |
|
183 MVtEngImageScaler* iImageScaler; |
|
184 |
|
185 // DSA configuration |
|
186 TVtEngRenderConfigDSA iConfig; |
|
187 }; |
|
188 |
|
189 #endif // CVTENGDRAWDSA_H |