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: CaeTestVideoStates.cpp |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "CaeTestVideoStates.h" |
|
19 #include <f32file.h> |
|
20 |
|
21 |
|
22 //const TReal32 KViewFinderFrameFrequencyMinimum = 13.0; |
|
23 |
|
24 |
|
25 CCaeTestVideoStates::CCaeTestVideoStates () |
|
26 { |
|
27 } |
|
28 |
|
29 |
|
30 CCaeTestVideoStates::~CCaeTestVideoStates () |
|
31 { |
|
32 } |
|
33 |
|
34 |
|
35 void CCaeTestVideoStates::setUpL () |
|
36 { |
|
37 iStatesClient = CCaeTestStatesClient::NewL( ); |
|
38 |
|
39 iStatesClient->SetFileNameBase( KFileNameBase ); |
|
40 } |
|
41 |
|
42 |
|
43 void CCaeTestVideoStates::tearDown () |
|
44 { |
|
45 delete iStatesClient; |
|
46 iStatesClient = 0; |
|
47 } |
|
48 |
|
49 |
|
50 // |
|
51 // Own test functions. |
|
52 // |
|
53 // The framework will do for a test function: |
|
54 // |
|
55 // setUpL(); |
|
56 // TRAPD(leaveCode, 'myTestFunction()'); |
|
57 // "Report leave error or assertion failure for 'myTestFunction()'". |
|
58 // tearDown(); |
|
59 // |
|
60 |
|
61 |
|
62 /********************************************************/ |
|
63 /* VIDEO RECORDING PREPARE AND RECORD QUALITY LEVEL */ |
|
64 /********************************************************/ |
|
65 |
|
66 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel0L() |
|
67 { |
|
68 // ID: CAE.VR.VIDEORECORDING.QCIF64000FR15.004 |
|
69 // |
|
70 // Group: Record. |
|
71 // |
|
72 // Action : Test to prepare video recording and record quality level 0 |
|
73 // video clip when initialization is done. |
|
74 // |
|
75 // Output : No leave. File cae_novf_ql_0.3gp. |
|
76 |
|
77 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
78 |
|
79 iStatesClient->SetTimeout( 5000000 ); |
|
80 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
81 |
|
82 iStatesClient->SetVideoFileName( _L("cae_novf_ql_0.3gp") ); |
|
83 |
|
84 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
85 |
|
86 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
87 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
88 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
89 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
90 } |
|
91 |
|
92 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel1L() |
|
93 { |
|
94 // ID: CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.005 |
|
95 // |
|
96 // Group: Record. |
|
97 // |
|
98 // Action : Test to prepare video recording and record quality level 1 |
|
99 // video clip when initialization is done. |
|
100 // |
|
101 // Output : No leave. File cae_novf_ql_1.3gp. |
|
102 |
|
103 iStatesClient->SetVideoQualityLevelIndex( 1 ); |
|
104 |
|
105 iStatesClient->SetTimeout( 5000000 ); |
|
106 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
107 |
|
108 iStatesClient->SetVideoFileName( _L("cae_novf_ql_1.3gp") ); |
|
109 |
|
110 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
111 |
|
112 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
113 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
114 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
115 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
116 } |
|
117 |
|
118 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel2L() |
|
119 { |
|
120 // ID: CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.006 |
|
121 // |
|
122 // Group: Record. |
|
123 // |
|
124 // Action : Test to prepare video recording and record quality level 2 |
|
125 // video clip when initialization is done. |
|
126 // |
|
127 // Output : No leave. File cae_novf_ql_2.3gp. |
|
128 |
|
129 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
130 |
|
131 iStatesClient->SetTimeout( 5000000 ); |
|
132 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
133 |
|
134 iStatesClient->SetVideoFileName( _L("cae_novf_ql_2.3gp") ); |
|
135 |
|
136 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
137 |
|
138 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
139 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
140 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
141 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
142 } |
|
143 |
|
144 |
|
145 /********************************************************/ |
|
146 /* VIDEO RECORDING SPECIAL PREPARE AND RECORD */ |
|
147 /********************************************************/ |
|
148 |
|
149 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioNoVfL() |
|
150 { |
|
151 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.003 |
|
152 // |
|
153 // Group: Record |
|
154 // |
|
155 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
156 // To ensure that starting and stopping video recording works. |
|
157 // To ensure that recording QCIF sized video works. |
|
158 // Video recording prepared for QCIF format. |
|
159 // |
|
160 // Output : OK. |
|
161 |
|
162 iStatesClient->SetTimeout( 20000000 ); |
|
163 |
|
164 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
165 |
|
166 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
167 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
168 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
169 iStatesClient->SetVideoAudio( EFalse ); |
|
170 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
171 |
|
172 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
173 |
|
174 iStatesClient->SetVideoFileName( _L("cae_qcif10fps.3gp") ); |
|
175 |
|
176 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
177 |
|
178 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
179 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
180 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
181 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
182 } |
|
183 |
|
184 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioNoVfL() |
|
185 { |
|
186 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.004 |
|
187 // |
|
188 // Group: Record |
|
189 // |
|
190 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
191 // To ensure that starting and stopping video recording works. |
|
192 // To ensure that recording QCIF sized video works. |
|
193 // Video recording prepared for QCIF format. |
|
194 // |
|
195 // Output : OK. |
|
196 |
|
197 iStatesClient->SetTimeout( 20000000 ); |
|
198 |
|
199 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
200 |
|
201 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
202 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
203 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
204 #if ( defined (__WINS__) || defined (__WINSCW) ) // this different on hw |
|
205 iStatesClient->SetVideoAudio( EFalse ); // Audio does not work in emulator, error -9 |
|
206 #else |
|
207 iStatesClient->SetVideoAudio( ETrue ); |
|
208 #endif |
|
209 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
210 |
|
211 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
212 |
|
213 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audio.3gp") ); |
|
214 |
|
215 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
216 |
|
217 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
218 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
219 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
220 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
221 } |
|
222 |
|
223 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioWithVfL() |
|
224 { |
|
225 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.005 |
|
226 // |
|
227 // Group: Record |
|
228 // |
|
229 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
230 // To ensure that starting and stopping video recording works. |
|
231 // To ensure that recording QCIF sized video works. |
|
232 // Video recording prepared for QCIF format. |
|
233 // |
|
234 // Output : OK. |
|
235 |
|
236 iStatesClient->SetTimeout( 20000000 ); |
|
237 |
|
238 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
239 |
|
240 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
241 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
242 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
243 iStatesClient->SetVideoAudio( EFalse ); |
|
244 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
245 |
|
246 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
247 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
248 |
|
249 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_vf.3gp") ); |
|
250 |
|
251 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
252 |
|
253 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
254 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
255 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
256 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
257 } |
|
258 |
|
259 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioWithVfL() |
|
260 { |
|
261 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.006 |
|
262 // |
|
263 // Group: Record |
|
264 // |
|
265 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
266 // To ensure that starting and stopping video recording works. |
|
267 // To ensure that recording QCIF sized video works. |
|
268 // Video recording prepared for QCIF format. |
|
269 // |
|
270 // Output : OK. |
|
271 |
|
272 iStatesClient->SetTimeout( 20000000 ); |
|
273 |
|
274 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
275 |
|
276 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
277 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
278 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
279 #if ( defined (__WINS__) || defined (__WINSCW) ) // this different on hw |
|
280 iStatesClient->SetVideoAudio( EFalse );// Audio does not work in emulator, error -9 |
|
281 #else |
|
282 iStatesClient->SetVideoAudio( ETrue ); |
|
283 #endif |
|
284 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
285 |
|
286 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
287 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
288 |
|
289 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audio_vf.3gp") ); |
|
290 |
|
291 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
292 |
|
293 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
294 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
295 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
296 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
297 } |
|
298 |
|
299 /********************************************************/ |
|
300 /* PAUSE VIDEO RECORDING */ |
|
301 /********************************************************/ |
|
302 |
|
303 void CCaeTestVideoStates::TestRecordPauseStopL() |
|
304 { |
|
305 // ID: CAE.VR.PAUSEVIDEORECORDING.001 |
|
306 // |
|
307 // Group: Record. |
|
308 // |
|
309 // Action : Pause video clip recording.Video recordin prepared. |
|
310 // |
|
311 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
312 |
|
313 iStatesClient->SetTimeout( 3000000 ); |
|
314 |
|
315 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
316 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
317 |
|
318 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPauseStopVideo ); |
|
319 |
|
320 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
321 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
322 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
323 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
324 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
325 } |
|
326 |
|
327 void CCaeTestVideoStates::TestPauseWhenPreparedL() |
|
328 { |
|
329 // ID: CAE.VR.PAUSEVIDEORECORDING.002 |
|
330 // |
|
331 // Group: Record. |
|
332 // |
|
333 // Action : Call Pause when video is prepared but video recordind is not started. |
|
334 // |
|
335 // Output : Leave.. |
|
336 |
|
337 iStatesClient->SetTimeout( 5000000 ); |
|
338 |
|
339 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
340 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
341 |
|
342 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPauseVideoWhenPrepared ) ); |
|
343 assertL( err == KErrNotReady ); |
|
344 |
|
345 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
346 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
347 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
348 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
349 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
350 } |
|
351 |
|
352 void CCaeTestVideoStates::TestRecordPausePauseStopL() |
|
353 { |
|
354 // ID: CAE.VR.PAUSEVIDEORECORDING.003 |
|
355 // |
|
356 // Group: Record. |
|
357 // |
|
358 // Action : Pause video clip recording twice.Video recordin prepared. |
|
359 // |
|
360 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
361 |
|
362 iStatesClient->SetTimeout( 3000000 ); |
|
363 |
|
364 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
365 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
366 |
|
367 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPausePauseStopVideo ); |
|
368 |
|
369 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
370 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
371 assertL( iStatesClient->CountVideoRecordingPaused() == 2 ); |
|
372 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
373 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
374 } |
|
375 |
|
376 /********************************************************/ |
|
377 /* RESUME VIDEO RECORDING */ |
|
378 /********************************************************/ |
|
379 |
|
380 void CCaeTestVideoStates::TestResumeWhenPreparedL() |
|
381 { |
|
382 // ID: CAE.VR.RESUMEVIDEORECORDING.002 |
|
383 // |
|
384 // Group: Record. |
|
385 // |
|
386 // Action : Resume video clip recording before pause. |
|
387 // Video recording. |
|
388 // |
|
389 // Output : Leave. |
|
390 |
|
391 iStatesClient->SetTimeout( 3000000 ); |
|
392 |
|
393 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
394 |
|
395 iStatesClient->SetVideoFileName( _L("cae_pause_resume.3gp") ); |
|
396 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
397 |
|
398 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenPrepared ) ); |
|
399 assertL( err == KErrNotReady ); |
|
400 |
|
401 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
402 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
403 } |
|
404 |
|
405 void CCaeTestVideoStates::TestResumeWhenNotPausedL() |
|
406 { |
|
407 // ID: CAE.VR.RESUMEVIDEORECORDING.003 |
|
408 // |
|
409 // Group: Record. |
|
410 // |
|
411 // Action : Resume video clip recording before pause. |
|
412 // Video recording. |
|
413 // |
|
414 // Output : Leave. |
|
415 |
|
416 iStatesClient->SetTimeout( 5000000 ); |
|
417 |
|
418 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
419 |
|
420 iStatesClient->SetVideoFileName( _L("cae_pause_resume.3gp") ); |
|
421 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
422 |
|
423 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenNotPaused ) ); |
|
424 assertL( err == KErrNotReady ); |
|
425 |
|
426 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
427 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
428 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
429 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
430 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
431 } |
|
432 |
|
433 /********************************************************/ |
|
434 /* PREPARE VIDEO RECORDING */ |
|
435 /********************************************************/ |
|
436 |
|
437 void CCaeTestVideoStates::TestPrepareVideoRecordingNeg1L() |
|
438 { |
|
439 // ID: CAE.VR.PREPAREVIDEORECORDINGL.005 |
|
440 // |
|
441 // Group: Record |
|
442 // |
|
443 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
444 // Initialization is done. |
|
445 // |
|
446 // Output : Leave. |
|
447 |
|
448 iStatesClient->SetVideoQualityLevelIndex( -1 ); |
|
449 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
450 |
|
451 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_-1.3gp") ); |
|
452 |
|
453 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
454 assertL( error != KErrNone ); |
|
455 |
|
456 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
457 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
458 } |
|
459 |
|
460 void CCaeTestVideoStates::TestPrepareVideoRecording3L() |
|
461 { |
|
462 // ID: CAE.VR.PREPAREVIDEORECORDINGL.006 |
|
463 // |
|
464 // Group: Record |
|
465 // |
|
466 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
467 // Initialization is done. |
|
468 // |
|
469 // Output : Leave. |
|
470 |
|
471 iStatesClient->SetVideoQualityLevelIndex( 3 ); |
|
472 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
473 |
|
474 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_3.3gp") ); |
|
475 |
|
476 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
477 assertL( error != KErrNone ); |
|
478 |
|
479 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
480 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
481 } |
|
482 |
|
483 void CCaeTestVideoStates::TestSpecPrepareVRUnsupportedFormatWhenVRInitializedL() |
|
484 { |
|
485 // ID: CAE.VR.PREPAREVIDEORECORDINGL.008 |
|
486 // |
|
487 // Group: Record. |
|
488 // |
|
489 // Action : Set video recording format to a format unsupported by MMF Camcorder plug-in |
|
490 // and Camera API implementation. |
|
491 // Video recorder initialization is done. |
|
492 // |
|
493 // Output : Leave. |
|
494 |
|
495 iStatesClient->SetTimeout( 3000000 ); |
|
496 |
|
497 TSize sizeTooBig( KImgWidthTooBig, KImgHeightTooBig ); |
|
498 iStatesClient->SetVideoFrameSize( sizeTooBig ); |
|
499 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
500 iStatesClient->SetVideoBitRate( 50000 ); |
|
501 iStatesClient->SetVideoAudio( ETrue ); |
|
502 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
503 |
|
504 //iStatesClient->SetVideoFileName( _L("cae_video_unsupported_format.3gp") ); |
|
505 |
|
506 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideo ) );//verified if is correct action |
|
507 assertL( error != KErrNone ); |
|
508 |
|
509 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
510 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
511 } |
|
512 |
|
513 void CCaeTestVideoStates::TestSpecPrepareVRSupportedFormatWhenPreparedL() |
|
514 { |
|
515 // ID: CAE.VR.PREPAREVIDEORECORDINGL.009 |
|
516 // |
|
517 // Group: Record. |
|
518 // |
|
519 // Action : Set video recording format to a format supported by MMF Camcorder plug-in |
|
520 // and Camera API implementation when video recording is prepared already. . |
|
521 // |
|
522 // Output : OK. |
|
523 |
|
524 iStatesClient->SetTimeout( 5000000 ); |
|
525 |
|
526 TSize sizeSubqcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
527 iStatesClient->SetVideoFrameSize( sizeSubqcif ); |
|
528 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
529 iStatesClient->SetVideoBitRate( 50000 ); |
|
530 iStatesClient->SetVideoAudio( ETrue ); |
|
531 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
532 |
|
533 //iStatesClient->SetVideoFileName( _L("cae_video_format_prepared.3gp") ); |
|
534 |
|
535 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideoWhenPrepared );//verified if is correct action |
|
536 |
|
537 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
538 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
539 } |
|
540 |
|
541 /********************************************************/ |
|
542 /* START VIDEO RECORDING */ |
|
543 /********************************************************/ |
|
544 |
|
545 void CCaeTestVideoStates::TestStartVideoRecordingWhenVRInitializedL() |
|
546 { |
|
547 // ID: CAE.VR.STARTVIDEORECORDING.001 |
|
548 // |
|
549 // Group: Record |
|
550 // |
|
551 // Action : Start video clip recording. |
|
552 // Initialization is done. |
|
553 // |
|
554 // Output : Leave. |
|
555 |
|
556 iStatesClient->SetTimeout( 3000000 ); |
|
557 |
|
558 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
559 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
560 |
|
561 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenInitialized ) );//we have to put correct action |
|
562 assertL( error == KErrNotReady ); |
|
563 |
|
564 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
565 } |
|
566 |
|
567 void CCaeTestVideoStates::TestStartVideoRecordingWhenRecordingL() |
|
568 { |
|
569 // ID: CAE.VR.STARTVIDEORECORDING.002 |
|
570 // |
|
571 // Group: Record |
|
572 // |
|
573 // Action : Start video clip recording. |
|
574 // Video recording on. |
|
575 // |
|
576 // Output : Leave. |
|
577 |
|
578 iStatesClient->SetTimeout( 3000000 ); |
|
579 |
|
580 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
581 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
582 |
|
583 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenRecording ) );//we have to put correct action |
|
584 assertL( error == KErrNotReady ); |
|
585 |
|
586 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
587 } |
|
588 |
|
589 /********************************************************/ |
|
590 /* STOP VIDEO RECORDING */ |
|
591 /********************************************************/ |
|
592 |
|
593 void CCaeTestVideoStates::TestStopVideoRecordingWhenVRInitializedL() |
|
594 { |
|
595 // ID: CAE.VR.STOPVIDEORECORDING.001 |
|
596 // |
|
597 // Group: Record |
|
598 // |
|
599 // Action : Stop video clip recording. |
|
600 // Initialization is done. |
|
601 // |
|
602 // Output : Leave. |
|
603 |
|
604 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
605 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenInitialized ) );//we have to put correct action |
|
606 assertL( error == KErrNotReady ); |
|
607 |
|
608 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
609 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
610 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
611 } |
|
612 |
|
613 void CCaeTestVideoStates::TestStopVideoRecordingWhenPreparedL() |
|
614 { |
|
615 // ID: CAE.VR.STOPVIDEORECORDING.002 |
|
616 // |
|
617 // Group: Record |
|
618 // |
|
619 // Action : Stop video clip recording. |
|
620 // Video recording prepared. |
|
621 // |
|
622 // Output : Leave. |
|
623 |
|
624 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
625 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
626 |
|
627 //iStatesClient->SetVideoFileName( _L("cae_stop_vr_prepared.3gp") ); |
|
628 |
|
629 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenPrepared ) );//we have to put correct action |
|
630 assertL( error == KErrNotReady ); |
|
631 |
|
632 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
633 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
634 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
635 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
636 } |
|
637 |
|
638 /********************************************************/ |
|
639 /* STATE CHANGE */ |
|
640 /********************************************************/ |
|
641 |
|
642 void CCaeTestVideoStates::TestCaptureRecordL() |
|
643 { |
|
644 // ID: CAE.STATECHANGE.CAPTURERECORD.002 |
|
645 // |
|
646 // Group: Capture & Record. |
|
647 // |
|
648 // Action : Capture photo first and then record video successively |
|
649 // |
|
650 // Output : No leave. |
|
651 |
|
652 iStatesClient->SetTimeout( 1000000 ); |
|
653 |
|
654 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
655 |
|
656 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
657 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
658 |
|
659 iStatesClient->RunTestActionL( CCaeTestStatesClient::ECaptureRecord ); |
|
660 |
|
661 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
662 |
|
663 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
664 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
665 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
666 |
|
667 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
668 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
669 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
670 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
671 } |
|
672 |
|
673 void CCaeTestVideoStates::TestRecordCaptureL() |
|
674 { |
|
675 // ID: CAE.STATECHANGE.RECORDCAPTURE.003 |
|
676 // |
|
677 // Group: Record & Capture. |
|
678 // |
|
679 // Action : Record video first and then capture photo successively |
|
680 // |
|
681 // Output : No leave. |
|
682 |
|
683 iStatesClient->SetTimeout( 1000000 ); |
|
684 |
|
685 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
686 |
|
687 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
688 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
689 |
|
690 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCapture ); |
|
691 |
|
692 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
693 |
|
694 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
695 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
696 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
697 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
698 |
|
699 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
700 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
701 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
702 } |
|
703 |
|
704 void CCaeTestVideoStates::TestRecordRecordL() |
|
705 { |
|
706 // ID: CAE.STATECHANGE.RECORDRECORD.004 |
|
707 // |
|
708 // Group: Record. |
|
709 // |
|
710 // Action : Record video two times successively |
|
711 // |
|
712 // Output : No leave. |
|
713 |
|
714 iStatesClient->SetTimeout( 2000000 ); |
|
715 |
|
716 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
717 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
718 |
|
719 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordRecord ); |
|
720 |
|
721 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
722 |
|
723 // This should equal 2 because before 2nd recording we change the file name |
|
724 // and it needs preparation. |
|
725 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
726 |
|
727 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
728 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
729 assertL( iStatesClient->CountVideoRecordingComplete() == 2 ); |
|
730 } |
|
731 |
|
732 |
|
733 void CCaeTestVideoStates::TestRecordCaptureComplexSequence1L() |
|
734 { |
|
735 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.005 |
|
736 // |
|
737 // Group: Record. |
|
738 // |
|
739 // Action : Record and capture multiple times successively |
|
740 // |
|
741 // Output : No leave. |
|
742 |
|
743 iStatesClient->SetTimeout( 15000000 ); |
|
744 |
|
745 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
746 |
|
747 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
748 |
|
749 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
750 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
751 |
|
752 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence1 ); |
|
753 |
|
754 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
755 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
756 assertL( iStatesClient->CountVideoPrepareComplete() == 7 ); |
|
757 assertL( iStatesClient->CountVideoRecordingOn() == 7 ); |
|
758 assertL( iStatesClient->CountVideoRecordingComplete() == 7 ); |
|
759 assertL( iStatesClient->CountSnapImageReady() == 2 ); |
|
760 assertL( iStatesClient->CountStillImageReady() == 2 ); |
|
761 } |
|
762 |
|
763 |
|
764 void CCaeTestVideoStates::TestRecordCaptureComplexSequence2L() |
|
765 { |
|
766 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.006 |
|
767 // |
|
768 // Group: Record. |
|
769 // |
|
770 // Action : Record and capture multiple times successively. Contains also still bursts! |
|
771 // |
|
772 // Output : No leave. |
|
773 |
|
774 const TInt KStillBurstLength = 3; |
|
775 |
|
776 iStatesClient->SetSnapFileName( _L("cae_complex2.mbm") ); |
|
777 |
|
778 iStatesClient->SetStillFileName( _L("cae_complex2.jpg") ); |
|
779 |
|
780 iStatesClient->SetStillBurstLength( KStillBurstLength ); |
|
781 |
|
782 iStatesClient->SetTimeout( 15000000 ); |
|
783 |
|
784 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
785 |
|
786 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
787 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
788 |
|
789 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
790 |
|
791 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence2 ); |
|
792 |
|
793 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
794 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
795 assertL( iStatesClient->CountVideoPrepareComplete() == 4 /*3*/ ); |
|
796 assertL( iStatesClient->CountVideoRecordingOn() == 4 ); |
|
797 assertL( iStatesClient->CountVideoRecordingComplete() == 4 ); |
|
798 assertL( iStatesClient->CountSnapImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
799 assertL( iStatesClient->CountStillImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
800 |
|
801 assertL( iStatesClient->CountStillBurstCaptureMoment() == ( 2 * KStillBurstLength ) ); |
|
802 assertL( iStatesClient->CountStillBurstComplete() == 2 ); |
|
803 } |
|
804 |
|
805 |
|
806 void CCaeTestVideoStates::TestReleaseReserveRecordL() |
|
807 { |
|
808 // ID: CAE.GEN.RELESEANDRESERVE.006 |
|
809 // |
|
810 // General |
|
811 // |
|
812 // Action : Try to re-reserve the camera module after initial reservation |
|
813 // and releasing. Then capture still image. |
|
814 // |
|
815 // Output : OK. |
|
816 |
|
817 iStatesClient->SetTimeout( 3000000 ); |
|
818 |
|
819 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
820 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
821 |
|
822 iStatesClient->SetVideoFileName( _L("cae_relres_ql_2.3gp") ); |
|
823 |
|
824 iStatesClient->RunTestActionL( CCaeTestStatesClient::EReleaseReserveRecord ); |
|
825 |
|
826 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
827 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
828 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
829 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
830 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
831 } |
|
832 |
|
833 |
|
834 /********************************************************/ |
|
835 /* "DESTROY ENGINE"-TESTS */ |
|
836 /********************************************************/ |
|
837 |
|
838 |
|
839 void CCaeTestVideoStates::TestDestroy1L() |
|
840 { |
|
841 // ID: CAE.VR.DESTROY.001 |
|
842 // |
|
843 // Group: Record |
|
844 // |
|
845 // Action : Test to destroy the engine when video is prepared. |
|
846 // |
|
847 // Output : OK. |
|
848 |
|
849 iStatesClient->SetTimeout( 10000000 ); |
|
850 |
|
851 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
852 |
|
853 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
854 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
855 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
856 iStatesClient->SetVideoAudio( EFalse ); |
|
857 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
858 |
|
859 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
860 |
|
861 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoPrepareReady ); |
|
862 |
|
863 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
864 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
865 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
866 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
867 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
868 } |
|
869 |
|
870 |
|
871 void CCaeTestVideoStates::TestDestroy2L() |
|
872 { |
|
873 // ID: CAE.VR.DESTROY.002 |
|
874 // |
|
875 // Group: Record |
|
876 // |
|
877 // Action : Test to destroy the engine when video recording is on. |
|
878 // |
|
879 // Output : OK. |
|
880 |
|
881 iStatesClient->SetTimeout( 10000000 ); |
|
882 |
|
883 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
884 |
|
885 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
886 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
887 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
888 iStatesClient->SetVideoAudio( EFalse ); |
|
889 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
890 |
|
891 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
892 |
|
893 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingOn ); |
|
894 |
|
895 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
896 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
897 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
898 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
899 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
900 } |
|
901 |
|
902 |
|
903 void CCaeTestVideoStates::TestDestroy3L() |
|
904 { |
|
905 // ID: CAE.VR.DESTROY.003 |
|
906 // |
|
907 // Group: Record |
|
908 // |
|
909 // Action : Test to destroy the engine when video recording is paused. |
|
910 // |
|
911 // Output : OK. |
|
912 |
|
913 iStatesClient->SetTimeout( 10000000 ); |
|
914 |
|
915 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
916 |
|
917 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
918 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
919 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
920 iStatesClient->SetVideoAudio( EFalse ); |
|
921 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
922 |
|
923 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
924 |
|
925 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingPaused ); |
|
926 |
|
927 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
928 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
929 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
930 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
931 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
932 } |
|
933 |
|
934 |
|
935 void CCaeTestVideoStates::TestDestroy4L() |
|
936 { |
|
937 // ID: CAE.VR.DESTROY.004 |
|
938 // |
|
939 // Group: Record |
|
940 // |
|
941 // Action : Test to destroy the engine when video recording is completed. |
|
942 // |
|
943 // Output : OK. |
|
944 |
|
945 iStatesClient->SetTimeout( 10000000 ); |
|
946 |
|
947 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
948 |
|
949 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
950 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
951 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
952 iStatesClient->SetVideoAudio( EFalse ); |
|
953 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
954 |
|
955 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
956 |
|
957 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingReady ); |
|
958 |
|
959 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
960 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
961 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
962 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
963 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
964 } |
|
965 |
|
966 |
|
967 /********************************************************/ |
|
968 /* ERROR SIMULATIONS */ |
|
969 /********************************************************/ |
|
970 |
|
971 void CCaeTestVideoStates::TestVideoRecorderOpenErrorL() |
|
972 { |
|
973 // ID: CAE.VR.ERRORS.001 |
|
974 // |
|
975 // Group: Errors. |
|
976 // |
|
977 // Action : Test error handling with video recorder opening. |
|
978 // |
|
979 // Output : Leave with code KErrAbort. |
|
980 |
|
981 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
982 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
983 |
|
984 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderOpenError ) ); |
|
985 assertL( error == KErrAbort ); |
|
986 |
|
987 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
988 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
989 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
990 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
991 } |
|
992 |
|
993 |
|
994 void CCaeTestVideoStates::TestVideoRecorderPrepareErrorL() |
|
995 { |
|
996 // ID: CAE.VR.ERRORS.002 |
|
997 // |
|
998 // Group: Errors. |
|
999 // |
|
1000 // Action : Test error handling with video recorder preparation. |
|
1001 // |
|
1002 // Output : Leave with code KErrAbort. |
|
1003 |
|
1004 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1005 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1006 |
|
1007 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderPrepareError ) ); |
|
1008 assertL( error == KErrAbort ); |
|
1009 |
|
1010 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1011 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1012 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1013 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1014 } |
|
1015 |
|
1016 |
|
1017 void CCaeTestVideoStates::TestVideoRecordingCompleteErrorL() |
|
1018 { |
|
1019 // ID: CAE.VR.ERRORS.003 |
|
1020 // |
|
1021 // Group: Errors. |
|
1022 // |
|
1023 // Action : Test error handling with video recording completion. |
|
1024 // |
|
1025 // Output : Leave with code KErrAbort. |
|
1026 |
|
1027 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1028 |
|
1029 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecordingCompleteError ) ); |
|
1030 assertL( error == KErrAbort ); |
|
1031 |
|
1032 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1033 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1034 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1035 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1036 } |
|
1037 |
|
1038 |
|
1039 void CCaeTestVideoStates::TestPrepareVideoSettingsErrorL() |
|
1040 { |
|
1041 // ID: CAE.VR.ERRORS.004 |
|
1042 // |
|
1043 // Group: Errors. |
|
1044 // |
|
1045 // Action : Test error handling with video recorder settings preparation. |
|
1046 // |
|
1047 // Output : Leave with code KErrAbort. |
|
1048 |
|
1049 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1050 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1051 |
|
1052 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoSettingsError ) ); |
|
1053 assertL( error == KErrAbort ); |
|
1054 |
|
1055 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1056 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1057 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1058 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1059 } |
|
1060 |
|
1061 /********************************************************/ |
|
1062 /* PREPARE AUDIO BIT RATE AND RECORD VIDEO */ |
|
1063 /********************************************************/ |
|
1064 |
|
1065 void CCaeTestVideoStates::TestPrepareAudioBitRateVR0L() |
|
1066 { |
|
1067 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.002 |
|
1068 // |
|
1069 // Group: Record |
|
1070 // |
|
1071 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1072 // |
|
1073 // Output : OK. |
|
1074 |
|
1075 iStatesClient->SetTimeout( 4000000 ); |
|
1076 |
|
1077 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1078 |
|
1079 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1080 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1081 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1082 |
|
1083 iStatesClient->SetAudioBitRate( TInt( 0 ) ); |
|
1084 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1085 |
|
1086 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_0.3gp") ); |
|
1087 |
|
1088 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
1089 assertL( err == KErrArgument ); |
|
1090 |
|
1091 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1092 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1093 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1094 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1095 } |
|
1096 |
|
1097 void CCaeTestVideoStates::TestPrepareAudioBitRateVR5150L() |
|
1098 { |
|
1099 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.003 |
|
1100 // |
|
1101 // Group: Record |
|
1102 // |
|
1103 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1104 // |
|
1105 // Output : OK. |
|
1106 |
|
1107 iStatesClient->SetTimeout( 4000000 ); |
|
1108 |
|
1109 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1110 |
|
1111 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1112 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1113 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1114 |
|
1115 iStatesClient->SetAudioBitRate( TInt( 5150 ) ); |
|
1116 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1117 |
|
1118 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_5150.3gp") ); |
|
1119 |
|
1120 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
1121 |
|
1122 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1123 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1124 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1125 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1126 } |
|
1127 |
|
1128 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200L() |
|
1129 { |
|
1130 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.004 |
|
1131 // |
|
1132 // Group: Record |
|
1133 // |
|
1134 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1135 // |
|
1136 // Output : OK. |
|
1137 |
|
1138 iStatesClient->SetTimeout( 4000000 ); |
|
1139 |
|
1140 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1141 |
|
1142 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1143 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1144 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1145 |
|
1146 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
1147 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1148 |
|
1149 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200.3gp") ); |
|
1150 |
|
1151 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
1152 |
|
1153 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1154 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1155 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1156 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1157 } |
|
1158 |
|
1159 void CCaeTestVideoStates::TestPrepareAudioBitRateVR20000L() |
|
1160 { |
|
1161 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.005 |
|
1162 // |
|
1163 // Group: Record |
|
1164 // |
|
1165 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1166 // |
|
1167 // Output : OK. |
|
1168 |
|
1169 iStatesClient->SetTimeout( 4000000 ); |
|
1170 |
|
1171 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1172 |
|
1173 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1174 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1175 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1176 |
|
1177 iStatesClient->SetAudioBitRate( TInt( 20000 ) ); |
|
1178 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1179 |
|
1180 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_20000.3gp") ); |
|
1181 |
|
1182 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
1183 assertL( err == KErrArgument ); |
|
1184 |
|
1185 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1186 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1187 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1188 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1189 } |
|
1190 |
|
1191 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioType0L() |
|
1192 { |
|
1193 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.006 |
|
1194 // |
|
1195 // Group: Record |
|
1196 // |
|
1197 // Action : Test with special audio type 0 |
|
1198 // |
|
1199 // Output : OK. |
|
1200 |
|
1201 iStatesClient->SetTimeout( 4000000 ); |
|
1202 |
|
1203 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1204 |
|
1205 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1206 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1207 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1208 |
|
1209 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
1210 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1211 |
|
1212 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200AT0.3gp") ); |
|
1213 |
|
1214 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoAT0 ); |
|
1215 |
|
1216 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1217 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1218 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1219 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1220 } |
|
1221 |
|
1222 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioTypeInvL() |
|
1223 { |
|
1224 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.007 |
|
1225 // |
|
1226 // Group: Record |
|
1227 // |
|
1228 // Action : Test with special audio type |
|
1229 // |
|
1230 // Output : Leave |
|
1231 |
|
1232 iStatesClient->SetTimeout( 4000000 ); |
|
1233 |
|
1234 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1235 |
|
1236 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
1237 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1238 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
1239 |
|
1240 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
1241 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1242 |
|
1243 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200ATInv.3gp") ); |
|
1244 |
|
1245 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoATInv ) ); |
|
1246 assertL( err == KErrArgument ); |
|
1247 |
|
1248 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1249 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
1250 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1251 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1252 } |
|
1253 |
|
1254 /********************************************************/ |
|
1255 /* MISC tests */ |
|
1256 /********************************************************/ |
|
1257 void CCaeTestVideoStates::TestInitVideoRecorderWithUidL() |
|
1258 { |
|
1259 // ID: CAE.GEN.INITVIDEORECORDERL.002 |
|
1260 // |
|
1261 // General |
|
1262 // |
|
1263 // Action : Test Call InitVideoRecorderL() when initialization is done with Uid. |
|
1264 // |
|
1265 // Output : Leave, Uid init is not supported. |
|
1266 |
|
1267 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1268 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EInitVideoRecorderWithUid )); |
|
1269 assertL( err == KErrNotSupported ); |
|
1270 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1271 } |
|
1272 |
|
1273 /********************************************************/ |
|
1274 /* AMR audio tests (set 1 ) */ |
|
1275 /********************************************************/ |
|
1276 /********************************************************/ |
|
1277 /* VIDEO RECORDING PREPARE AND RECORD QUALITY LEVEL */ |
|
1278 /********************************************************/ |
|
1279 |
|
1280 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel0QL() |
|
1281 { |
|
1282 // ID: CAE.VR.VIDEORECORDING.QCIF64000FR15.Q.004 |
|
1283 // |
|
1284 // Group: Record. |
|
1285 // |
|
1286 // Action : Test to prepare video recording and record quality level 0 |
|
1287 // video clip when initialization is done. |
|
1288 // |
|
1289 // Output : No leave. File cae_novf_ql_0.3gp. |
|
1290 |
|
1291 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1292 |
|
1293 iStatesClient->SetTimeout( 5000000 ); |
|
1294 |
|
1295 iStatesClient->SetVideoFileName( _L("cae_novf_ql_0Q.3gp") ); |
|
1296 |
|
1297 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1298 |
|
1299 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
1300 |
|
1301 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1302 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1303 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1304 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1305 } |
|
1306 |
|
1307 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel1QL() |
|
1308 { |
|
1309 // ID: CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.Q.005 |
|
1310 // |
|
1311 // Group: Record. |
|
1312 // |
|
1313 // Action : Test to prepare video recording and record quality level 1 |
|
1314 // video clip when initialization is done. |
|
1315 // |
|
1316 // Output : No leave. File cae_novf_ql_1.3gp. |
|
1317 |
|
1318 iStatesClient->SetVideoQualityLevelIndex( 1 ); |
|
1319 |
|
1320 iStatesClient->SetTimeout( 5000000 ); |
|
1321 |
|
1322 iStatesClient->SetVideoFileName( _L("cae_novf_ql_1Q.3gp") ); |
|
1323 |
|
1324 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1325 |
|
1326 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
1327 |
|
1328 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1329 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1330 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1331 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1332 } |
|
1333 |
|
1334 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel2QL() |
|
1335 { |
|
1336 // ID: CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.Q.006 |
|
1337 // |
|
1338 // Group: Record. |
|
1339 // |
|
1340 // Action : Test to prepare video recording and record quality level 2 |
|
1341 // video clip when initialization is done. |
|
1342 // |
|
1343 // Output : No leave. File cae_novf_ql_2.3gp. |
|
1344 |
|
1345 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
1346 |
|
1347 iStatesClient->SetTimeout( 5000000 ); |
|
1348 |
|
1349 iStatesClient->SetVideoFileName( _L("cae_novf_ql_2Q.3gp") ); |
|
1350 |
|
1351 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1352 |
|
1353 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
1354 |
|
1355 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1356 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1357 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1358 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1359 } |
|
1360 |
|
1361 |
|
1362 /********************************************************/ |
|
1363 /* VIDEO RECORDING SPECIAL PREPARE AND RECORD */ |
|
1364 /********************************************************/ |
|
1365 |
|
1366 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioNoVfQL() |
|
1367 { |
|
1368 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.003 |
|
1369 // |
|
1370 // Group: Record |
|
1371 // |
|
1372 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1373 // To ensure that starting and stopping video recording works. |
|
1374 // To ensure that recording QCIF sized video works. |
|
1375 // Video recording prepared for QCIF format. |
|
1376 // |
|
1377 // Output : OK. |
|
1378 |
|
1379 iStatesClient->SetTimeout( 20000000 ); |
|
1380 |
|
1381 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
1382 |
|
1383 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
1384 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1385 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
1386 iStatesClient->SetVideoAudio( EFalse ); |
|
1387 |
|
1388 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
1389 |
|
1390 iStatesClient->SetVideoFileName( _L("cae_qcif10fpsQ.3gp") ); |
|
1391 |
|
1392 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1393 |
|
1394 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
1395 |
|
1396 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1397 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1398 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1399 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1400 } |
|
1401 |
|
1402 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioNoVfQL() |
|
1403 { |
|
1404 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.004 |
|
1405 // |
|
1406 // Group: Record |
|
1407 // |
|
1408 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1409 // To ensure that starting and stopping video recording works. |
|
1410 // To ensure that recording QCIF sized video works. |
|
1411 // Video recording prepared for QCIF format. |
|
1412 // |
|
1413 // Output : OK. |
|
1414 |
|
1415 iStatesClient->SetTimeout( 20000000 ); |
|
1416 |
|
1417 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
1418 |
|
1419 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
1420 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1421 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
1422 iStatesClient->SetVideoAudio( ETrue ); |
|
1423 |
|
1424 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
1425 |
|
1426 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audioQ.3gp") ); |
|
1427 |
|
1428 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1429 |
|
1430 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
1431 |
|
1432 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1433 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1434 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1435 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1436 } |
|
1437 |
|
1438 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioWithVfQL() |
|
1439 { |
|
1440 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.005 |
|
1441 // |
|
1442 // Group: Record |
|
1443 // |
|
1444 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1445 // To ensure that starting and stopping video recording works. |
|
1446 // To ensure that recording QCIF sized video works. |
|
1447 // Video recording prepared for QCIF format. |
|
1448 // |
|
1449 // Output : OK. |
|
1450 |
|
1451 iStatesClient->SetTimeout( 20000000 ); |
|
1452 |
|
1453 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
1454 |
|
1455 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
1456 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1457 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
1458 iStatesClient->SetVideoAudio( EFalse ); |
|
1459 |
|
1460 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
1461 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
1462 |
|
1463 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_vfQ.3gp") ); |
|
1464 |
|
1465 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1466 |
|
1467 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
1468 |
|
1469 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1470 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1471 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1472 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1473 } |
|
1474 |
|
1475 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioWithVfQL() |
|
1476 { |
|
1477 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.006 |
|
1478 // |
|
1479 // Group: Record |
|
1480 // |
|
1481 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
1482 // To ensure that starting and stopping video recording works. |
|
1483 // To ensure that recording QCIF sized video works. |
|
1484 // Video recording prepared for QCIF format. |
|
1485 // |
|
1486 // Output : OK. |
|
1487 |
|
1488 iStatesClient->SetTimeout( 20000000 ); |
|
1489 |
|
1490 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
1491 |
|
1492 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
1493 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
1494 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
1495 iStatesClient->SetVideoAudio( ETrue ); |
|
1496 |
|
1497 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
1498 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
1499 |
|
1500 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audio_vfQ.3gp") ); |
|
1501 |
|
1502 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1503 |
|
1504 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
1505 |
|
1506 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1507 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1508 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1509 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1510 } |
|
1511 |
|
1512 /********************************************************/ |
|
1513 /* PAUSE VIDEO RECORDING */ |
|
1514 /********************************************************/ |
|
1515 |
|
1516 void CCaeTestVideoStates::TestRecordPauseStopQL() |
|
1517 { |
|
1518 // ID: CAE.VR.PAUSEVIDEORECORDING.Q.001 |
|
1519 // |
|
1520 // Group: Record. |
|
1521 // |
|
1522 // Action : Pause video clip recording.Video recordin prepared. |
|
1523 // |
|
1524 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
1525 |
|
1526 iStatesClient->SetTimeout( 3000000 ); |
|
1527 |
|
1528 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1529 |
|
1530 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1531 |
|
1532 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPauseStopVideo ); |
|
1533 |
|
1534 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1535 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1536 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
1537 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1538 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1539 } |
|
1540 |
|
1541 void CCaeTestVideoStates::TestPauseWhenPreparedQL() |
|
1542 { |
|
1543 // ID: CAE.VR.PAUSEVIDEORECORDING.Q.002 |
|
1544 // |
|
1545 // Group: Record. |
|
1546 // |
|
1547 // Action : Call Pause when video is prepared but video recordind is not started. |
|
1548 // |
|
1549 // Output : Leave.. |
|
1550 |
|
1551 iStatesClient->SetTimeout( 5000000 ); |
|
1552 |
|
1553 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1554 |
|
1555 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1556 |
|
1557 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPauseVideoWhenPrepared ) ); |
|
1558 assertL( err == KErrNotReady ); |
|
1559 |
|
1560 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1561 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1562 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
1563 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1564 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
1565 } |
|
1566 |
|
1567 void CCaeTestVideoStates::TestRecordPausePauseStopQL() |
|
1568 { |
|
1569 // ID: CAE.VR.PAUSEVIDEORECORDING.Q.003 |
|
1570 // |
|
1571 // Group: Record. |
|
1572 // |
|
1573 // Action : Pause video clip recording twice.Video recordin prepared. |
|
1574 // |
|
1575 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
1576 |
|
1577 iStatesClient->SetTimeout( 3000000 ); |
|
1578 |
|
1579 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1580 |
|
1581 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1582 |
|
1583 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPausePauseStopVideo ); |
|
1584 |
|
1585 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1586 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1587 assertL( iStatesClient->CountVideoRecordingPaused() == 2 ); |
|
1588 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1589 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1590 } |
|
1591 |
|
1592 /********************************************************/ |
|
1593 /* RESUME VIDEO RECORDING */ |
|
1594 /********************************************************/ |
|
1595 |
|
1596 void CCaeTestVideoStates::TestResumeWhenPreparedQL() |
|
1597 { |
|
1598 // ID: CAE.VR.RESUMEVIDEORECORDING.Q.002 |
|
1599 // |
|
1600 // Group: Record. |
|
1601 // |
|
1602 // Action : Resume video clip recording before pause. |
|
1603 // Video recording. |
|
1604 // |
|
1605 // Output : Leave. |
|
1606 |
|
1607 iStatesClient->SetTimeout( 3000000 ); |
|
1608 |
|
1609 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1610 |
|
1611 iStatesClient->SetVideoFileName( _L("cae_pause_resumeQ.3gp") ); |
|
1612 |
|
1613 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1614 |
|
1615 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenPrepared ) ); |
|
1616 assertL( err == KErrNotReady ); |
|
1617 |
|
1618 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1619 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1620 } |
|
1621 |
|
1622 void CCaeTestVideoStates::TestResumeWhenNotPausedQL() |
|
1623 { |
|
1624 // ID: CAE.VR.RESUMEVIDEORECORDING.Q.003 |
|
1625 // |
|
1626 // Group: Record. |
|
1627 // |
|
1628 // Action : Resume video clip recording before pause. |
|
1629 // Video recording. |
|
1630 // |
|
1631 // Output : Leave. |
|
1632 |
|
1633 iStatesClient->SetTimeout( 5000000 ); |
|
1634 |
|
1635 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1636 |
|
1637 iStatesClient->SetVideoFileName( _L("cae_pause_resumeQ.3gp") ); |
|
1638 |
|
1639 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1640 |
|
1641 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenNotPaused ) ); |
|
1642 assertL( err == KErrNotReady ); |
|
1643 |
|
1644 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1645 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1646 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
1647 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
1648 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1649 } |
|
1650 |
|
1651 /********************************************************/ |
|
1652 /* PREPARE VIDEO RECORDING */ |
|
1653 /********************************************************/ |
|
1654 |
|
1655 void CCaeTestVideoStates::TestPrepareVideoRecordingNeg1QL() |
|
1656 { |
|
1657 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q.005 |
|
1658 // |
|
1659 // Group: Record |
|
1660 // |
|
1661 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
1662 // Initialization is done. |
|
1663 // |
|
1664 // Output : Leave. |
|
1665 |
|
1666 iStatesClient->SetVideoQualityLevelIndex( -1 ); |
|
1667 |
|
1668 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_-1Q.3gp") ); |
|
1669 |
|
1670 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1671 |
|
1672 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
1673 assertL( error != KErrNone ); |
|
1674 |
|
1675 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1676 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
1677 } |
|
1678 |
|
1679 void CCaeTestVideoStates::TestPrepareVideoRecording3QL() |
|
1680 { |
|
1681 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q.006 |
|
1682 // |
|
1683 // Group: Record |
|
1684 // |
|
1685 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
1686 // Initialization is done. |
|
1687 // |
|
1688 // Output : Leave. |
|
1689 |
|
1690 iStatesClient->SetVideoQualityLevelIndex( 3 ); |
|
1691 |
|
1692 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_3Q.3gp") ); |
|
1693 |
|
1694 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1695 |
|
1696 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
1697 assertL( error != KErrNone ); |
|
1698 |
|
1699 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1700 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
1701 } |
|
1702 |
|
1703 void CCaeTestVideoStates::TestSpecPrepareVRUnsupportedFormatWhenVRInitializedQL() |
|
1704 { |
|
1705 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q.008 |
|
1706 // |
|
1707 // Group: Record. |
|
1708 // |
|
1709 // Action : Set video recording format to a format unsupported by MMF Camcorder plug-in |
|
1710 // and Camera API implementation. |
|
1711 // Video recorder initialization is done. |
|
1712 // |
|
1713 // Output : Leave. |
|
1714 |
|
1715 iStatesClient->SetTimeout( 3000000 ); |
|
1716 |
|
1717 TSize sizeTooBig( KImgWidthTooBig, KImgHeightTooBig ); |
|
1718 iStatesClient->SetVideoFrameSize( sizeTooBig ); |
|
1719 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
1720 iStatesClient->SetVideoBitRate( 50000 ); |
|
1721 iStatesClient->SetVideoAudio( ETrue ); |
|
1722 |
|
1723 //iStatesClient->SetVideoFileName( _L("cae_video_unsupported_formatQ.3gp") ); |
|
1724 |
|
1725 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1726 |
|
1727 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideo ) );//verified if is correct action |
|
1728 assertL( error != KErrNone ); |
|
1729 |
|
1730 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1731 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1732 } |
|
1733 |
|
1734 void CCaeTestVideoStates::TestSpecPrepareVRSupportedFormatWhenPreparedQL() |
|
1735 { |
|
1736 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q.009 |
|
1737 // |
|
1738 // Group: Record. |
|
1739 // |
|
1740 // Action : Set video recording format to a format supported by MMF Camcorder plug-in |
|
1741 // and Camera API implementation when video recording is prepared already. . |
|
1742 // |
|
1743 // Output : OK. |
|
1744 |
|
1745 iStatesClient->SetTimeout( 5000000 ); |
|
1746 |
|
1747 TSize sizeSubqcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
1748 iStatesClient->SetVideoFrameSize( sizeSubqcif ); |
|
1749 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
1750 iStatesClient->SetVideoBitRate( 50000 ); |
|
1751 iStatesClient->SetVideoAudio( ETrue ); |
|
1752 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
1753 |
|
1754 //iStatesClient->SetVideoFileName( _L("cae_video_format_preparedQ.3gp") ); |
|
1755 |
|
1756 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1757 |
|
1758 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideoWhenPrepared );//verified if is correct action |
|
1759 |
|
1760 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1761 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
1762 } |
|
1763 |
|
1764 /********************************************************/ |
|
1765 /* START VIDEO RECORDING */ |
|
1766 /********************************************************/ |
|
1767 |
|
1768 void CCaeTestVideoStates::TestStartVideoRecordingWhenVRInitializedQL() |
|
1769 { |
|
1770 // ID: CAE.VR.STARTVIDEORECORDING.Q.001 |
|
1771 // |
|
1772 // Group: Record |
|
1773 // |
|
1774 // Action : Start video clip recording. |
|
1775 // Initialization is done. |
|
1776 // |
|
1777 // Output : Leave. |
|
1778 |
|
1779 iStatesClient->SetTimeout( 3000000 ); |
|
1780 |
|
1781 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1782 |
|
1783 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1784 |
|
1785 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenInitialized ) );//we have to put correct action |
|
1786 assertL( error == KErrNotReady ); |
|
1787 |
|
1788 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1789 } |
|
1790 |
|
1791 void CCaeTestVideoStates::TestStartVideoRecordingWhenRecordingQL() |
|
1792 { |
|
1793 // ID: CAE.VR.STARTVIDEORECORDING.Q.002 |
|
1794 // |
|
1795 // Group: Record |
|
1796 // |
|
1797 // Action : Start video clip recording. |
|
1798 // Video recording on. |
|
1799 // |
|
1800 // Output : Leave. |
|
1801 |
|
1802 iStatesClient->SetTimeout( 3000000 ); |
|
1803 |
|
1804 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1805 |
|
1806 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1807 |
|
1808 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenRecording ) );//we have to put correct action |
|
1809 assertL( error == KErrNotReady ); |
|
1810 |
|
1811 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
1812 } |
|
1813 |
|
1814 /********************************************************/ |
|
1815 /* STOP VIDEO RECORDING */ |
|
1816 /********************************************************/ |
|
1817 |
|
1818 void CCaeTestVideoStates::TestStopVideoRecordingWhenVRInitializedQL() |
|
1819 { |
|
1820 // ID: CAE.VR.STOPVIDEORECORDING.Q.001 |
|
1821 // |
|
1822 // Group: Record |
|
1823 // |
|
1824 // Action : Stop video clip recording. |
|
1825 // Initialization is done. |
|
1826 // |
|
1827 // Output : Leave. |
|
1828 |
|
1829 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1830 |
|
1831 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenInitialized ) );//we have to put correct action |
|
1832 assertL( error == KErrNotReady ); |
|
1833 |
|
1834 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1835 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1836 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1837 } |
|
1838 |
|
1839 void CCaeTestVideoStates::TestStopVideoRecordingWhenPreparedQL() |
|
1840 { |
|
1841 // ID: CAE.VR.STOPVIDEORECORDING.Q.002 |
|
1842 // |
|
1843 // Group: Record |
|
1844 // |
|
1845 // Action : Stop video clip recording. |
|
1846 // Video recording prepared. |
|
1847 // |
|
1848 // Output : Leave. |
|
1849 |
|
1850 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1851 |
|
1852 //iStatesClient->SetVideoFileName( _L("cae_stop_vr_preparedQ.3gp") ); |
|
1853 |
|
1854 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1855 |
|
1856 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenPrepared ) );//we have to put correct action |
|
1857 assertL( error == KErrNotReady ); |
|
1858 |
|
1859 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1860 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1861 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
1862 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1863 } |
|
1864 |
|
1865 /********************************************************/ |
|
1866 /* STATE CHANGE */ |
|
1867 /********************************************************/ |
|
1868 |
|
1869 void CCaeTestVideoStates::TestCaptureRecordQL() |
|
1870 { |
|
1871 // ID: CAE.STATECHANGE.CAPTURERECORD.Q.002 |
|
1872 // |
|
1873 // Group: Capture & Record. |
|
1874 // |
|
1875 // Action : Capture photo first and then record video successively |
|
1876 // |
|
1877 // Output : No leave. |
|
1878 |
|
1879 iStatesClient->SetTimeout( 1000000 ); |
|
1880 |
|
1881 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1882 |
|
1883 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
1884 |
|
1885 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1886 |
|
1887 iStatesClient->RunTestActionL( CCaeTestStatesClient::ECaptureRecord ); |
|
1888 |
|
1889 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1890 |
|
1891 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
1892 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
1893 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
1894 |
|
1895 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1896 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
1897 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1898 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1899 } |
|
1900 |
|
1901 void CCaeTestVideoStates::TestRecordCaptureQL() |
|
1902 { |
|
1903 // ID: CAE.STATECHANGE.RECORDCAPTURE.Q.003 |
|
1904 // |
|
1905 // Group: Record & Capture. |
|
1906 // |
|
1907 // Action : Record video first and then capture photo successively |
|
1908 // |
|
1909 // Output : No leave. |
|
1910 |
|
1911 iStatesClient->SetTimeout( 1000000 ); |
|
1912 |
|
1913 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1914 |
|
1915 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
1916 |
|
1917 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1918 |
|
1919 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCapture ); |
|
1920 |
|
1921 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1922 |
|
1923 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
1924 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
1925 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
1926 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
1927 |
|
1928 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
1929 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
1930 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
1931 } |
|
1932 |
|
1933 void CCaeTestVideoStates::TestRecordRecordQL() |
|
1934 { |
|
1935 // ID: CAE.STATECHANGE.RECORDRECORD.Q.004 |
|
1936 // |
|
1937 // Group: Record. |
|
1938 // |
|
1939 // Action : Record video two times successively |
|
1940 // |
|
1941 // Output : No leave. |
|
1942 |
|
1943 iStatesClient->SetTimeout( 2000000 ); |
|
1944 |
|
1945 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1946 |
|
1947 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1948 |
|
1949 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordRecord ); |
|
1950 |
|
1951 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
1952 |
|
1953 // This should equal 2 because before 2nd recording we change the file name |
|
1954 // and it needs preparation. |
|
1955 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
1956 |
|
1957 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
1958 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
1959 assertL( iStatesClient->CountVideoRecordingComplete() == 2 ); |
|
1960 } |
|
1961 |
|
1962 |
|
1963 void CCaeTestVideoStates::TestRecordCaptureComplexSequence1QL() |
|
1964 { |
|
1965 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.Q.005 |
|
1966 // |
|
1967 // Group: Record. |
|
1968 // |
|
1969 // Action : Record and capture multiple times successively |
|
1970 // |
|
1971 // Output : No leave. |
|
1972 |
|
1973 iStatesClient->SetTimeout( 15000000 ); |
|
1974 |
|
1975 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
1976 |
|
1977 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
1978 |
|
1979 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
1980 |
|
1981 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
1982 |
|
1983 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence1 ); |
|
1984 |
|
1985 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
1986 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
1987 assertL( iStatesClient->CountVideoPrepareComplete() == 7 ); |
|
1988 assertL( iStatesClient->CountVideoRecordingOn() == 7 ); |
|
1989 assertL( iStatesClient->CountVideoRecordingComplete() == 7 ); |
|
1990 assertL( iStatesClient->CountSnapImageReady() == 2 ); |
|
1991 assertL( iStatesClient->CountStillImageReady() == 2 ); |
|
1992 } |
|
1993 |
|
1994 |
|
1995 void CCaeTestVideoStates::TestRecordCaptureComplexSequence2QL() |
|
1996 { |
|
1997 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.Q.006 |
|
1998 // |
|
1999 // Group: Record. |
|
2000 // |
|
2001 // Action : Record and capture multiple times successively. Contains also still bursts! |
|
2002 // |
|
2003 // Output : No leave. |
|
2004 |
|
2005 const TInt KStillBurstLength = 3; |
|
2006 |
|
2007 iStatesClient->SetSnapFileName( _L("cae_complex2Q.mbm") ); |
|
2008 |
|
2009 iStatesClient->SetStillFileName( _L("cae_complex2Q.jpg") ); |
|
2010 |
|
2011 iStatesClient->SetStillBurstLength( KStillBurstLength ); |
|
2012 |
|
2013 iStatesClient->SetTimeout( 15000000 ); |
|
2014 |
|
2015 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2016 |
|
2017 iStatesClient->SetStillQualityLevelIndex( 2 ); |
|
2018 |
|
2019 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
2020 |
|
2021 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2022 |
|
2023 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence2 ); |
|
2024 |
|
2025 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2026 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
2027 assertL( iStatesClient->CountVideoPrepareComplete() == 4 /*3*/ ); |
|
2028 assertL( iStatesClient->CountVideoRecordingOn() == 4 ); |
|
2029 assertL( iStatesClient->CountVideoRecordingComplete() == 4 ); |
|
2030 assertL( iStatesClient->CountSnapImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
2031 assertL( iStatesClient->CountStillImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
2032 |
|
2033 assertL( iStatesClient->CountStillBurstCaptureMoment() == ( 2 * KStillBurstLength ) ); |
|
2034 assertL( iStatesClient->CountStillBurstComplete() == 2 ); |
|
2035 } |
|
2036 |
|
2037 |
|
2038 void CCaeTestVideoStates::TestReleaseReserveRecordQL() |
|
2039 { |
|
2040 // ID: CAE.GEN.RELESEANDRESERVE.Q.006 |
|
2041 // |
|
2042 // General |
|
2043 // |
|
2044 // Action : Try to re-reserve the camera module after initial reservation |
|
2045 // and releasing. Then capture still image. |
|
2046 // |
|
2047 // Output : OK. |
|
2048 |
|
2049 iStatesClient->SetTimeout( 3000000 ); |
|
2050 |
|
2051 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
2052 |
|
2053 iStatesClient->SetVideoFileName( _L("cae_relres_ql_2Q.3gp") ); |
|
2054 |
|
2055 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2056 |
|
2057 iStatesClient->RunTestActionL( CCaeTestStatesClient::EReleaseReserveRecord ); |
|
2058 |
|
2059 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
2060 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2061 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
2062 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2063 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2064 } |
|
2065 |
|
2066 |
|
2067 /********************************************************/ |
|
2068 /* "DESTROY ENGINE"-TESTS */ |
|
2069 /********************************************************/ |
|
2070 |
|
2071 |
|
2072 void CCaeTestVideoStates::TestDestroy1QL() |
|
2073 { |
|
2074 // ID: CAE.VR.DESTROY.Q.001 |
|
2075 // |
|
2076 // Group: Record |
|
2077 // |
|
2078 // Action : Test to destroy the engine when video is prepared. |
|
2079 // |
|
2080 // Output : OK. |
|
2081 |
|
2082 iStatesClient->SetTimeout( 10000000 ); |
|
2083 |
|
2084 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2085 |
|
2086 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2087 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2088 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2089 iStatesClient->SetVideoAudio( EFalse ); |
|
2090 |
|
2091 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2092 |
|
2093 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2094 |
|
2095 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoPrepareReady ); |
|
2096 |
|
2097 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2098 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2099 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2100 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
2101 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2102 } |
|
2103 |
|
2104 |
|
2105 void CCaeTestVideoStates::TestDestroy2QL() |
|
2106 { |
|
2107 // ID: CAE.VR.DESTROY.Q.002 |
|
2108 // |
|
2109 // Group: Record |
|
2110 // |
|
2111 // Action : Test to destroy the engine when video recording is on. |
|
2112 // |
|
2113 // Output : OK. |
|
2114 |
|
2115 iStatesClient->SetTimeout( 10000000 ); |
|
2116 |
|
2117 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2118 |
|
2119 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2120 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2121 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2122 iStatesClient->SetVideoAudio( EFalse ); |
|
2123 |
|
2124 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2125 |
|
2126 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2127 |
|
2128 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingOn ); |
|
2129 |
|
2130 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2131 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2132 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2133 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
2134 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2135 } |
|
2136 |
|
2137 |
|
2138 void CCaeTestVideoStates::TestDestroy3QL() |
|
2139 { |
|
2140 // ID: CAE.VR.DESTROY.Q.003 |
|
2141 // |
|
2142 // Group: Record |
|
2143 // |
|
2144 // Action : Test to destroy the engine when video recording is paused. |
|
2145 // |
|
2146 // Output : OK. |
|
2147 |
|
2148 iStatesClient->SetTimeout( 10000000 ); |
|
2149 |
|
2150 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2151 |
|
2152 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2153 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2154 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2155 iStatesClient->SetVideoAudio( EFalse ); |
|
2156 |
|
2157 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2158 |
|
2159 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2160 |
|
2161 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingPaused ); |
|
2162 |
|
2163 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2164 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2165 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2166 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
2167 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2168 } |
|
2169 |
|
2170 |
|
2171 void CCaeTestVideoStates::TestDestroy4QL() |
|
2172 { |
|
2173 // ID: CAE.VR.DESTROY.Q.004 |
|
2174 // |
|
2175 // Group: Record |
|
2176 // |
|
2177 // Action : Test to destroy the engine when video recording is completed. |
|
2178 // |
|
2179 // Output : OK. |
|
2180 |
|
2181 iStatesClient->SetTimeout( 10000000 ); |
|
2182 |
|
2183 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2184 |
|
2185 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2186 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2187 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2188 iStatesClient->SetVideoAudio( EFalse ); |
|
2189 |
|
2190 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2191 |
|
2192 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2193 |
|
2194 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingReady ); |
|
2195 |
|
2196 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2197 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2198 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2199 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
2200 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2201 } |
|
2202 |
|
2203 |
|
2204 /********************************************************/ |
|
2205 /* ERROR SIMULATIONS */ |
|
2206 /********************************************************/ |
|
2207 |
|
2208 void CCaeTestVideoStates::TestVideoRecorderOpenErrorQL() |
|
2209 { |
|
2210 // ID: CAE.VR.ERRORS.Q.001 |
|
2211 // |
|
2212 // Group: Errors. |
|
2213 // |
|
2214 // Action : Test error handling with video recorder opening. |
|
2215 // |
|
2216 // Output : Leave with code KErrAbort. |
|
2217 |
|
2218 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2219 |
|
2220 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2221 |
|
2222 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderOpenError ) ); |
|
2223 assertL( error == KErrAbort ); |
|
2224 |
|
2225 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2226 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2227 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2228 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2229 } |
|
2230 |
|
2231 |
|
2232 void CCaeTestVideoStates::TestVideoRecorderPrepareErrorQL() |
|
2233 { |
|
2234 // ID: CAE.VR.ERRORS.Q.002 |
|
2235 // |
|
2236 // Group: Errors. |
|
2237 // |
|
2238 // Action : Test error handling with video recorder preparation. |
|
2239 // |
|
2240 // Output : Leave with code KErrAbort. |
|
2241 |
|
2242 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2243 |
|
2244 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2245 |
|
2246 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderPrepareError ) ); |
|
2247 assertL( error == KErrAbort ); |
|
2248 |
|
2249 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2250 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2251 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2252 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2253 } |
|
2254 |
|
2255 |
|
2256 void CCaeTestVideoStates::TestVideoRecordingCompleteErrorQL() |
|
2257 { |
|
2258 // ID: CAE.VR.ERRORS.Q.003 |
|
2259 // |
|
2260 // Group: Errors. |
|
2261 // |
|
2262 // Action : Test error handling with video recording completion. |
|
2263 // |
|
2264 // Output : Leave with code KErrAbort. |
|
2265 |
|
2266 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2267 |
|
2268 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2269 |
|
2270 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecordingCompleteError ) ); |
|
2271 assertL( error == KErrAbort ); |
|
2272 |
|
2273 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2274 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2275 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2276 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2277 } |
|
2278 |
|
2279 |
|
2280 void CCaeTestVideoStates::TestPrepareVideoSettingsErrorQL() |
|
2281 { |
|
2282 // ID: CAE.VR.ERRORS.Q.004 |
|
2283 // |
|
2284 // Group: Errors. |
|
2285 // |
|
2286 // Action : Test error handling with video recorder settings preparation. |
|
2287 // |
|
2288 // Output : Leave with code KErrAbort. |
|
2289 |
|
2290 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2291 |
|
2292 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2293 |
|
2294 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoSettingsError ) ); |
|
2295 assertL( error == KErrAbort ); |
|
2296 |
|
2297 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2298 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2299 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2300 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2301 } |
|
2302 |
|
2303 /********************************************************/ |
|
2304 /* PREPARE AUDIO BIT RATE AND RECORD VIDEO */ |
|
2305 /********************************************************/ |
|
2306 |
|
2307 void CCaeTestVideoStates::TestPrepareAudioBitRateVR0QL() |
|
2308 { |
|
2309 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.002 |
|
2310 // |
|
2311 // Group: Record |
|
2312 // |
|
2313 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2314 // |
|
2315 // Output : OK. |
|
2316 |
|
2317 iStatesClient->SetTimeout( 4000000 ); |
|
2318 |
|
2319 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2320 |
|
2321 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2322 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2323 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2324 |
|
2325 iStatesClient->SetAudioBitRate( TInt( 0 ) ); |
|
2326 |
|
2327 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_0Q.3gp") ); |
|
2328 |
|
2329 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2330 |
|
2331 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
2332 assertL( err == KErrArgument ); |
|
2333 |
|
2334 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2335 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2336 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2337 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2338 } |
|
2339 |
|
2340 void CCaeTestVideoStates::TestPrepareAudioBitRateVR5150QL() |
|
2341 { |
|
2342 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.003 |
|
2343 // |
|
2344 // Group: Record |
|
2345 // |
|
2346 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2347 // |
|
2348 // Output : OK. |
|
2349 |
|
2350 iStatesClient->SetTimeout( 4000000 ); |
|
2351 |
|
2352 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2353 |
|
2354 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2355 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2356 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2357 |
|
2358 iStatesClient->SetAudioBitRate( TInt( 5150 ) ); |
|
2359 |
|
2360 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_5150Q.3gp") ); |
|
2361 |
|
2362 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2363 |
|
2364 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
2365 |
|
2366 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2367 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2368 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2369 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2370 } |
|
2371 |
|
2372 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200QL() |
|
2373 { |
|
2374 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.004 |
|
2375 // |
|
2376 // Group: Record |
|
2377 // |
|
2378 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2379 // |
|
2380 // Output : OK. |
|
2381 |
|
2382 iStatesClient->SetTimeout( 4000000 ); |
|
2383 |
|
2384 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2385 |
|
2386 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2387 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2388 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2389 |
|
2390 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
2391 |
|
2392 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200Q.3gp") ); |
|
2393 |
|
2394 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2395 |
|
2396 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
2397 |
|
2398 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2399 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2400 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2401 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2402 } |
|
2403 |
|
2404 void CCaeTestVideoStates::TestPrepareAudioBitRateVR20000QL() |
|
2405 { |
|
2406 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.005 |
|
2407 // |
|
2408 // Group: Record |
|
2409 // |
|
2410 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2411 // |
|
2412 // Output : OK. |
|
2413 |
|
2414 iStatesClient->SetTimeout( 4000000 ); |
|
2415 |
|
2416 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2417 |
|
2418 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2419 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2420 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2421 |
|
2422 iStatesClient->SetAudioBitRate( TInt( 20000 ) ); |
|
2423 |
|
2424 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_20000Q.3gp") ); |
|
2425 |
|
2426 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2427 |
|
2428 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
2429 assertL( err == KErrArgument ); |
|
2430 |
|
2431 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2432 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2433 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2434 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2435 } |
|
2436 |
|
2437 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioType0QL() |
|
2438 { |
|
2439 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.006 |
|
2440 // |
|
2441 // Group: Record |
|
2442 // |
|
2443 // Action : Test with special audio type 0 |
|
2444 // |
|
2445 // Output : OK. |
|
2446 |
|
2447 iStatesClient->SetTimeout( 4000000 ); |
|
2448 |
|
2449 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2450 |
|
2451 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2452 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2453 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2454 |
|
2455 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
2456 |
|
2457 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200AT0Q.3gp") ); |
|
2458 |
|
2459 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2460 |
|
2461 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoAT0 ); |
|
2462 |
|
2463 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2464 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2465 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2466 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2467 } |
|
2468 |
|
2469 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioTypeInvQL() |
|
2470 { |
|
2471 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.007 |
|
2472 // |
|
2473 // Group: Record |
|
2474 // |
|
2475 // Action : Test with special audio type |
|
2476 // |
|
2477 // Output : Leave |
|
2478 |
|
2479 iStatesClient->SetTimeout( 4000000 ); |
|
2480 |
|
2481 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
2482 |
|
2483 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
2484 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2485 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
2486 |
|
2487 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
2488 |
|
2489 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200ATInvQ.3gp") ); |
|
2490 |
|
2491 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2492 |
|
2493 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoATInv ) ); |
|
2494 assertL( err == KErrArgument ); |
|
2495 |
|
2496 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2497 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
2498 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2499 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2500 } |
|
2501 |
|
2502 /********************************************************/ |
|
2503 /* MISC tests */ |
|
2504 /********************************************************/ |
|
2505 void CCaeTestVideoStates::TestInitVideoRecorderWithUidQL() |
|
2506 { |
|
2507 // ID: CAE.GEN.INITVIDEORECORDERL.Q.002 |
|
2508 // |
|
2509 // General |
|
2510 // |
|
2511 // Action : Test Call InitVideoRecorderL() when initialization is done with Uid. |
|
2512 // |
|
2513 // Output : Leave, Uid init is not supported. |
|
2514 |
|
2515 iStatesClient->SetVideoCodecSet( 1 ); // 1: AMR audio, H.263 video |
|
2516 |
|
2517 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EInitVideoRecorderWithUid )); |
|
2518 assertL( err == KErrNotSupported ); |
|
2519 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2520 } |
|
2521 |
|
2522 |
|
2523 |
|
2524 |
|
2525 |
|
2526 /********************************************************/ |
|
2527 /* AAC audio tests (set 2 ) */ |
|
2528 /********************************************************/ |
|
2529 /********************************************************/ |
|
2530 /* VIDEO RECORDING PREPARE AND RECORD QUALITY LEVEL */ |
|
2531 /********************************************************/ |
|
2532 |
|
2533 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel0Q4L() |
|
2534 { |
|
2535 // ID: CAE.VR.VIDEORECORDING.QCIF64000FR15.Q4.004 |
|
2536 // |
|
2537 // Group: Record. |
|
2538 // |
|
2539 // Action : Test to prepare video recording and record quality level 0 |
|
2540 // video clip when initialization is done. |
|
2541 // |
|
2542 // Output : No leave. File cae_novf_ql_0.3gp. |
|
2543 |
|
2544 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2545 |
|
2546 iStatesClient->SetTimeout( 5000000 ); |
|
2547 |
|
2548 iStatesClient->SetVideoFileName( _L("cae_novf_ql_0Q4.3gp") ); |
|
2549 |
|
2550 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2551 |
|
2552 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
2553 |
|
2554 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2555 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2556 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2557 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2558 } |
|
2559 |
|
2560 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel1Q4L() |
|
2561 { |
|
2562 // ID: CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.Q4.005 |
|
2563 // |
|
2564 // Group: Record. |
|
2565 // |
|
2566 // Action : Test to prepare video recording and record quality level 1 |
|
2567 // video clip when initialization is done. |
|
2568 // |
|
2569 // Output : No leave. File cae_novf_ql_1.3gp. |
|
2570 |
|
2571 iStatesClient->SetVideoQualityLevelIndex( 1 ); |
|
2572 |
|
2573 iStatesClient->SetTimeout( 5000000 ); |
|
2574 |
|
2575 iStatesClient->SetVideoFileName( _L("cae_novf_ql_1Q4.3gp") ); |
|
2576 |
|
2577 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2578 |
|
2579 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
2580 |
|
2581 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2582 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2583 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2584 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2585 } |
|
2586 |
|
2587 void CCaeTestVideoStates::TestPrepareAndRecordQualityLevel2Q4L() |
|
2588 { |
|
2589 // ID: CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.Q4.006 |
|
2590 // |
|
2591 // Group: Record. |
|
2592 // |
|
2593 // Action : Test to prepare video recording and record quality level 2 |
|
2594 // video clip when initialization is done. |
|
2595 // |
|
2596 // Output : No leave. File cae_novf_ql_2.3gp. |
|
2597 |
|
2598 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
2599 |
|
2600 iStatesClient->SetTimeout( 5000000 ); |
|
2601 |
|
2602 iStatesClient->SetVideoFileName( _L("cae_novf_ql_2Q4.3gp") ); |
|
2603 |
|
2604 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2605 |
|
2606 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareAndRecordVideo ); |
|
2607 |
|
2608 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2609 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2610 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2611 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2612 } |
|
2613 |
|
2614 |
|
2615 /********************************************************/ |
|
2616 /* VIDEO RECORDING SPECIAL PREPARE AND RECORD */ |
|
2617 /********************************************************/ |
|
2618 |
|
2619 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioNoVfQ4L() |
|
2620 { |
|
2621 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.003 |
|
2622 // |
|
2623 // Group: Record |
|
2624 // |
|
2625 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2626 // To ensure that starting and stopping video recording works. |
|
2627 // To ensure that recording QCIF sized video works. |
|
2628 // Video recording prepared for QCIF format. |
|
2629 // |
|
2630 // Output : OK. |
|
2631 |
|
2632 iStatesClient->SetTimeout( 20000000 ); |
|
2633 |
|
2634 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2635 |
|
2636 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2637 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2638 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2639 iStatesClient->SetVideoAudio( EFalse ); |
|
2640 |
|
2641 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
2642 |
|
2643 iStatesClient->SetVideoFileName( _L("cae_qcif10fpsQ4.3gp") ); |
|
2644 |
|
2645 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2646 |
|
2647 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
2648 |
|
2649 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2650 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2651 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2652 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2653 } |
|
2654 |
|
2655 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioNoVfQ4L() |
|
2656 { |
|
2657 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.004 |
|
2658 // |
|
2659 // Group: Record |
|
2660 // |
|
2661 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2662 // To ensure that starting and stopping video recording works. |
|
2663 // To ensure that recording QCIF sized video works. |
|
2664 // Video recording prepared for QCIF format. |
|
2665 // |
|
2666 // Output : OK. |
|
2667 |
|
2668 iStatesClient->SetTimeout( 20000000 ); |
|
2669 |
|
2670 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2671 |
|
2672 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2673 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2674 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2675 iStatesClient->SetVideoAudio( ETrue ); |
|
2676 |
|
2677 iStatesClient->SetRunningWithViewFinder( EFalse ); |
|
2678 |
|
2679 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audioQ4.3gp") ); |
|
2680 |
|
2681 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2682 |
|
2683 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
2684 |
|
2685 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2686 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2687 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2688 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2689 } |
|
2690 |
|
2691 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10NoAudioWithVfQ4L() |
|
2692 { |
|
2693 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.005 |
|
2694 // |
|
2695 // Group: Record |
|
2696 // |
|
2697 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2698 // To ensure that starting and stopping video recording works. |
|
2699 // To ensure that recording QCIF sized video works. |
|
2700 // Video recording prepared for QCIF format. |
|
2701 // |
|
2702 // Output : OK. |
|
2703 |
|
2704 iStatesClient->SetTimeout( 20000000 ); |
|
2705 |
|
2706 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2707 |
|
2708 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2709 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2710 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2711 iStatesClient->SetVideoAudio( EFalse ); |
|
2712 |
|
2713 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
2714 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2715 |
|
2716 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_vfQ4.3gp") ); |
|
2717 |
|
2718 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2719 |
|
2720 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
2721 |
|
2722 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2723 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2724 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2725 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2726 } |
|
2727 |
|
2728 void CCaeTestVideoStates::TestVideoRecordingQcif60000Fr10WithAudioWithVfQ4L() |
|
2729 { |
|
2730 // ID: CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.006 |
|
2731 // |
|
2732 // Group: Record |
|
2733 // |
|
2734 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
2735 // To ensure that starting and stopping video recording works. |
|
2736 // To ensure that recording QCIF sized video works. |
|
2737 // Video recording prepared for QCIF format. |
|
2738 // |
|
2739 // Output : OK. |
|
2740 |
|
2741 iStatesClient->SetTimeout( 20000000 ); |
|
2742 |
|
2743 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
2744 |
|
2745 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
2746 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
2747 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
2748 iStatesClient->SetVideoAudio( ETrue ); |
|
2749 |
|
2750 iStatesClient->SetViewFinderSize( sizeQcif ); |
|
2751 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
2752 |
|
2753 iStatesClient->SetVideoFileName( _L("cae_qcif10fps_audio_vfQ4.3gp") ); |
|
2754 |
|
2755 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2756 |
|
2757 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAndRecordVideo ); |
|
2758 |
|
2759 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2760 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2761 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2762 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2763 } |
|
2764 |
|
2765 /********************************************************/ |
|
2766 /* PAUSE VIDEO RECORDING */ |
|
2767 /********************************************************/ |
|
2768 |
|
2769 void CCaeTestVideoStates::TestRecordPauseStopQ4L() |
|
2770 { |
|
2771 // ID: CAE.VR.PAUSEVIDEORECORDING.Q4.001 |
|
2772 // |
|
2773 // Group: Record. |
|
2774 // |
|
2775 // Action : Pause video clip recording.Video recordin prepared. |
|
2776 // |
|
2777 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
2778 |
|
2779 iStatesClient->SetTimeout( 3000000 ); |
|
2780 |
|
2781 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2782 |
|
2783 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2784 |
|
2785 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPauseStopVideo ); |
|
2786 |
|
2787 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2788 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2789 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
2790 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2791 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2792 } |
|
2793 |
|
2794 void CCaeTestVideoStates::TestPauseWhenPreparedQ4L() |
|
2795 { |
|
2796 // ID: CAE.VR.PAUSEVIDEORECORDING.Q4.002 |
|
2797 // |
|
2798 // Group: Record. |
|
2799 // |
|
2800 // Action : Call Pause when video is prepared but video recordind is not started. |
|
2801 // |
|
2802 // Output : Leave.. |
|
2803 |
|
2804 iStatesClient->SetTimeout( 5000000 ); |
|
2805 |
|
2806 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2807 |
|
2808 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2809 |
|
2810 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPauseVideoWhenPrepared ) ); |
|
2811 assertL( err == KErrNotReady ); |
|
2812 |
|
2813 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2814 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2815 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
2816 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
2817 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
2818 } |
|
2819 |
|
2820 void CCaeTestVideoStates::TestRecordPausePauseStopQ4L() |
|
2821 { |
|
2822 // ID: CAE.VR.PAUSEVIDEORECORDING.Q4.003 |
|
2823 // |
|
2824 // Group: Record. |
|
2825 // |
|
2826 // Action : Pause video clip recording twice.Video recordin prepared. |
|
2827 // |
|
2828 // Output : No leave. File KVideoFileName, "videoclip.3gp". |
|
2829 |
|
2830 iStatesClient->SetTimeout( 3000000 ); |
|
2831 |
|
2832 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2833 |
|
2834 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2835 |
|
2836 iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareRecordPausePauseStopVideo ); |
|
2837 |
|
2838 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2839 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2840 assertL( iStatesClient->CountVideoRecordingPaused() == 2 ); |
|
2841 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
2842 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2843 } |
|
2844 |
|
2845 /********************************************************/ |
|
2846 /* RESUME VIDEO RECORDING */ |
|
2847 /********************************************************/ |
|
2848 |
|
2849 void CCaeTestVideoStates::TestResumeWhenPreparedQ4L() |
|
2850 { |
|
2851 // ID: CAE.VR.RESUMEVIDEORECORDING.Q4.002 |
|
2852 // |
|
2853 // Group: Record. |
|
2854 // |
|
2855 // Action : Resume video clip recording before pause. |
|
2856 // Video recording. |
|
2857 // |
|
2858 // Output : Leave. |
|
2859 |
|
2860 iStatesClient->SetTimeout( 3000000 ); |
|
2861 |
|
2862 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2863 |
|
2864 iStatesClient->SetVideoFileName( _L("cae_pause_resumeQ4.3gp") ); |
|
2865 |
|
2866 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2867 |
|
2868 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenPrepared ) ); |
|
2869 assertL( err == KErrNotReady ); |
|
2870 |
|
2871 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2872 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2873 } |
|
2874 |
|
2875 void CCaeTestVideoStates::TestResumeWhenNotPausedQ4L() |
|
2876 { |
|
2877 // ID: CAE.VR.RESUMEVIDEORECORDING.Q4.003 |
|
2878 // |
|
2879 // Group: Record. |
|
2880 // |
|
2881 // Action : Resume video clip recording before pause. |
|
2882 // Video recording. |
|
2883 // |
|
2884 // Output : Leave. |
|
2885 |
|
2886 iStatesClient->SetTimeout( 5000000 ); |
|
2887 |
|
2888 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
2889 |
|
2890 iStatesClient->SetVideoFileName( _L("cae_pause_resumeQ4.3gp") ); |
|
2891 |
|
2892 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2893 |
|
2894 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EResumeVideoWhenNotPaused ) ); |
|
2895 assertL( err == KErrNotReady ); |
|
2896 |
|
2897 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2898 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2899 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
2900 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
2901 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
2902 } |
|
2903 |
|
2904 /********************************************************/ |
|
2905 /* PREPARE VIDEO RECORDING */ |
|
2906 /********************************************************/ |
|
2907 |
|
2908 void CCaeTestVideoStates::TestPrepareVideoRecordingNeg1Q4L() |
|
2909 { |
|
2910 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q4.005 |
|
2911 // |
|
2912 // Group: Record |
|
2913 // |
|
2914 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
2915 // Initialization is done. |
|
2916 // |
|
2917 // Output : Leave. |
|
2918 |
|
2919 iStatesClient->SetVideoQualityLevelIndex( -1 ); |
|
2920 |
|
2921 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_-1Q4.3gp") ); |
|
2922 |
|
2923 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2924 |
|
2925 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
2926 assertL( error != KErrNone ); |
|
2927 |
|
2928 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2929 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
2930 } |
|
2931 |
|
2932 void CCaeTestVideoStates::TestPrepareVideoRecording3Q4L() |
|
2933 { |
|
2934 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q4.006 |
|
2935 // |
|
2936 // Group: Record |
|
2937 // |
|
2938 // Action : Try to prepare the engine for video recording using invalid quality level index. |
|
2939 // Initialization is done. |
|
2940 // |
|
2941 // Output : Leave. |
|
2942 |
|
2943 iStatesClient->SetVideoQualityLevelIndex( 3 ); |
|
2944 |
|
2945 //iStatesClient->SetVideoFileName( _L("cae_prepare_vr_3Q4.3gp") ); |
|
2946 |
|
2947 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2948 |
|
2949 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoRecording ) ); |
|
2950 assertL( error != KErrNone ); |
|
2951 |
|
2952 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2953 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
2954 } |
|
2955 |
|
2956 void CCaeTestVideoStates::TestSpecPrepareVRUnsupportedFormatWhenVRInitializedQ4L() |
|
2957 { |
|
2958 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q4.008 |
|
2959 // |
|
2960 // Group: Record. |
|
2961 // |
|
2962 // Action : Set video recording format to a format unsupported by MMF Camcorder plug-in |
|
2963 // and Camera API implementation. |
|
2964 // Video recorder initialization is done. |
|
2965 // |
|
2966 // Output : Leave. |
|
2967 |
|
2968 iStatesClient->SetTimeout( 3000000 ); |
|
2969 |
|
2970 TSize sizeTooBig( KImgWidthTooBig, KImgHeightTooBig ); |
|
2971 iStatesClient->SetVideoFrameSize( sizeTooBig ); |
|
2972 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
2973 iStatesClient->SetVideoBitRate( 50000 ); |
|
2974 iStatesClient->SetVideoAudio( ETrue ); |
|
2975 |
|
2976 //iStatesClient->SetVideoFileName( _L("cae_video_unsupported_formatQ4.3gp") ); |
|
2977 |
|
2978 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
2979 |
|
2980 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideo ) );//verified if is correct action |
|
2981 assertL( error != KErrNone ); |
|
2982 |
|
2983 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
2984 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
2985 } |
|
2986 |
|
2987 void CCaeTestVideoStates::TestSpecPrepareVRSupportedFormatWhenPreparedQ4L() |
|
2988 { |
|
2989 // ID: CAE.VR.PREPAREVIDEORECORDINGL.Q4.009 |
|
2990 // |
|
2991 // Group: Record. |
|
2992 // |
|
2993 // Action : Set video recording format to a format supported by MMF Camcorder plug-in |
|
2994 // and Camera API implementation when video recording is prepared already. . |
|
2995 // |
|
2996 // Output : OK. |
|
2997 |
|
2998 iStatesClient->SetTimeout( 5000000 ); |
|
2999 |
|
3000 TSize sizeSubqcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3001 iStatesClient->SetVideoFrameSize( sizeSubqcif ); |
|
3002 iStatesClient->SetVideoFrameRate( 10.0 ); |
|
3003 iStatesClient->SetVideoBitRate( 50000 ); |
|
3004 iStatesClient->SetVideoAudio( ETrue ); |
|
3005 iStatesClient->SetVideoCodecSet( 0 ); // 0: AMR audio, H.263 video |
|
3006 |
|
3007 //iStatesClient->SetVideoFileName( _L("cae_video_format_preparedQ4.3gp") ); |
|
3008 |
|
3009 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3010 |
|
3011 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareVideoWhenPrepared );//verified if is correct action |
|
3012 |
|
3013 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3014 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
3015 } |
|
3016 |
|
3017 /********************************************************/ |
|
3018 /* START VIDEO RECORDING */ |
|
3019 /********************************************************/ |
|
3020 |
|
3021 void CCaeTestVideoStates::TestStartVideoRecordingWhenVRInitializedQ4L() |
|
3022 { |
|
3023 // ID: CAE.VR.STARTVIDEORECORDING.Q4.001 |
|
3024 // |
|
3025 // Group: Record |
|
3026 // |
|
3027 // Action : Start video clip recording. |
|
3028 // Initialization is done. |
|
3029 // |
|
3030 // Output : Leave. |
|
3031 |
|
3032 iStatesClient->SetTimeout( 3000000 ); |
|
3033 |
|
3034 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3035 |
|
3036 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3037 |
|
3038 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenInitialized ) );//we have to put correct action |
|
3039 assertL( error == KErrNotReady ); |
|
3040 |
|
3041 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3042 } |
|
3043 |
|
3044 void CCaeTestVideoStates::TestStartVideoRecordingWhenRecordingQ4L() |
|
3045 { |
|
3046 // ID: CAE.VR.STARTVIDEORECORDING.Q4.002 |
|
3047 // |
|
3048 // Group: Record |
|
3049 // |
|
3050 // Action : Start video clip recording. |
|
3051 // Video recording on. |
|
3052 // |
|
3053 // Output : Leave. |
|
3054 |
|
3055 iStatesClient->SetTimeout( 3000000 ); |
|
3056 |
|
3057 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3058 |
|
3059 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3060 |
|
3061 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStartVideoRecordingWhenRecording ) );//we have to put correct action |
|
3062 assertL( error == KErrNotReady ); |
|
3063 |
|
3064 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
3065 } |
|
3066 |
|
3067 /********************************************************/ |
|
3068 /* STOP VIDEO RECORDING */ |
|
3069 /********************************************************/ |
|
3070 |
|
3071 void CCaeTestVideoStates::TestStopVideoRecordingWhenVRInitializedQ4L() |
|
3072 { |
|
3073 // ID: CAE.VR.STOPVIDEORECORDING.Q4.001 |
|
3074 // |
|
3075 // Group: Record |
|
3076 // |
|
3077 // Action : Stop video clip recording. |
|
3078 // Initialization is done. |
|
3079 // |
|
3080 // Output : Leave. |
|
3081 |
|
3082 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3083 |
|
3084 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenInitialized ) );//we have to put correct action |
|
3085 assertL( error == KErrNotReady ); |
|
3086 |
|
3087 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3088 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3089 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3090 } |
|
3091 |
|
3092 void CCaeTestVideoStates::TestStopVideoRecordingWhenPreparedQ4L() |
|
3093 { |
|
3094 // ID: CAE.VR.STOPVIDEORECORDING.Q4.002 |
|
3095 // |
|
3096 // Group: Record |
|
3097 // |
|
3098 // Action : Stop video clip recording. |
|
3099 // Video recording prepared. |
|
3100 // |
|
3101 // Output : Leave. |
|
3102 |
|
3103 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3104 |
|
3105 //iStatesClient->SetVideoFileName( _L("cae_stop_vr_preparedQ4.3gp") ); |
|
3106 |
|
3107 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3108 |
|
3109 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EStopVideoRecordingWhenPrepared ) );//we have to put correct action |
|
3110 assertL( error == KErrNotReady ); |
|
3111 |
|
3112 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3113 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3114 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3115 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3116 } |
|
3117 |
|
3118 /********************************************************/ |
|
3119 /* STATE CHANGE */ |
|
3120 /********************************************************/ |
|
3121 |
|
3122 void CCaeTestVideoStates::TestCaptureRecordQ4L() |
|
3123 { |
|
3124 // ID: CAE.STATECHANGE.CAPTURERECORD.Q4.002 |
|
3125 // |
|
3126 // Group: Capture & Record. |
|
3127 // |
|
3128 // Action : Capture photo first and then record video successively |
|
3129 // |
|
3130 // Output : No leave. |
|
3131 |
|
3132 iStatesClient->SetTimeout( 1000000 ); |
|
3133 |
|
3134 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3135 |
|
3136 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
3137 |
|
3138 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3139 |
|
3140 iStatesClient->RunTestActionL( CCaeTestStatesClient::ECaptureRecord ); |
|
3141 |
|
3142 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3143 |
|
3144 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
3145 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
3146 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
3147 |
|
3148 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3149 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3150 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3151 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3152 } |
|
3153 |
|
3154 void CCaeTestVideoStates::TestRecordCaptureQ4L() |
|
3155 { |
|
3156 // ID: CAE.STATECHANGE.RECORDCAPTURE.Q4.003 |
|
3157 // |
|
3158 // Group: Record & Capture. |
|
3159 // |
|
3160 // Action : Record video first and then capture photo successively |
|
3161 // |
|
3162 // Output : No leave. |
|
3163 |
|
3164 iStatesClient->SetTimeout( 1000000 ); |
|
3165 |
|
3166 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3167 |
|
3168 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
3169 |
|
3170 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3171 |
|
3172 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCapture ); |
|
3173 |
|
3174 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3175 |
|
3176 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3177 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3178 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3179 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3180 |
|
3181 assertL( iStatesClient->CountStillPrepareComplete() == 1 ); |
|
3182 assertL( iStatesClient->CountSnapImageReady() == 1 ); |
|
3183 assertL( iStatesClient->CountStillImageReady() == 1 ); |
|
3184 } |
|
3185 |
|
3186 void CCaeTestVideoStates::TestRecordRecordQ4L() |
|
3187 { |
|
3188 // ID: CAE.STATECHANGE.RECORDRECORD.Q4.004 |
|
3189 // |
|
3190 // Group: Record. |
|
3191 // |
|
3192 // Action : Record video two times successively |
|
3193 // |
|
3194 // Output : No leave. |
|
3195 |
|
3196 iStatesClient->SetTimeout( 2000000 ); |
|
3197 |
|
3198 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3199 |
|
3200 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3201 |
|
3202 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordRecord ); |
|
3203 |
|
3204 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3205 |
|
3206 // This should equal 2 because before 2nd recording we change the file name |
|
3207 // and it needs preparation. |
|
3208 assertL( iStatesClient->CountVideoPrepareComplete() == 2 ); |
|
3209 |
|
3210 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3211 assertL( iStatesClient->CountVideoRecordingOn() == 2 ); |
|
3212 assertL( iStatesClient->CountVideoRecordingComplete() == 2 ); |
|
3213 } |
|
3214 |
|
3215 |
|
3216 void CCaeTestVideoStates::TestRecordCaptureComplexSequence1Q4L() |
|
3217 { |
|
3218 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.Q4.005 |
|
3219 // |
|
3220 // Group: Record. |
|
3221 // |
|
3222 // Action : Record and capture multiple times successively |
|
3223 // |
|
3224 // Output : No leave. |
|
3225 |
|
3226 iStatesClient->SetTimeout( 15000000 ); |
|
3227 |
|
3228 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3229 |
|
3230 iStatesClient->SetStillQualityLevelIndex( 0 ); |
|
3231 |
|
3232 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
3233 |
|
3234 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3235 |
|
3236 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence1 ); |
|
3237 |
|
3238 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
3239 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
3240 assertL( iStatesClient->CountVideoPrepareComplete() == 7 ); |
|
3241 assertL( iStatesClient->CountVideoRecordingOn() == 7 ); |
|
3242 assertL( iStatesClient->CountVideoRecordingComplete() == 7 ); |
|
3243 assertL( iStatesClient->CountSnapImageReady() == 2 ); |
|
3244 assertL( iStatesClient->CountStillImageReady() == 2 ); |
|
3245 } |
|
3246 |
|
3247 |
|
3248 void CCaeTestVideoStates::TestRecordCaptureComplexSequence2Q4L() |
|
3249 { |
|
3250 // ID: CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.Q4.006 |
|
3251 // |
|
3252 // Group: Record. |
|
3253 // |
|
3254 // Action : Record and capture multiple times successively. Contains also still bursts! |
|
3255 // |
|
3256 // Output : No leave. |
|
3257 |
|
3258 const TInt KStillBurstLength = 3; |
|
3259 |
|
3260 iStatesClient->SetSnapFileName( _L("cae_complex2Q4.mbm") ); |
|
3261 |
|
3262 iStatesClient->SetStillFileName( _L("cae_complex2Q4.jpg") ); |
|
3263 |
|
3264 iStatesClient->SetStillBurstLength( KStillBurstLength ); |
|
3265 |
|
3266 iStatesClient->SetTimeout( 15000000 ); |
|
3267 |
|
3268 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3269 |
|
3270 iStatesClient->SetStillQualityLevelIndex( 2 ); |
|
3271 |
|
3272 iStatesClient->SetVideoClipMaxSize( 10000 ); |
|
3273 |
|
3274 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3275 |
|
3276 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERecordCaptureComplexSequence2 ); |
|
3277 |
|
3278 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3279 assertL( iStatesClient->CountStillPrepareComplete() == 2 ); |
|
3280 assertL( iStatesClient->CountVideoPrepareComplete() == 4 /*3*/ ); |
|
3281 assertL( iStatesClient->CountVideoRecordingOn() == 4 ); |
|
3282 assertL( iStatesClient->CountVideoRecordingComplete() == 4 ); |
|
3283 assertL( iStatesClient->CountSnapImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
3284 assertL( iStatesClient->CountStillImageReady() == ( ( 2 * KStillBurstLength ) + 3 ) ); |
|
3285 |
|
3286 assertL( iStatesClient->CountStillBurstCaptureMoment() == ( 2 * KStillBurstLength ) ); |
|
3287 assertL( iStatesClient->CountStillBurstComplete() == 2 ); |
|
3288 } |
|
3289 |
|
3290 |
|
3291 void CCaeTestVideoStates::TestReleaseReserveRecordQ4L() |
|
3292 { |
|
3293 // ID: CAE.GEN.RELESEANDRESERVE.Q4.006 |
|
3294 // |
|
3295 // General |
|
3296 // |
|
3297 // Action : Try to re-reserve the camera module after initial reservation |
|
3298 // and releasing. Then capture still image. |
|
3299 // |
|
3300 // Output : OK. |
|
3301 |
|
3302 iStatesClient->SetTimeout( 3000000 ); |
|
3303 |
|
3304 iStatesClient->SetVideoQualityLevelIndex( 2 ); |
|
3305 |
|
3306 iStatesClient->SetVideoFileName( _L("cae_relres_ql_2Q4.3gp") ); |
|
3307 |
|
3308 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3309 |
|
3310 iStatesClient->RunTestActionL( CCaeTestStatesClient::EReleaseReserveRecord ); |
|
3311 |
|
3312 assertL( iStatesClient->CountInitComplete() == 2 ); |
|
3313 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3314 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3315 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3316 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3317 } |
|
3318 |
|
3319 |
|
3320 /********************************************************/ |
|
3321 /* "DESTROY ENGINE"-TESTS */ |
|
3322 /********************************************************/ |
|
3323 |
|
3324 |
|
3325 void CCaeTestVideoStates::TestDestroy1Q4L() |
|
3326 { |
|
3327 // ID: CAE.VR.DESTROY.Q4.001 |
|
3328 // |
|
3329 // Group: Record |
|
3330 // |
|
3331 // Action : Test to destroy the engine when video is prepared. |
|
3332 // |
|
3333 // Output : OK. |
|
3334 |
|
3335 iStatesClient->SetTimeout( 10000000 ); |
|
3336 |
|
3337 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
3338 |
|
3339 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
3340 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3341 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
3342 iStatesClient->SetVideoAudio( EFalse ); |
|
3343 |
|
3344 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
3345 |
|
3346 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3347 |
|
3348 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoPrepareReady ); |
|
3349 |
|
3350 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3351 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3352 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3353 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3354 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3355 } |
|
3356 |
|
3357 |
|
3358 void CCaeTestVideoStates::TestDestroy2Q4L() |
|
3359 { |
|
3360 // ID: CAE.VR.DESTROY.Q4.002 |
|
3361 // |
|
3362 // Group: Record |
|
3363 // |
|
3364 // Action : Test to destroy the engine when video recording is on. |
|
3365 // |
|
3366 // Output : OK. |
|
3367 |
|
3368 iStatesClient->SetTimeout( 10000000 ); |
|
3369 |
|
3370 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
3371 |
|
3372 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
3373 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3374 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
3375 iStatesClient->SetVideoAudio( EFalse ); |
|
3376 |
|
3377 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
3378 |
|
3379 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3380 |
|
3381 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingOn ); |
|
3382 |
|
3383 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3384 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3385 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3386 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3387 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3388 } |
|
3389 |
|
3390 |
|
3391 void CCaeTestVideoStates::TestDestroy3Q4L() |
|
3392 { |
|
3393 // ID: CAE.VR.DESTROY.Q4.003 |
|
3394 // |
|
3395 // Group: Record |
|
3396 // |
|
3397 // Action : Test to destroy the engine when video recording is paused. |
|
3398 // |
|
3399 // Output : OK. |
|
3400 |
|
3401 iStatesClient->SetTimeout( 10000000 ); |
|
3402 |
|
3403 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
3404 |
|
3405 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
3406 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3407 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
3408 iStatesClient->SetVideoAudio( EFalse ); |
|
3409 |
|
3410 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
3411 |
|
3412 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3413 |
|
3414 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingPaused ); |
|
3415 |
|
3416 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3417 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3418 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3419 assertL( iStatesClient->CountVideoRecordingPaused() == 1 ); |
|
3420 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3421 } |
|
3422 |
|
3423 |
|
3424 void CCaeTestVideoStates::TestDestroy4Q4L() |
|
3425 { |
|
3426 // ID: CAE.VR.DESTROY.Q4.004 |
|
3427 // |
|
3428 // Group: Record |
|
3429 // |
|
3430 // Action : Test to destroy the engine when video recording is completed. |
|
3431 // |
|
3432 // Output : OK. |
|
3433 |
|
3434 iStatesClient->SetTimeout( 10000000 ); |
|
3435 |
|
3436 TSize sizeQcif( KImgWidthQCIF, KImgHeightQCIF ); |
|
3437 |
|
3438 iStatesClient->SetVideoFrameSize( sizeQcif ); |
|
3439 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3440 iStatesClient->SetVideoBitRate( TInt( 60000 ) ); |
|
3441 iStatesClient->SetVideoAudio( EFalse ); |
|
3442 |
|
3443 iStatesClient->SetRunningWithViewFinder( ETrue ); |
|
3444 |
|
3445 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3446 |
|
3447 iStatesClient->RunTestActionL( CCaeTestStatesClient::EDestroyEngineWhenVideoRecordingReady ); |
|
3448 |
|
3449 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3450 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3451 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3452 assertL( iStatesClient->CountVideoRecordingPaused() == 0 ); |
|
3453 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3454 } |
|
3455 |
|
3456 |
|
3457 /********************************************************/ |
|
3458 /* ERROR SIMULATIONS */ |
|
3459 /********************************************************/ |
|
3460 |
|
3461 void CCaeTestVideoStates::TestVideoRecorderOpenErrorQ4L() |
|
3462 { |
|
3463 // ID: CAE.VR.ERRORS.Q4.001 |
|
3464 // |
|
3465 // Group: Errors. |
|
3466 // |
|
3467 // Action : Test error handling with video recorder opening. |
|
3468 // |
|
3469 // Output : Leave with code KErrAbort. |
|
3470 |
|
3471 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3472 |
|
3473 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3474 |
|
3475 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderOpenError ) ); |
|
3476 assertL( error == KErrAbort ); |
|
3477 |
|
3478 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3479 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3480 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3481 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3482 } |
|
3483 |
|
3484 |
|
3485 void CCaeTestVideoStates::TestVideoRecorderPrepareErrorQ4L() |
|
3486 { |
|
3487 // ID: CAE.VR.ERRORS.Q4.002 |
|
3488 // |
|
3489 // Group: Errors. |
|
3490 // |
|
3491 // Action : Test error handling with video recorder preparation. |
|
3492 // |
|
3493 // Output : Leave with code KErrAbort. |
|
3494 |
|
3495 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3496 |
|
3497 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3498 |
|
3499 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecorderPrepareError ) ); |
|
3500 assertL( error == KErrAbort ); |
|
3501 |
|
3502 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3503 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3504 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3505 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3506 } |
|
3507 |
|
3508 |
|
3509 void CCaeTestVideoStates::TestVideoRecordingCompleteErrorQ4L() |
|
3510 { |
|
3511 // ID: CAE.VR.ERRORS.Q4.003 |
|
3512 // |
|
3513 // Group: Errors. |
|
3514 // |
|
3515 // Action : Test error handling with video recording completion. |
|
3516 // |
|
3517 // Output : Leave with code KErrAbort. |
|
3518 |
|
3519 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3520 |
|
3521 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3522 |
|
3523 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EVideoRecordingCompleteError ) ); |
|
3524 assertL( error == KErrAbort ); |
|
3525 |
|
3526 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3527 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3528 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3529 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3530 } |
|
3531 |
|
3532 |
|
3533 void CCaeTestVideoStates::TestPrepareVideoSettingsErrorQ4L() |
|
3534 { |
|
3535 // ID: CAE.VR.ERRORS.Q4.004 |
|
3536 // |
|
3537 // Group: Errors. |
|
3538 // |
|
3539 // Action : Test error handling with video recorder settings preparation. |
|
3540 // |
|
3541 // Output : Leave with code KErrAbort. |
|
3542 |
|
3543 iStatesClient->SetVideoQualityLevelIndex( 0 ); |
|
3544 |
|
3545 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3546 |
|
3547 TRAPD( error, iStatesClient->RunTestActionL( CCaeTestStatesClient::EPrepareVideoSettingsError ) ); |
|
3548 assertL( error == KErrAbort ); |
|
3549 |
|
3550 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3551 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3552 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3553 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3554 } |
|
3555 |
|
3556 /********************************************************/ |
|
3557 /* PREPARE AUDIO BIT RATE AND RECORD VIDEO */ |
|
3558 /********************************************************/ |
|
3559 |
|
3560 void CCaeTestVideoStates::TestPrepareAudioBitRateVR0Q4L() |
|
3561 { |
|
3562 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.002 |
|
3563 // |
|
3564 // Group: Record |
|
3565 // |
|
3566 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
3567 // |
|
3568 // Output : OK. |
|
3569 |
|
3570 iStatesClient->SetTimeout( 4000000 ); |
|
3571 |
|
3572 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3573 |
|
3574 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3575 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3576 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3577 |
|
3578 iStatesClient->SetAudioBitRate( TInt( 0 ) ); |
|
3579 |
|
3580 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_0Q4.3gp") ); |
|
3581 |
|
3582 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3583 |
|
3584 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
3585 assertL( err == KErrArgument ); |
|
3586 |
|
3587 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3588 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3589 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3590 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3591 } |
|
3592 |
|
3593 void CCaeTestVideoStates::TestPrepareAudioBitRateVR5150Q4L() |
|
3594 { |
|
3595 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.003 |
|
3596 // |
|
3597 // Group: Record |
|
3598 // |
|
3599 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
3600 // |
|
3601 // Output : OK. |
|
3602 |
|
3603 iStatesClient->SetTimeout( 4000000 ); |
|
3604 |
|
3605 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3606 |
|
3607 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3608 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3609 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3610 |
|
3611 iStatesClient->SetAudioBitRate( TInt( 5150 ) ); |
|
3612 |
|
3613 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_5150Q4.3gp") ); |
|
3614 |
|
3615 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3616 |
|
3617 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
3618 |
|
3619 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3620 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3621 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3622 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3623 } |
|
3624 |
|
3625 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200Q4L() |
|
3626 { |
|
3627 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.004 |
|
3628 // |
|
3629 // Group: Record |
|
3630 // |
|
3631 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
3632 // |
|
3633 // Output : OK. |
|
3634 |
|
3635 iStatesClient->SetTimeout( 4000000 ); |
|
3636 |
|
3637 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3638 |
|
3639 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3640 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3641 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3642 |
|
3643 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
3644 |
|
3645 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200Q4.3gp") ); |
|
3646 |
|
3647 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3648 |
|
3649 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ); |
|
3650 |
|
3651 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3652 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3653 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3654 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3655 } |
|
3656 |
|
3657 void CCaeTestVideoStates::TestPrepareAudioBitRateVR20000Q4L() |
|
3658 { |
|
3659 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.005 |
|
3660 // |
|
3661 // Group: Record |
|
3662 // |
|
3663 // Action : To ensure that the implementation is compatible with camcorder plug-in. |
|
3664 // |
|
3665 // Output : OK. |
|
3666 |
|
3667 iStatesClient->SetTimeout( 4000000 ); |
|
3668 |
|
3669 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3670 |
|
3671 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3672 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3673 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3674 |
|
3675 iStatesClient->SetAudioBitRate( TInt( 20000 ) ); |
|
3676 |
|
3677 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_20000Q4.3gp") ); |
|
3678 |
|
3679 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3680 |
|
3681 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideo ) ); |
|
3682 assertL( err == KErrArgument ); |
|
3683 |
|
3684 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3685 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3686 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3687 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3688 } |
|
3689 |
|
3690 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioType0Q4L() |
|
3691 { |
|
3692 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.006 |
|
3693 // |
|
3694 // Group: Record |
|
3695 // |
|
3696 // Action : Test with special audio type 0 |
|
3697 // |
|
3698 // Output : OK. |
|
3699 |
|
3700 iStatesClient->SetTimeout( 4000000 ); |
|
3701 |
|
3702 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3703 |
|
3704 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3705 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3706 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3707 |
|
3708 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
3709 |
|
3710 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200AT0Q4.3gp") ); |
|
3711 |
|
3712 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3713 |
|
3714 iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoAT0 ); |
|
3715 |
|
3716 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3717 assertL( iStatesClient->CountVideoPrepareComplete() == 1 ); |
|
3718 assertL( iStatesClient->CountVideoRecordingOn() == 1 ); |
|
3719 assertL( iStatesClient->CountVideoRecordingComplete() == 1 ); |
|
3720 } |
|
3721 |
|
3722 void CCaeTestVideoStates::TestPrepareAudioBitRateVR12200AudioTypeInvQ4L() |
|
3723 { |
|
3724 // ID: CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.007 |
|
3725 // |
|
3726 // Group: Record |
|
3727 // |
|
3728 // Action : Test with special audio type |
|
3729 // |
|
3730 // Output : Leave |
|
3731 |
|
3732 iStatesClient->SetTimeout( 4000000 ); |
|
3733 |
|
3734 TSize sizeSubQcif( KImgWidthSubQCIF, KImgHeightSubQCIF ); |
|
3735 |
|
3736 iStatesClient->SetVideoFrameSize( sizeSubQcif ); |
|
3737 iStatesClient->SetVideoFrameRate( TReal32( 10.0 ) ); |
|
3738 iStatesClient->SetVideoBitRate( TInt( 25000 ) ); |
|
3739 |
|
3740 iStatesClient->SetAudioBitRate( TInt( 12200 ) ); |
|
3741 |
|
3742 iStatesClient->SetVideoFileName( _L("cae_subqcif_AudioBitRate_12200ATInvQ4.3gp") ); |
|
3743 |
|
3744 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3745 |
|
3746 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::ESpecifiedPrepareAudioBrAndRecordVideoATInv ) ); |
|
3747 assertL( err == KErrArgument ); |
|
3748 |
|
3749 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3750 assertL( iStatesClient->CountVideoPrepareComplete() == 0 ); |
|
3751 assertL( iStatesClient->CountVideoRecordingOn() == 0 ); |
|
3752 assertL( iStatesClient->CountVideoRecordingComplete() == 0 ); |
|
3753 } |
|
3754 |
|
3755 /********************************************************/ |
|
3756 /* MISC tests */ |
|
3757 /********************************************************/ |
|
3758 void CCaeTestVideoStates::TestInitVideoRecorderWithUidQ4L() |
|
3759 { |
|
3760 // ID: CAE.GEN.INITVIDEORECORDERL.Q4.002 |
|
3761 // |
|
3762 // General |
|
3763 // |
|
3764 // Action : Test Call InitVideoRecorderL() when initialization is done with Uid. |
|
3765 // |
|
3766 // Output : Leave, Uid init is not supported. |
|
3767 |
|
3768 iStatesClient->SetVideoCodecSet( 2 ); // 2: AAC audio, MPEG-4 video |
|
3769 |
|
3770 TRAPD( err, iStatesClient->RunTestActionL( CCaeTestStatesClient::EInitVideoRecorderWithUid )); |
|
3771 assertL( err == KErrNotSupported ); |
|
3772 assertL( iStatesClient->CountInitComplete() == 1 ); |
|
3773 } |
|
3774 |
|
3775 /********************************************************/ |
|
3776 /* REMAINING VIDEO RECORDING TIME */ |
|
3777 /********************************************************/ |
|
3778 |
|
3779 void CCaeTestVideoStates::TestRemainingTimeWhenVideoNotInitializedL() |
|
3780 { |
|
3781 // Group: Video. |
|
3782 // |
|
3783 // ID: CAE.VR.REMAININGVIDEORECORDINGTIME.002 |
|
3784 // |
|
3785 // Action : Get RemainingVideoRecordingTime, when video recording is not initialized. |
|
3786 // |
|
3787 // Output : No leave. |
|
3788 |
|
3789 iStatesClient->RunTestActionL( CCaeTestStatesClient::ERemainingTimeWhenVideoNotInitialized ); |
|
3790 } |
|
3791 // |
|
3792 // An own static function to collect the test functions into one |
|
3793 // suite of tests. The framework will run the tests and free the |
|
3794 // memory allocated for the test suite. |
|
3795 // |
|
3796 |
|
3797 |
|
3798 MTest* CCaeTestVideoStates::suiteL () |
|
3799 { |
|
3800 // Always use NewL (Do not use NewLC) !!! |
|
3801 CTestSuite *suite = CTestSuite::NewL( _L8("CCaeTestVideoStates") ); |
|
3802 |
|
3803 // AMR audio, H.263 video |
|
3804 #if (!MIRAGE_X_PROD3) |
|
3805 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.QCIF64000FR15.004"), &TestPrepareAndRecordQualityLevel0L ) ); |
|
3806 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.005"), &TestPrepareAndRecordQualityLevel1L ) ); |
|
3807 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.006"), &TestPrepareAndRecordQualityLevel2L ) ); |
|
3808 |
|
3809 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.003"), &TestVideoRecordingQcif60000Fr10NoAudioNoVfL ) ); |
|
3810 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.004"), &TestVideoRecordingQcif60000Fr10WithAudioNoVfL ) ); |
|
3811 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.005"), &TestVideoRecordingQcif60000Fr10NoAudioWithVfL ) ); |
|
3812 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.006"), &TestVideoRecordingQcif60000Fr10WithAudioWithVfL ) ); |
|
3813 |
|
3814 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.001"), &TestRecordPauseStopL ) ); |
|
3815 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.002"), &TestPauseWhenPreparedL ) ); |
|
3816 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.003"), &TestRecordPausePauseStopL ) ); |
|
3817 |
|
3818 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.002"), &TestResumeWhenPreparedL ) ); |
|
3819 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.003"), &TestResumeWhenNotPausedL ) ); |
|
3820 |
|
3821 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.005"), &TestPrepareVideoRecordingNeg1L ) ); |
|
3822 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.006"), &TestPrepareVideoRecording3L ) ); |
|
3823 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.008"), &TestSpecPrepareVRUnsupportedFormatWhenVRInitializedL ) ); |
|
3824 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.009"), &TestSpecPrepareVRSupportedFormatWhenPreparedL ) ); |
|
3825 |
|
3826 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.001"), &TestStartVideoRecordingWhenVRInitializedL ) ); |
|
3827 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.002"), &TestStartVideoRecordingWhenRecordingL ) ); |
|
3828 |
|
3829 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.001"), &TestStopVideoRecordingWhenVRInitializedL ) ); |
|
3830 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.002"), &TestStopVideoRecordingWhenPreparedL ) ); |
|
3831 |
|
3832 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.CAPTURERECORD.002"), &TestCaptureRecordL ) ); |
|
3833 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURE.003"), &TestRecordCaptureL ) ); |
|
3834 |
|
3835 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDRECORD.004"), &TestRecordRecordL ) ); |
|
3836 |
|
3837 // These "complex sequences" take quite long, probably a minute or more. |
|
3838 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.005"), &TestRecordCaptureComplexSequence1L ) ); |
|
3839 |
|
3840 #ifdef __CAMERA_BURST_MODE |
|
3841 // Only if Still BURST is supported (built in). |
|
3842 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.006"), &TestRecordCaptureComplexSequence2L ) ); |
|
3843 #endif |
|
3844 |
|
3845 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.RELESEANDRESERVE.006"), &TestReleaseReserveRecordL ) ); |
|
3846 |
|
3847 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.002"), &TestPrepareAudioBitRateVR0L ) ); |
|
3848 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.003"), &TestPrepareAudioBitRateVR5150L ) ); |
|
3849 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.004"), &TestPrepareAudioBitRateVR12200L ) ); |
|
3850 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.005"), &TestPrepareAudioBitRateVR20000L ) ); |
|
3851 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.006"), &TestPrepareAudioBitRateVR12200AudioType0L ) ); |
|
3852 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.007"), &TestPrepareAudioBitRateVR12200AudioTypeInvL ) ); |
|
3853 |
|
3854 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.001"), &TestDestroy1L ) ); |
|
3855 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.002"), &TestDestroy2L ) ); |
|
3856 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.003"), &TestDestroy3L ) ); |
|
3857 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.004"), &TestDestroy4L ) ); |
|
3858 |
|
3859 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.INITVIDEORECORDERL.002"), &TestInitVideoRecorderWithUidL ) ); |
|
3860 |
|
3861 #ifdef CAE_TEST_VERSION |
|
3862 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.001"), &TestVideoRecorderOpenErrorL ) ); |
|
3863 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.002"), &TestVideoRecorderPrepareErrorL ) ); |
|
3864 // suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.003"), &TestVideoRecordingCompleteErrorL ) ); |
|
3865 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.004"), &TestPrepareVideoSettingsErrorL ) ); |
|
3866 #endif |
|
3867 #endif //!MIRAGE_X_PROD3 |
|
3868 |
|
3869 // AMR audio, H.263 video |
|
3870 #if (MIRAGE_X_PROD3) |
|
3871 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.QCIF64000FR15.Q.004"), &TestPrepareAndRecordQualityLevel0QL ) ); |
|
3872 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.Q.005"), &TestPrepareAndRecordQualityLevel1QL ) ); |
|
3873 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.Q.006"), &TestPrepareAndRecordQualityLevel2QL ) ); |
|
3874 |
|
3875 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.003"), &TestVideoRecordingQcif60000Fr10NoAudioNoVfQL ) ); |
|
3876 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.004"), &TestVideoRecordingQcif60000Fr10WithAudioNoVfQL ) ); |
|
3877 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.005"), &TestVideoRecordingQcif60000Fr10NoAudioWithVfQL ) ); |
|
3878 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q.006"), &TestVideoRecordingQcif60000Fr10WithAudioWithVfQL ) ); |
|
3879 |
|
3880 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q.001"), &TestRecordPauseStopQL ) ); |
|
3881 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q.002"), &TestPauseWhenPreparedQL ) ); |
|
3882 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q.003"), &TestRecordPausePauseStopQL ) ); |
|
3883 |
|
3884 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.Q.002"), &TestResumeWhenPreparedQL ) ); |
|
3885 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.Q.003"), &TestResumeWhenNotPausedQL ) ); |
|
3886 |
|
3887 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q.005"), &TestPrepareVideoRecordingNeg1QL ) ); |
|
3888 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q.006"), &TestPrepareVideoRecording3QL ) ); |
|
3889 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q.008"), &TestSpecPrepareVRUnsupportedFormatWhenVRInitializedQL ) ); |
|
3890 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q.009"), &TestSpecPrepareVRSupportedFormatWhenPreparedQL ) ); |
|
3891 |
|
3892 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.Q.001"), &TestStartVideoRecordingWhenVRInitializedQL ) ); |
|
3893 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.Q.002"), &TestStartVideoRecordingWhenRecordingQL ) ); |
|
3894 |
|
3895 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.Q.001"), &TestStopVideoRecordingWhenVRInitializedQL ) ); |
|
3896 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.Q.002"), &TestStopVideoRecordingWhenPreparedQL ) ); |
|
3897 |
|
3898 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.CAPTURERECORD.Q.002"), &TestCaptureRecordQL ) ); |
|
3899 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURE.Q.003"), &TestRecordCaptureQL ) ); |
|
3900 |
|
3901 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDRECORD.Q.004"), &TestRecordRecordQL ) ); |
|
3902 |
|
3903 // These "complex sequences" take quite long, probably a minute or more. |
|
3904 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.Q.005"), &TestRecordCaptureComplexSequence1QL ) ); |
|
3905 |
|
3906 #ifdef __CAMERA_BURST_MODE |
|
3907 // Only if Still BURST is supported (built in). |
|
3908 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.Q.006"), &TestRecordCaptureComplexSequence2QL ) ); |
|
3909 #endif |
|
3910 |
|
3911 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.RELESEANDRESERVE.Q.006"), &TestReleaseReserveRecordQL ) ); |
|
3912 |
|
3913 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.002"), &TestPrepareAudioBitRateVR0QL ) ); |
|
3914 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.003"), &TestPrepareAudioBitRateVR5150QL ) ); |
|
3915 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.004"), &TestPrepareAudioBitRateVR12200QL ) ); |
|
3916 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.005"), &TestPrepareAudioBitRateVR20000QL ) ); |
|
3917 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.006"), &TestPrepareAudioBitRateVR12200AudioType0QL ) ); |
|
3918 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q.007"), &TestPrepareAudioBitRateVR12200AudioTypeInvQL ) ); |
|
3919 |
|
3920 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q.001"), &TestDestroy1QL ) ); |
|
3921 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q.002"), &TestDestroy2QL ) ); |
|
3922 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q.003"), &TestDestroy3QL ) ); |
|
3923 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q.004"), &TestDestroy4QL ) ); |
|
3924 |
|
3925 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.INITVIDEORECORDERL.Q.002"), &TestInitVideoRecorderWithUidQL ) ); |
|
3926 |
|
3927 #ifdef CAE_TEST_VERSION |
|
3928 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q.001"), &TestVideoRecorderOpenErrorQL ) ); |
|
3929 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q.002"), &TestVideoRecorderPrepareErrorQL ) ); |
|
3930 // suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q.003"), &TestVideoRecordingCompleteErrorQL ) ); |
|
3931 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q.004"), &TestPrepareVideoSettingsErrorQL ) ); |
|
3932 #endif |
|
3933 #endif //MIRAGE_X_PROD3 |
|
3934 |
|
3935 // AAC audio, MPEG-4 video |
|
3936 #if (MIRAGE_X_PROD3) |
|
3937 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.QCIF64000FR15.Q4.004"), &TestPrepareAndRecordQualityLevel0Q4L ) ); |
|
3938 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF60000FR15.Q4.005"), &TestPrepareAndRecordQualityLevel1Q4L ) ); |
|
3939 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.VIDEORECORDING.SUBQCIF40000FR5.Q4.006"), &TestPrepareAndRecordQualityLevel2Q4L ) ); |
|
3940 |
|
3941 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.003"), &TestVideoRecordingQcif60000Fr10NoAudioNoVfQ4L ) ); |
|
3942 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.004"), &TestVideoRecordingQcif60000Fr10WithAudioNoVfQ4L ) ); |
|
3943 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.005"), &TestVideoRecordingQcif60000Fr10NoAudioWithVfQ4L ) ); |
|
3944 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTSTOPVIDEORECORDING.QCIF.Q4.006"), &TestVideoRecordingQcif60000Fr10WithAudioWithVfQ4L ) ); |
|
3945 |
|
3946 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q4.001"), &TestRecordPauseStopQ4L ) ); |
|
3947 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q4.002"), &TestPauseWhenPreparedQ4L ) ); |
|
3948 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PAUSEVIDEORECORDING.Q4.003"), &TestRecordPausePauseStopQ4L ) ); |
|
3949 |
|
3950 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.Q4.002"), &TestResumeWhenPreparedQ4L ) ); |
|
3951 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.RESUMEVIDEORECORDING.Q4.003"), &TestResumeWhenNotPausedQ4L ) ); |
|
3952 |
|
3953 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q4.005"), &TestPrepareVideoRecordingNeg1Q4L ) ); |
|
3954 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q4.006"), &TestPrepareVideoRecording3Q4L ) ); |
|
3955 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q4.008"), &TestSpecPrepareVRUnsupportedFormatWhenVRInitializedQ4L ) ); |
|
3956 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREVIDEORECORDINGL.Q4.009"), &TestSpecPrepareVRSupportedFormatWhenPreparedQ4L ) ); |
|
3957 |
|
3958 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.Q4.001"), &TestStartVideoRecordingWhenVRInitializedQ4L ) ); |
|
3959 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STARTVIDEORECORDING.Q4.002"), &TestStartVideoRecordingWhenRecordingQ4L ) ); |
|
3960 |
|
3961 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.Q4.001"), &TestStopVideoRecordingWhenVRInitializedQ4L ) ); |
|
3962 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.STOPVIDEORECORDING.Q4.002"), &TestStopVideoRecordingWhenPreparedQ4L ) ); |
|
3963 |
|
3964 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.CAPTURERECORD.Q4.002"), &TestCaptureRecordQ4L ) ); |
|
3965 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURE.Q4.003"), &TestRecordCaptureQ4L ) ); |
|
3966 |
|
3967 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDRECORD.Q4.004"), &TestRecordRecordQ4L ) ); |
|
3968 |
|
3969 // These "complex sequences" take quite long, probably a minute or more. |
|
3970 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX1.Q4.005"), &TestRecordCaptureComplexSequence1Q4L ) ); |
|
3971 |
|
3972 #ifdef __CAMERA_BURST_MODE |
|
3973 // Only if Still BURST is supported (built in). |
|
3974 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.STATECHANGE.RECORDCAPTURECOMPLEX2.Q4.006"), &TestRecordCaptureComplexSequence2QL ) ); |
|
3975 #endif |
|
3976 |
|
3977 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.RELESEANDRESERVE.Q4.006"), &TestReleaseReserveRecordQ4L ) ); |
|
3978 |
|
3979 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.002"), &TestPrepareAudioBitRateVR0Q4L ) ); |
|
3980 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.003"), &TestPrepareAudioBitRateVR5150Q4L ) ); |
|
3981 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.004"), &TestPrepareAudioBitRateVR12200Q4L ) ); |
|
3982 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.005"), &TestPrepareAudioBitRateVR20000Q4L ) ); |
|
3983 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.006"), &TestPrepareAudioBitRateVR12200AudioType0Q4L ) ); |
|
3984 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.PREPAREAUDIOBITRATEANDRECORDVIDEO.Q4.007"), &TestPrepareAudioBitRateVR12200AudioTypeInvQ4L ) ); |
|
3985 |
|
3986 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q4.001"), &TestDestroy1Q4L ) ); |
|
3987 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q4.002"), &TestDestroy2Q4L ) ); |
|
3988 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q4.003"), &TestDestroy3Q4L ) ); |
|
3989 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.DESTROY.Q4.004"), &TestDestroy4Q4L ) ); |
|
3990 |
|
3991 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.GEN.INITVIDEORECORDERL.Q4.002"), &TestInitVideoRecorderWithUidQ4L ) ); |
|
3992 |
|
3993 #ifdef CAE_TEST_VERSION |
|
3994 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q4.001"), &TestVideoRecorderOpenErrorQ4L ) ); |
|
3995 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q4.002"), &TestVideoRecorderPrepareErrorQ4L ) ); |
|
3996 // suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q4.003"), &TestVideoRecordingCompleteErrorQ4L ) ); |
|
3997 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.ERRORS.Q4.004"), &TestPrepareVideoSettingsErrorQ4L ) ); |
|
3998 #endif |
|
3999 #endif //MIRAGE_X_PROD3 |
|
4000 |
|
4001 suite->addTestL( CTestCaller<CCaeTestVideoStates>::NewL( _L8("CAE.VR.REMAININGVIDEORECORDINGTIME.002"), &TestRemainingTimeWhenVideoNotInitializedL ) ); |
|
4002 |
|
4003 return suite; |
|
4004 } |
|
4005 |
|
4006 |
|