|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef CXEDUMMYCAMERA_H |
|
18 #define CXEDUMMYCAMERA_H |
|
19 |
|
20 #if defined(CXE_USE_DUMMY_CAMERA) || defined(__WINSCW__) |
|
21 |
|
22 // Disable warnings about unused arguments |
|
23 #pragma warn_unusedarg off |
|
24 |
|
25 #include <fbs.h> |
|
26 #include <ecam/ecamplugin.h> |
|
27 #include <ecam/ecamadvsettingsintf.h> |
|
28 #include <ecam/mcamerasnapshot.h> |
|
29 #include <ecam/mcameradirectviewfinder.h> |
|
30 |
|
31 #include "cxutils.h" |
|
32 |
|
33 |
|
34 class CxeDummyCamera; |
|
35 class CxeDummyAdvancedSettings; |
|
36 class CxeDummySnapshot; |
|
37 |
|
38 class CxeDummyBuffer : public CBase, |
|
39 public MCameraBuffer |
|
40 { |
|
41 public: |
|
42 CxeDummyBuffer() : iData(_L8("ABC")) |
|
43 { |
|
44 CX_DEBUG_IN_FUNCTION(); |
|
45 } |
|
46 |
|
47 ~CxeDummyBuffer() |
|
48 { |
|
49 CX_DEBUG_ENTER_FUNCTION(); |
|
50 delete iBitmap; |
|
51 CX_DEBUG_EXIT_FUNCTION(); |
|
52 } |
|
53 |
|
54 void CreateBitmapL( const TSize& aSize ); |
|
55 |
|
56 public: |
|
57 TInt NumFrames() { return 1; } |
|
58 TDesC8* DataL(TInt aFrameIndex) { return &iData; } |
|
59 CFbsBitmap& BitmapL(TInt aFrameIndex) { User::LeaveIfNull( iBitmap ); return *iBitmap; } |
|
60 RChunk& ChunkL() { return iChunk; } |
|
61 TInt ChunkOffsetL(TInt aFrameIndex) { return 0; } |
|
62 TInt FrameSize(TInt aFrameIndex) { return 0; } |
|
63 void Release() {} |
|
64 |
|
65 public: |
|
66 TBuf8<128> iData; |
|
67 CFbsBitmap* iBitmap; |
|
68 RChunk iChunk; |
|
69 |
|
70 }; |
|
71 |
|
72 class CxeDummySnapshot : public CBase, |
|
73 public MCameraSnapshot |
|
74 { |
|
75 public: |
|
76 CxeDummySnapshot() |
|
77 { |
|
78 CX_DEBUG(("snap this = 0x%08x", this)); |
|
79 CX_DEBUG_IN_FUNCTION(); |
|
80 } |
|
81 ~CxeDummySnapshot() |
|
82 { |
|
83 CX_DEBUG_ENTER_FUNCTION(); |
|
84 delete iBuffer; |
|
85 CX_DEBUG_EXIT_FUNCTION(); |
|
86 } |
|
87 |
|
88 TUint32 SupportedFormats() { return 0; } |
|
89 void PrepareSnapshotL(CCamera::TFormat aFormat, const TPoint& aPosition, const TSize& aSize, const TRgb& aBgColor, TBool aMaintainAspectRatio); |
|
90 void PrepareSnapshotL(CCamera::TFormat aFormat, const TSize& aSize, TBool aMaintainAspectRatio); |
|
91 void SetBgColorL(const TRgb& aBgColor) {} |
|
92 void SetPositionL(const TPoint& aPosition) {} |
|
93 TBool IsSnapshotActive() const { return iActive; } |
|
94 void StartSnapshot() { iActive = ETrue; } |
|
95 void StopSnapshot() { iActive = EFalse; } |
|
96 MCameraBuffer& SnapshotDataL(RArray<TInt>& aFrameIndexOrder) { return *iBuffer; } |
|
97 void Release() {} |
|
98 |
|
99 private: |
|
100 CxeDummyBuffer* iBuffer; |
|
101 TBool iActive; |
|
102 }; |
|
103 |
|
104 |
|
105 |
|
106 class CxeDummyDirectViewfinder : public CBase, |
|
107 public MCameraDirectViewFinder |
|
108 { |
|
109 public: |
|
110 CxeDummyDirectViewfinder(); |
|
111 ~CxeDummyDirectViewfinder(); |
|
112 |
|
113 void Release(); |
|
114 void PauseViewFinderDirectL(); |
|
115 void ResumeViewFinderDirectL(); |
|
116 CCamera::CCameraDirectViewFinder::TViewFinderState ViewFinderState() const; |
|
117 |
|
118 private: |
|
119 CCamera::CCameraDirectViewFinder::TViewFinderState iState; |
|
120 }; |
|
121 |
|
122 |
|
123 |
|
124 class CxeDummyAdvancedSettings : public CBase, |
|
125 public MCameraAdvancedSettings, |
|
126 public MCameraAdvancedSettings3 |
|
127 { |
|
128 private: |
|
129 class TCxeDummyNotification |
|
130 { |
|
131 public: |
|
132 TCxeDummyNotification(TUid aEventUid, TInt aStatus) : iEventUid(aEventUid), iStatus(aStatus) {} |
|
133 TUid iEventUid; |
|
134 TInt iStatus; |
|
135 }; |
|
136 |
|
137 public: |
|
138 CxeDummyAdvancedSettings(CCamera* aCamera); |
|
139 ~CxeDummyAdvancedSettings(); |
|
140 |
|
141 void Release() {} |
|
142 CCamera::CCameraAdvancedSettings::TCameraType CameraType() const { return CCamera::CCameraAdvancedSettings::ECameraOnBoard; } |
|
143 CCamera::CCameraAdvancedSettings::TCameraType CameraType(TInt aCameraIndex) const { return CCamera::CCameraAdvancedSettings::ECameraOnBoard; } |
|
144 TBool IsCameraPresent() const { return ETrue; } |
|
145 TBool IsCameraPresent(TInt aCameraIndex) const { return ETrue; } |
|
146 TInt CameraIndex() const { return 1; } |
|
147 TInt SupportedStabilizationModes() const { return 0; } |
|
148 CCamera::CCameraAdvancedSettings::TStabilizationMode StabilizationMode() const { return CCamera::CCameraAdvancedSettings::EStabilizationModeOff; } |
|
149 void SetStabilizationMode(CCamera::CCameraAdvancedSettings::TStabilizationMode aStabilizationMode) {} |
|
150 |
|
151 TInt SupportedFocusModes() const; |
|
152 CCamera::CCameraAdvancedSettings::TFocusMode FocusMode() const; |
|
153 void SetFocusMode(CCamera::CCameraAdvancedSettings::TFocusMode aFocusMode); |
|
154 |
|
155 TInt SupportedFocusRanges() const; |
|
156 CCamera::CCameraAdvancedSettings::TFocusRange FocusRange() const; |
|
157 void SetFocusRange(CCamera::CCameraAdvancedSettings::TFocusRange aFocusRange); |
|
158 |
|
159 TInt SupportedAutoFocusTypes() const; |
|
160 CCamera::CCameraAdvancedSettings::TAutoFocusType AutoFocusType() const; |
|
161 void SetAutoFocusType(CCamera::CCameraAdvancedSettings::TAutoFocusType aAutoFocusType); |
|
162 |
|
163 TInt SupportedAutoFocusAreas() const { return 0; } |
|
164 CCamera::CCameraAdvancedSettings::TAutoFocusArea AutoFocusArea() const { return CCamera::CCameraAdvancedSettings::EAutoFocusTypeAuto; } |
|
165 void SetAutoFocusArea(CCamera::CCameraAdvancedSettings::TAutoFocusArea aAutoFocusArea) {} |
|
166 TInt FocusDistance() const { return 0; } |
|
167 void SetFocusDistance(TInt aDistance) {} |
|
168 TInt GetMinFocalLength() const { return 0; } |
|
169 void GetSupportedIsoRatesL(RArray<TInt>& aSupportedIsoRates) const {} |
|
170 TInt IsoRate() const { return 0; } |
|
171 void SetIsoRate(TInt aRate) {} |
|
172 void GetAperturesL(RArray<TInt>& aFStops, TValueInfo& aInfo) const {} |
|
173 TInt Aperture() const { return 0; } |
|
174 void SetAperture(TInt aFStop) {} |
|
175 void GetShutterSpeedsL(RArray<TInt>& aShutterSpeeds, TValueInfo& aInfo) const {} |
|
176 TInt ShutterSpeed() const { return 0; } |
|
177 void SetShutterSpeed(TInt aShutterSpeed) {} |
|
178 TInt SupportedMeteringModes() const { return 0; } |
|
179 CCamera::CCameraAdvancedSettings::TMeteringMode MeteringMode() const { return CCamera::CCameraAdvancedSettings::EMeteringModeAuto; } |
|
180 void SetMeteringMode(CCamera::CCameraAdvancedSettings::TMeteringMode aMeteringMode) {} |
|
181 TInt SupportedDriveModes() const { return 0; } |
|
182 CCamera::CCameraAdvancedSettings::TDriveMode DriveMode() const { return CCamera::CCameraAdvancedSettings::EDriveModeAuto; } |
|
183 void SetDriveMode(CCamera::CCameraAdvancedSettings::TDriveMode aDriveMode) {} |
|
184 TInt SupportedBracketModes() const { return 0; } |
|
185 CCamera::CCameraAdvancedSettings::TBracketMode BracketMode() const { return CCamera::CCameraAdvancedSettings::EBracketModeOff; } |
|
186 void SetBracketMode(CCamera::CCameraAdvancedSettings::TBracketMode aBracketMode) {} |
|
187 TInt SupportedBracketParameters() const { return 0; } |
|
188 CCamera::CCameraAdvancedSettings::TBracketParameter BracketParameter() const { return CCamera::CCameraAdvancedSettings::EBracketParameterNone; } |
|
189 void SetBracketParameter(CCamera::CCameraAdvancedSettings::TBracketParameter aBracketParameter) {} |
|
190 TInt SupportedBracketSteps() const { return 0; } |
|
191 CCamera::CCameraAdvancedSettings::TBracketStep BracketStep() const { return CCamera::CCameraAdvancedSettings::EBracketStepNonConfig; } |
|
192 void SetBracketStep(CCamera::CCameraAdvancedSettings::TBracketStep aBracketStep) {} |
|
193 void GetBracketMerge(TInt& aStartIndex, TInt& aFrames) const {} |
|
194 void SetBracketMerge(TInt aStartIndex, TInt aFrames) {} |
|
195 TInt SupportedFlashModes() const { return 0; } |
|
196 CCamera::TFlash FlashMode() const { return CCamera::EFlashAuto; } |
|
197 void SetFlashMode(CCamera::TFlash aMode) {} |
|
198 TBool RedEyeReduceOn() const { return EFalse; } |
|
199 void SetRedEyeReduceOn(TBool aState) {} |
|
200 void GetFlashCompensationStepsL(RArray<TInt>& aFlashCompensationSteps, TValueInfo& aInfo) const{} |
|
201 TInt FlashCompensationStep() const { return 0; } |
|
202 TInt GetFlashCompensationStep(TInt& aFlashCompensationStep) const { return 0; } |
|
203 void SetFlashCompensationStep(TInt aFlashCompensationStep) {} |
|
204 void GetFlashCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const {} |
|
205 TInt FlashCompensation() const { return 0; } |
|
206 TInt GetFlashCompensation(TInt& aFlashCompensation) const { return 0; } |
|
207 void SetFlashCompensation(TInt aFlashCompensationSteps) {} |
|
208 TBool IsExternalFlashPresent() const { return EFalse; } |
|
209 void GetManualFlashPowerLevelsL(RArray<TInt>& aManualFlashPowerLevels, TValueInfo& aInfo) const {} |
|
210 TInt ManualFlashPowerLevel() const { return 0; } |
|
211 void SetManualFlashPowerLevel(TInt aManualFlashPowerLevel) {} |
|
212 TInt SupportedExposureModes() const { return 0; } |
|
213 CCamera::TExposure ExposureMode() const { return CCamera::EExposureAuto; } |
|
214 void SetExposureMode(CCamera::TExposure aExposureMode) {} |
|
215 void GetExposureCompensationStepsL(RArray<TInt>& aExposureCompensationSteps, TValueInfo& aInfo) const {} |
|
216 TInt ExposureCompensationStep() const { return 0; } |
|
217 TInt GetExposureCompensationStep(TInt& aExposureCompensationStep) const { return 0; } |
|
218 void SetExposureCompensationStep(TInt aExposureCompensationStep) {} |
|
219 void GetExposureCompensationRangeInSteps(TInt& aNegativeCompensation, TInt& aPositiveCompensation) const {} |
|
220 TInt ExposureCompensation() const { return 0; } |
|
221 TInt GetExposureCompensation(TInt& aExposureCompensation) const { return 0; } |
|
222 void SetExposureCompensation(TInt aExposureCompensationSteps) {} |
|
223 TInt SupportedWhiteBalanceModes() const { return 0;} |
|
224 CCamera::TWhiteBalance WhiteBalanceMode() const { return CCamera::EWBAuto; } |
|
225 void SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode) {} |
|
226 TBool ApertureExposureLockOn() const { return EFalse; } |
|
227 void SetApertureExposureLockOn(TBool aAELock) {} |
|
228 TBool ShootClickOn() const { return EFalse; } |
|
229 void SetShootClickOn(TBool aShootClickOn) {} |
|
230 void GetTimerIntervalsL(RArray<TInt>& aTimerIntervals, TValueInfo& aInfo) const {} |
|
231 TInt TimerInterval() const { return 0; } |
|
232 void SetTimerInterval(TInt aTimerInterval) {} |
|
233 void GetTimeLapsePeriodRange(TTime& aTimeLapseMin, TTime& aTimeLapseMax) const {} |
|
234 void GetTimeLapse(TTime& aStart, TTime& aEnd, TTime& aInterval) const {} |
|
235 void SetTimeLapse(const TTime& aStart, const TTime& aEnd, const TTime& aInterval) {} |
|
236 CCamera::CCameraAdvancedSettings::TPictureOrientation PictureOrientation() const { return CCamera::CCameraAdvancedSettings::EPictureOrientationUnknown; } |
|
237 void SetPictureOrientation(CCamera::CCameraAdvancedSettings::TPictureOrientation aOrientation) {} |
|
238 TInt SupportedPixelAspectRatios() const { return 0; } |
|
239 CCamera::CCameraAdvancedSettings::TPixelAspectRatio PixelAspectRatio() const { return CCamera::CCameraAdvancedSettings::EPixelAspectUnknown; }; |
|
240 void SetPixelAspectRatio(CCamera::CCameraAdvancedSettings::TPixelAspectRatio aPixelAspectRatio) {} |
|
241 TInt SupportedYuvRanges() const { return 0; } |
|
242 CCamera::CCameraAdvancedSettings::TYuvRange YuvRange() const { return CCamera::CCameraAdvancedSettings::EYuvRangeUnknown; } |
|
243 void SetYuvRange(CCamera::CCameraAdvancedSettings::TYuvRange aYuvRange) {} |
|
244 TInt BurstImages() const { return 0; } |
|
245 void SetBurstImages( TInt aImages ) {} |
|
246 |
|
247 void GetOpticalZoomStepsL(RArray<TInt>& aOpticalZoomSteps, TValueInfo& aInfo) const {} |
|
248 TInt OpticalZoom() const { return 0; } |
|
249 void SetOpticalZoom(TInt aOpticalZoom) {} |
|
250 void GetDigitalZoomStepsL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo) const; |
|
251 TInt DigitalZoom() const { return iZoomValue; } |
|
252 void SetDigitalZoom(TInt aDigitalZoom) { iZoomValue = aDigitalZoom; } |
|
253 |
|
254 TBool ExposureLockOn() const { return EFalse; } |
|
255 void SetExposureLockOn(TBool aState) {} |
|
256 TBool AutoFocusLockOn() const {return EFalse; } |
|
257 void SetAutoFocusLockOn(TBool aState) {} |
|
258 void GetSupportedSettingsL(RArray<TUid>& aSettings) const {} |
|
259 void GetActiveSettingsL(RArray<TUid>& aActiveSettings) const {} |
|
260 void GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const {} |
|
261 TBool AutomaticSizeSelectionChangeOn() const { return EFalse; } |
|
262 void SetAutomaticSizeSelectionChangeOn(TBool aSetOn) {} |
|
263 void GetSupportedContinuousAutoFocusTimeoutsL(RArray<TInt>& aTimeouts, TValueInfo& aInfo) const {} |
|
264 TInt ContinuousAutoFocusTimeout() const { return 0; } |
|
265 void SetContinuousAutoFocusTimeout(TInt aTimeout) {} |
|
266 TInt SupportedStabilizationEffects() const { return 0; } |
|
267 CCamera::CCameraAdvancedSettings::TStabilizationEffect StabilizationEffect() const { return CCamera::CCameraAdvancedSettings::EStabilizationOff; } |
|
268 void SetStabilizationEffect(CCamera::CCameraAdvancedSettings::TStabilizationEffect aEffect) {} |
|
269 TInt SupportedStabilizationComplexityValues() const { return 0; } |
|
270 CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity StabilizationComplexity() const { return CCamera::CCameraAdvancedSettings::EStabilizationComplexityAuto; } |
|
271 void SetStabilizationComplexity(CCamera::CCameraAdvancedSettings::TStabilizationAlgorithmComplexity aComplexity) {} |
|
272 CCamera::CCameraAdvancedSettings::TWBUnits SupportedWBUnits() const { return CCamera::CCameraAdvancedSettings::EWBUnknown; } |
|
273 void GetWBRgbValue(TRgb& aValue) const {} |
|
274 void SetWBRgbValue(const TRgb& aValue) {} |
|
275 void GetWBSupportedColorTemperaturesL(RArray<TInt>& aWBColorTemperatures, TValueInfo& aInfo) const {} |
|
276 TInt WBColorTemperature() const { return 0; } |
|
277 void SetWBColorTemperature(TInt aWBColorTemperature) {} |
|
278 |
|
279 |
|
280 // from MCameraAdvancedSettings3 |
|
281 void GetSupportedISORateTypeL(TInt& aSupportedISORateTypes) const {} |
|
282 |
|
283 void SetISORate(CCamera::CCameraAdvancedSettings::TISORateType aISORateType, TInt aParam){} |
|
284 |
|
285 void GetISORateL(CCamera::CCameraAdvancedSettings::TISORateType& aISORateType, TInt& aParam, TInt& aISORate) const{} |
|
286 |
|
287 void SetReferenceScreen(CWsScreenDevice& aScreenDevice){} |
|
288 |
|
289 |
|
290 void GetDigitalZoomStepsForStillL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aSizeIndex, |
|
291 CCamera::TFormat aFormat, TBool& aIsInfluencePossible) const; |
|
292 |
|
293 void GetDigitalZoomStepsForVideoL(RArray<TInt>& aDigitalZoomSteps, TValueInfo& aInfo, TInt aFrameRateIndex, |
|
294 TInt aSizeIndex, CCamera::TFormat aFormat, TBool& aIsInfluencePossible, CCamera::TExposure aExposure) const{} |
|
295 |
|
296 void GetPreCaptureWarningSupportedL(CCamera::CCameraAdvancedSettings::TCameraMode aCameraMode, TInt& aPreCaptureWarningSupported) const{} |
|
297 |
|
298 void SubscribeToPreCaptureWarningL(TInt aPreCaptureWarning){} |
|
299 |
|
300 void UnSubscribePreCaptureWarningL(){} |
|
301 |
|
302 void GetPreCaptureWarningL(TInt& aPreCaptureWarning) const{} |
|
303 |
|
304 void GetSupportedAFAssistantLightL(TInt& aSupportedAFAssistantLight) const{} |
|
305 |
|
306 void GetAFAssistantLightL(CCamera::CCameraAdvancedSettings::TAFAssistantLight& aAFAssistantLight) const{} |
|
307 |
|
308 void SetAFAssistantLight(CCamera::CCameraAdvancedSettings::TAFAssistantLight aAFAssistantLight){} |
|
309 |
|
310 |
|
311 private: |
|
312 void queueClientNotification(TUid aUid, TInt aStatus); |
|
313 void doClientNotification(); |
|
314 static TInt clientNotificationCallback(TAny* aParam); |
|
315 |
|
316 private: |
|
317 |
|
318 CCamera* iCamera; // Not own |
|
319 CPeriodic* iNotificationTimer; |
|
320 RArray<TCxeDummyNotification> iClientNofications; |
|
321 |
|
322 CCamera::CCameraAdvancedSettings::TFocusMode iFocusMode; |
|
323 CCamera::CCameraAdvancedSettings::TFocusRange iFocusRange; |
|
324 CCamera::CCameraAdvancedSettings::TAutoFocusType iFocusType; |
|
325 |
|
326 TInt iZoomValue; |
|
327 }; |
|
328 |
|
329 |
|
330 class CxeDummyImageProcessing : public CBase, public MCameraImageProcessing |
|
331 { |
|
332 public: |
|
333 |
|
334 |
|
335 void Release(){}; |
|
336 void GetSupportedTransformationsL(RArray<TUid>& aTransformations) const{}; |
|
337 void GetActiveTransformationsL(RArray<TUid>& aTransformations) const{}; |
|
338 void GetTransformationSupportedValuesL(TUid aTransformation, RArray<TInt>& aValues, TValueInfo& aInfo) const{}; |
|
339 TInt TransformationValue(TUid aTransformation) const{return KErrNotFound;}; |
|
340 TInt GetTransformationValue(TUid aTransformation, TInt& aTransformationValue) const{return KErrNotFound;}; |
|
341 void SetTransformationValue(TUid aTransformation, TInt aValue){}; |
|
342 void GetActiveTransformSequenceL(RArray<TUid>& aTransformSequence) const{}; |
|
343 void SetActiveTransformSequenceL(RArray<TUid>& aTransformSequence){}; |
|
344 void SetSourceRect(const TRect& aRect){}; |
|
345 void GetSourceRect(TRect& aRect) const{}; |
|
346 |
|
347 }; |
|
348 |
|
349 |
|
350 enum TCxeDummyCommand |
|
351 { |
|
352 EReserve, |
|
353 EPowerOn, |
|
354 EProvideSnapshot, |
|
355 EProvideStillImage |
|
356 }; |
|
357 |
|
358 enum TCxeState |
|
359 { |
|
360 EStReleased, |
|
361 EStReserving, |
|
362 EStReserved, |
|
363 EStPoweringOn, |
|
364 EStPowerOn, |
|
365 EStImagePrepared, |
|
366 EStVideoPrepared |
|
367 }; |
|
368 |
|
369 class CxeDummyCamera : public CCameraPlugin |
|
370 { |
|
371 friend class CxeDummyAdvancedSettings; |
|
372 |
|
373 public: |
|
374 static TInt CamerasAvailable() { return 2; } |
|
375 |
|
376 static CxeDummyCamera* NewL(MCameraObserver& aObserver,TInt aCameraIndex, TInt aCameraVersion) { return NULL; } |
|
377 static CxeDummyCamera* NewDuplicateL(MCameraObserver& aObserver,TInt aCameraHandle, TInt aCameraVersion) { return NULL; } |
|
378 static CxeDummyCamera* NewL(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority, TInt aCameraVersion); |
|
379 static CxeDummyCamera* NewDuplicateL(MCameraObserver2& aObserver,TInt aCameraHandle, TInt aCameraVersion) { return NULL; } |
|
380 |
|
381 void Construct2L( MCameraObserver2 &, TInt, TInt ) {} |
|
382 void Construct2L( MCameraObserver2 &, TInt ) {} |
|
383 void Construct2L( MCameraObserver &, TInt ) {} |
|
384 void Construct2DupL( MCameraObserver2 &, TInt ) {} |
|
385 void Construct2DupL( MCameraObserver &, TInt ) {} |
|
386 |
|
387 ~CxeDummyCamera(); |
|
388 |
|
389 void CameraInfo(TCameraInfo& aInfo) const { aInfo = iInfo; } |
|
390 void Reserve(); |
|
391 void Release(); |
|
392 void PowerOn(); |
|
393 void PowerOff(); |
|
394 TInt Handle() { return 0; } |
|
395 |
|
396 void SetZoomFactorL(TInt aZoomFactor) {} |
|
397 TInt ZoomFactor() const { return 0; } |
|
398 void SetDigitalZoomFactorL(TInt aDigitalZoomFactor) { iZoom = aDigitalZoomFactor; } |
|
399 TInt DigitalZoomFactor() const { return iZoom; } |
|
400 void SetContrastL(TInt aContrast) { iContrast = aContrast; } |
|
401 TInt Contrast() const { return iContrast; } |
|
402 void SetBrightnessL(TInt aBrightness) { iBrightness = aBrightness; } |
|
403 TInt Brightness() const { return iBrightness; } |
|
404 void SetFlashL(TFlash aFlash ) { iFlash = aFlash; } |
|
405 TFlash Flash() const { return iFlash; } |
|
406 void SetExposureL(TExposure aExposure ) { iExposure = aExposure; } |
|
407 TExposure Exposure() const { return iExposure; } |
|
408 void SetWhiteBalanceL(TWhiteBalance aWhiteBalance ) { iWb = aWhiteBalance; } |
|
409 TWhiteBalance WhiteBalance() const { return iWb; } |
|
410 |
|
411 void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect) {} |
|
412 void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect,TRect& aClipRect) {} |
|
413 void StartViewFinderBitmapsL(TSize& aSize) {} |
|
414 void StartViewFinderBitmapsL(TSize& aSize,TRect& aClipRect) {} |
|
415 void StartViewFinderL(TFormat aImageFormat,TSize& aSize) {} |
|
416 void StartViewFinderL(TFormat aImageFormat,TSize& aSize,TRect& aClipRect) {} |
|
417 void StopViewFinder() {} |
|
418 TBool ViewFinderActive() const { return EFalse; } |
|
419 void SetViewFinderMirrorL(TBool aMirror) {} |
|
420 TBool ViewFinderMirror() const { return EFalse; } |
|
421 void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex) |
|
422 { |
|
423 CX_DEBUG_IN_FUNCTION(); |
|
424 } |
|
425 void PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex,const TRect& aClipRect) |
|
426 { |
|
427 CX_DEBUG_IN_FUNCTION(); |
|
428 } |
|
429 void CaptureImage(); |
|
430 void CancelCaptureImage() {} |
|
431 void EnumerateCaptureSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const; |
|
432 void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer) {} |
|
433 void PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer,const TRect& aClipRect) {} |
|
434 void StartVideoCapture() {} |
|
435 void StopVideoCapture() {} |
|
436 TBool VideoCaptureActive() const { return EFalse; } |
|
437 void EnumerateVideoFrameSizes(TSize& aSize,TInt aSizeIndex,TFormat aFormat) const {} |
|
438 void EnumerateVideoFrameRates(TReal32& aRate,TInt aRateIndex,TFormat aFormat,TInt aSizeIndex,TExposure aExposure = EExposureAuto) const {} |
|
439 void GetFrameSize(TSize& aSize) const {} |
|
440 TReal32 FrameRate() const { return 0.0; } |
|
441 TInt BuffersInUse() const { return 0; } |
|
442 TInt FramesPerBuffer() const { return 0; } |
|
443 void SetJpegQuality(TInt aQuality) {} |
|
444 TInt JpegQuality() const { return 0; } |
|
445 TAny* CustomInterface(TUid aInterface); |
|
446 TInt CameraVersion() { return 1; } |
|
447 |
|
448 private: |
|
449 CxeDummyCamera(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority, TInt aCameraVersion); |
|
450 void doCommand( TCxeDummyCommand aCmd ); |
|
451 static TInt callBack( TAny* aParam ); |
|
452 TInt doHandleCallback(); |
|
453 |
|
454 private: |
|
455 CPeriodic* iCommandTimer; |
|
456 RArray<TCxeDummyCommand> iCommandBuf; |
|
457 MCameraObserver2& iObserver; |
|
458 TCameraInfo iInfo; |
|
459 TWhiteBalance iWb; |
|
460 TExposure iExposure; |
|
461 TFlash iFlash; |
|
462 TInt iBrightness; |
|
463 TInt iContrast; |
|
464 TInt iZoom; |
|
465 TCxeState iState; |
|
466 CxeDummyAdvancedSettings* iAdvancedSettings; |
|
467 CxeDummyDirectViewfinder* iDirectViewfinder; |
|
468 CxeDummySnapshot* iSnapshot; |
|
469 CxeDummyBuffer* iStillImage; |
|
470 CxeDummyImageProcessing* iImageProcessing; |
|
471 }; |
|
472 |
|
473 // Restore warnings about unused arguments |
|
474 #pragma warn_unusedarg reset |
|
475 |
|
476 #endif // defined(CXE_USE_DUMMY_CAMERA) || defined(__WINSCW__) |
|
477 |
|
478 #endif // CXEDUMMYCAMERA_H |