Update contrib.
2 // Copyright (c) 2003-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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
15 // TestDevVideoPlay.cpp
19 #include "TestDevVideoPlay.h"
20 #include "TestDevVideoPlayTestData.h"
21 #include "TestDevVideoPlugins/decoder.h"
22 #include "TestDevVideoPlugins/postproc.h"
25 CTestDevVideoPlaySetInputCrop::CTestDevVideoPlaySetInputCrop(const TDesC& aTestName, TTestType aTestType)
26 :CTestDevVideoPlayStep(aTestName, aTestType)
30 CTestDevVideoPlaySetInputCrop* CTestDevVideoPlaySetInputCrop::NewL(const TDesC& aTestName, TTestType aTestType)
32 CTestDevVideoPlaySetInputCrop* self = new(ELeave) CTestDevVideoPlaySetInputCrop(aTestName, aTestType);
36 TVerdict CTestDevVideoPlaySetInputCrop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
39 TInt expErr = KErrNone;
41 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetInputCrop"));
44 if (iTestType != ETestValid)
46 ERR_PRINTF1(_L("Error - invalid test step type"));
53 THwDeviceId hwDecoder = 0;
54 THwDeviceId hwPostProc = 0;
57 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
60 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
64 // select post-processor
65 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
68 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
72 // set input crop on decoder
73 TRect testRect1(KTestInputCropRectA, KTestInputCropRectB, KTestInputCropRectC, KTestInputCropRectD);
74 TRAP(err, aDevVideoPlay.SetInputCropOptionsL(hwDecoder, testRect1) )
76 // set input crop on post-processor
77 TRect testRect2(KTestInputCropRectD, KTestInputCropRectC, KTestInputCropRectB, KTestInputCropRectA);
78 TRAP(err2, aDevVideoPlay.SetInputCropOptionsL(hwPostProc, testRect2) )
81 if ((err != expErr) || (err2 != expErr))
83 ERR_PRINTF3(_L("SetInputCropOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
84 ERR_PRINTF3(_L("SetInputCropOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
88 INFO_PRINTF4(_L("SetInputCropOptionsL(), %d, %d= %d"), err, err2, expErr);
92 //------------------------------------------------------------------
94 CTestDevVideoPlaySetYuvToRgbOptionsFormat::CTestDevVideoPlaySetYuvToRgbOptionsFormat(const TDesC& aTestName, TTestType aTestType)
95 :CTestDevVideoPlayStep(aTestName, aTestType)
99 CTestDevVideoPlaySetYuvToRgbOptionsFormat* CTestDevVideoPlaySetYuvToRgbOptionsFormat::NewL(const TDesC& aTestName, TTestType aTestType)
101 CTestDevVideoPlaySetYuvToRgbOptionsFormat* self = new(ELeave) CTestDevVideoPlaySetYuvToRgbOptionsFormat(aTestName, aTestType);
105 TVerdict CTestDevVideoPlaySetYuvToRgbOptionsFormat::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
107 TVerdict ret = EPass;
108 TInt expErr = KErrNone;
110 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetYuvToRgbOptionsFormat"));
113 if (iTestType != ETestValid)
115 ERR_PRINTF1(_L("Error - invalid test step type"));
116 return EInconclusive;
120 TInt err2 = KErrNone;
122 THwDeviceId hwDecoder = 0;
123 THwDeviceId hwPostProc = 0;
126 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
129 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
130 return EInconclusive;
133 // select post-processor
134 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
137 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
138 return EInconclusive;
141 // set YUV to RGB options with formats on decoder
142 TRAP(err, aDevVideoPlay.SetYuvToRgbOptionsL(hwDecoder, KTestYuvToRgb1, KTestYuvFormat1, KTestRgbFormat1) );
144 // set YUV to RGB options with formats on post-processor
145 TRAP(err2, aDevVideoPlay.SetYuvToRgbOptionsL(hwPostProc, KTestYuvToRgb2, KTestYuvFormat2, KTestRgbFormat2) );
148 if ((err != expErr) || (err2 != expErr))
150 ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
151 ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
155 INFO_PRINTF4(_L("SetYuvToRgbOptionsL(), %d, %d= %d"), err, err2, expErr);
159 //------------------------------------------------------------------
161 CTestDevVideoPlaySetYuvToRgbOptions::CTestDevVideoPlaySetYuvToRgbOptions(const TDesC& aTestName, TTestType aTestType)
162 :CTestDevVideoPlayStep(aTestName, aTestType)
166 CTestDevVideoPlaySetYuvToRgbOptions* CTestDevVideoPlaySetYuvToRgbOptions::NewL(const TDesC& aTestName, TTestType aTestType)
168 CTestDevVideoPlaySetYuvToRgbOptions* self = new(ELeave) CTestDevVideoPlaySetYuvToRgbOptions(aTestName, aTestType);
172 TVerdict CTestDevVideoPlaySetYuvToRgbOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
174 TVerdict ret = EPass;
175 TInt expErr = KErrNone;
177 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetYuvToRgbOptions"));
180 if (iTestType != ETestValid)
182 ERR_PRINTF1(_L("Error - invalid test step type"));
183 return EInconclusive;
187 TInt err2 = KErrNone;
189 THwDeviceId hwDecoder = 0;
190 THwDeviceId hwPostProc = 0;
193 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
196 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
197 return EInconclusive;
200 // select post-processor
201 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
204 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
205 return EInconclusive;
208 // set YUV to RGB options with formats on decoder
209 TRAP(err, aDevVideoPlay.SetYuvToRgbOptionsL(hwDecoder, KTestYuvToRgb1) );
211 // set YUV to RGB options with formats on post-processor
212 TRAP(err2, aDevVideoPlay.SetYuvToRgbOptionsL(hwPostProc, KTestYuvToRgb2) );
215 if ((err != expErr) || (err2 != expErr))
217 ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
218 ERR_PRINTF3(_L("SetYuvToRgbOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
222 INFO_PRINTF4(_L("SetYuvToRgbOptionsL(), %d, %d= %d"), err, err2, expErr);
226 //------------------------------------------------------------------
228 CTestDevVideoPlaySetRotate::CTestDevVideoPlaySetRotate(const TDesC& aTestName, TTestType aTestType)
229 :CTestDevVideoPlayStep(aTestName, aTestType)
233 CTestDevVideoPlaySetRotate* CTestDevVideoPlaySetRotate::NewL(const TDesC& aTestName, TTestType aTestType)
235 CTestDevVideoPlaySetRotate* self = new(ELeave) CTestDevVideoPlaySetRotate(aTestName, aTestType);
239 TVerdict CTestDevVideoPlaySetRotate::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
241 TVerdict ret = EPass;
242 TInt expErr = KErrNone;
244 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetRotate"));
247 if (iTestType != ETestValid)
249 ERR_PRINTF1(_L("Error - invalid test step type"));
250 return EInconclusive;
254 TInt err2 = KErrNone;
256 THwDeviceId hwDecoder = 0;
257 THwDeviceId hwPostProc = 0;
260 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
263 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
264 return EInconclusive;
267 // select post-processor
268 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
271 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
272 return EInconclusive;
275 // set rotate options on decoder
276 TRAP(err, aDevVideoPlay.SetRotateOptionsL(hwDecoder, KTestRotate1) );
278 // set rotate options on post-processor
279 TRAP(err2, aDevVideoPlay.SetRotateOptionsL(hwPostProc, KTestRotate2) );
282 if ((err != expErr) || (err2 != expErr))
284 ERR_PRINTF3(_L("SetRotateOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
285 ERR_PRINTF3(_L("SetRotateOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
289 INFO_PRINTF4(_L("SetRotateOptionsL(), %d, %d= %d"), err, err2, expErr);
293 //------------------------------------------------------------------
295 CTestDevVideoPlaySetScale::CTestDevVideoPlaySetScale(const TDesC& aTestName, TTestType aTestType)
296 :CTestDevVideoPlayStep(aTestName, aTestType)
300 CTestDevVideoPlaySetScale* CTestDevVideoPlaySetScale::NewL(const TDesC& aTestName, TTestType aTestType)
302 CTestDevVideoPlaySetScale* self = new(ELeave) CTestDevVideoPlaySetScale(aTestName, aTestType);
306 TVerdict CTestDevVideoPlaySetScale::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
308 TVerdict ret = EPass;
309 TInt expErr = KErrNone;
311 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetScale"));
314 if (iTestType != ETestValid)
316 ERR_PRINTF1(_L("Error - invalid test step type"));
317 return EInconclusive;
321 TInt err2 = KErrNone;
323 THwDeviceId hwDecoder = 0;
324 THwDeviceId hwPostProc = 0;
327 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
330 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
331 return EInconclusive;
334 // select post-processor
335 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
338 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
339 return EInconclusive;
342 // set scale options on decoder
343 TSize testScale1(KTestScaleX, KTestScaleY);
344 TRAP(err, aDevVideoPlay.SetScaleOptionsL(hwDecoder, testScale1, ETrue) );
346 TSize testScale2(KTestScaleY, KTestScaleX);
347 // set scale options on post-processor
348 TRAP(err2, aDevVideoPlay.SetScaleOptionsL(hwPostProc, testScale2, ETrue) );
351 if ((err != expErr) || (err2 != expErr))
353 ERR_PRINTF3(_L("SetScaleOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
354 ERR_PRINTF3(_L("SetScaleOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
358 INFO_PRINTF4(_L("SetScaleOptionsL(), %d, %d= %d"), err, err2, expErr);
362 //------------------------------------------------------------------
364 CTestDevVideoPlaySetCrop::CTestDevVideoPlaySetCrop(const TDesC& aTestName, TTestType aTestType)
365 :CTestDevVideoPlayStep(aTestName, aTestType)
369 CTestDevVideoPlaySetCrop* CTestDevVideoPlaySetCrop::NewL(const TDesC& aTestName, TTestType aTestType)
371 CTestDevVideoPlaySetCrop* self = new(ELeave) CTestDevVideoPlaySetCrop(aTestName, aTestType);
375 TVerdict CTestDevVideoPlaySetCrop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
377 TVerdict ret = EPass;
378 TInt expErr = KErrNone;
380 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetCrop"));
383 if (iTestType != ETestValid)
385 ERR_PRINTF1(_L("Error - invalid test step type"));
386 return EInconclusive;
390 TInt err2 = KErrNone;
392 THwDeviceId hwDecoder = 0;
393 THwDeviceId hwPostProc = 0;
396 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
399 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
400 return EInconclusive;
403 // select post-processor
404 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
407 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
408 return EInconclusive;
411 // set output crop options on decoder
412 TRect testRect1(KTestOutputCropRectA, KTestOutputCropRectB, KTestOutputCropRectC, KTestOutputCropRectD);
413 TRAP(err, aDevVideoPlay.SetOutputCropOptionsL(hwDecoder, testRect1) );
415 // set output crop options on post-processor
416 TRect testRect2(KTestOutputCropRectD, KTestOutputCropRectC, KTestOutputCropRectB, KTestOutputCropRectA);
417 TRAP(err2, aDevVideoPlay.SetOutputCropOptionsL(hwPostProc, testRect2) );
420 if ((err != expErr) || (err2 != expErr))
422 ERR_PRINTF3(_L("SetOutputCropOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
423 ERR_PRINTF3(_L("SetOutputCropOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
427 INFO_PRINTF4(_L("SetOutputCropOptionsL(), %d, %d= %d"), err, err2, expErr);
431 //------------------------------------------------------------------
433 CTestDevVideoPlaySetPostProcOptions::CTestDevVideoPlaySetPostProcOptions(const TDesC& aTestName, TTestType aTestType)
434 :CTestDevVideoPlayStep(aTestName, aTestType)
438 CTestDevVideoPlaySetPostProcOptions* CTestDevVideoPlaySetPostProcOptions::NewL(const TDesC& aTestName, TTestType aTestType)
440 CTestDevVideoPlaySetPostProcOptions* self = new(ELeave) CTestDevVideoPlaySetPostProcOptions(aTestName, aTestType);
444 TVerdict CTestDevVideoPlaySetPostProcOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
446 TVerdict ret = EPass;
447 TInt expErr = KErrNone;
449 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetPostProcOptions"));
452 if (iTestType != ETestValid)
454 ERR_PRINTF1(_L("Error - invalid test step type"));
455 return EInconclusive;
459 TInt err2 = KErrNone;
461 THwDeviceId hwDecoder = 0;
462 THwDeviceId hwPostProc = 0;
465 TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
468 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
469 return EInconclusive;
472 // select post-processor
473 TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
476 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
477 return EInconclusive;
480 // set post-processor options on decoder
481 TRAP(err, aDevVideoPlay.SetPostProcSpecificOptionsL(hwDecoder, KTestPostProcOptions1) );
483 // set post-processor options on post-processor
484 TRAP(err2, aDevVideoPlay.SetPostProcSpecificOptionsL(hwPostProc, KTestPostProcOptions2) );
487 if ((err != expErr) || (err2 != expErr))
489 ERR_PRINTF3(_L("SetPostProcSpecificOptionsL() on Decoder gave error %d (expected %d)"),err, expErr);
490 ERR_PRINTF3(_L("SetPostProcSpecificOptionsL() on Post-Processor gave error %d (expected %d)"),err2, expErr);
494 INFO_PRINTF4(_L("SetPostProcSpecificOptionsL(), %d, %d= %d"), err, err2, expErr);
498 //------------------------------------------------------------------
500 CTestDevVideoPlaySetClockSource::CTestDevVideoPlaySetClockSource(const TDesC& aTestName, TTestType aTestType)
501 :CTestDevVideoPlayStep(aTestName, aTestType)
505 CTestDevVideoPlaySetClockSource* CTestDevVideoPlaySetClockSource::NewL(const TDesC& aTestName, TTestType aTestType)
507 CTestDevVideoPlaySetClockSource* self = new(ELeave) CTestDevVideoPlaySetClockSource(aTestName, aTestType);
511 TVerdict CTestDevVideoPlaySetClockSource::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
513 TVerdict ret = EPass;
514 // TInt expErr = KErrNone;
515 TBool selDec = ETrue;
516 TBool selPost = ETrue;
518 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetClockSource"));
524 // expErr = KErrNone; // EABI warning removal
526 case ETestDecoderOnly:
529 case ETestPostProcOnly:
533 ERR_PRINTF1(_L("Error - invalid test step type"));
534 return EInconclusive;
539 // THwDeviceId hwDecoder = 0;
540 // THwDeviceId hwPostProc = 0;
545 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
546 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
549 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
550 return EInconclusive;
554 // select post-processor
557 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
558 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
561 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
562 return EInconclusive;
566 CSystemClockSource *time1 = NULL;
568 // no parameters so no need to have a separate 'test clock source'
569 TRAP(err, time1 = CSystemClockSource::NewL());
572 ERR_PRINTF1(_L("Error - couldn't construct system clock class"));
574 return EInconclusive;
578 aDevVideoPlay.SetClockSource(time1);
580 // if there is no panic then test has passed
582 INFO_PRINTF1(_L("SetClockSourceL() called correctly on HW Devices."));
584 // delete clock source
585 delete time1; time1 = NULL;
589 //------------------------------------------------------------------
591 CTestDevVideoPlaySetVideoOutput::CTestDevVideoPlaySetVideoOutput(const TDesC& aTestName, TTestType aTestType)
592 :CTestDevVideoPlayStep(aTestName, aTestType)
596 CTestDevVideoPlaySetVideoOutput* CTestDevVideoPlaySetVideoOutput::NewL(const TDesC& aTestName, TTestType aTestType)
598 CTestDevVideoPlaySetVideoOutput* self = new(ELeave) CTestDevVideoPlaySetVideoOutput(aTestName, aTestType);
602 TVerdict CTestDevVideoPlaySetVideoOutput::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
604 TVerdict ret = EPass;
605 TInt expErr = KErrNone;
607 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetVideoOutput"));
610 if (iTestType != ETestValid)
612 ERR_PRINTF1(_L("Error - invalid test step type"));
613 return EInconclusive;
618 // THwDeviceId hwDecoder = 0;
619 // THwDeviceId hwPostProc = 0;
622 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
623 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
626 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
627 return EInconclusive;
630 // select post-processor
631 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
632 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
635 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
636 return EInconclusive;
639 expErr = KErrHardwareNotAvailable;//Post processor plugin will leave with this if it gets
640 //the method call correctly
642 TRAP(err, aDevVideoPlay.SetVideoDestScreenL(ETrue) )
646 ERR_PRINTF3(_L("SetVideoDestScreenL() gave error %d (expected %d)"),err, expErr);
650 INFO_PRINTF3(_L("SetVideoDestScreenL(), %d = %d"), err, expErr);
654 //------------------------------------------------------------------
656 CTestDevVideoPlaySynchronizeDecoding::CTestDevVideoPlaySynchronizeDecoding(const TDesC& aTestName, TTestType aTestType)
657 :CTestDevVideoPlayStep(aTestName, aTestType)
661 CTestDevVideoPlaySynchronizeDecoding* CTestDevVideoPlaySynchronizeDecoding::NewL(const TDesC& aTestName, TTestType aTestType)
663 CTestDevVideoPlaySynchronizeDecoding* self = new(ELeave) CTestDevVideoPlaySynchronizeDecoding(aTestName, aTestType);
667 TVerdict CTestDevVideoPlaySynchronizeDecoding::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
669 TVerdict ret = EPass;
671 INFO_PRINTF1(_L("CMMFDevVideoPlay: SynchronizeDecoding"));
674 if (iTestType != ETestValid)
676 ERR_PRINTF1(_L("Error - invalid test step type"));
677 return EInconclusive;
682 // THwDeviceId hwDecoder = 0;
683 // THwDeviceId hwPostProc = 0;
686 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
687 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // eABI warning removal
690 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
691 return EInconclusive;
694 // select post-processor
695 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
696 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // eABI warning removal
699 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
700 return EInconclusive;
703 // call synchronize decoding on Decoder
704 aDevVideoPlay.SynchronizeDecoding(ETrue);
705 // if this doesn't panic then test passes
707 INFO_PRINTF1(_L("SynchronizeDecoding() called successfully."));
711 //------------------------------------------------------------------
713 CTestDevVideoPlaySetBufferOptions::CTestDevVideoPlaySetBufferOptions(const TDesC& aTestName, TTestType aTestType)
714 :CTestDevVideoPlayStep(aTestName, aTestType)
718 CTestDevVideoPlaySetBufferOptions* CTestDevVideoPlaySetBufferOptions::NewL(const TDesC& aTestName, TTestType aTestType)
720 CTestDevVideoPlaySetBufferOptions* self = new(ELeave) CTestDevVideoPlaySetBufferOptions(aTestName, aTestType);
724 TVerdict CTestDevVideoPlaySetBufferOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
726 TVerdict ret = EPass;
727 TInt expErr = KErrNone;
729 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetBufferOptions"));
732 if (iTestType != ETestValid)
734 ERR_PRINTF1(_L("Error - invalid test step type"));
735 return EInconclusive;
740 // THwDeviceId hwDecoder = 0;
741 // THwDeviceId hwPostProc = 0;
744 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
745 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
748 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
749 return EInconclusive;
752 // select post-processor
753 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
754 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
757 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
758 return EInconclusive;
761 // initialize buffer options to the test data
762 CMMFDevVideoPlay::TBufferOptions buffOptions = GetTestBufferOptions();
764 // set buffer options on decoder [will leave on error]
765 TRAP(err, aDevVideoPlay.SetBufferOptionsL(buffOptions) );
769 ERR_PRINTF3(_L("SetBufferOptionsL() gave error %d (expected %d)"),err, expErr);
773 INFO_PRINTF3(_L("SetBufferOptions(), %d = %d"), err, expErr);
777 //------------------------------------------------------------------
779 CTestDevVideoPlayGetBufferOptions::CTestDevVideoPlayGetBufferOptions(const TDesC& aTestName, TTestType aTestType)
780 :CTestDevVideoPlayStep(aTestName, aTestType)
784 CTestDevVideoPlayGetBufferOptions* CTestDevVideoPlayGetBufferOptions::NewL(const TDesC& aTestName, TTestType aTestType)
786 CTestDevVideoPlayGetBufferOptions* self = new(ELeave) CTestDevVideoPlayGetBufferOptions(aTestName, aTestType);
790 TVerdict CTestDevVideoPlayGetBufferOptions::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
792 TVerdict ret = EPass;
793 TInt expErr = KErrNone;
795 INFO_PRINTF1(_L("CMMFDevVideoPlay: GetBufferOptions"));
798 if (iTestType != ETestValid)
800 ERR_PRINTF1(_L("Error - invalid test step type"));
801 return EInconclusive;
806 // THwDeviceId hwDecoder = 0;
807 // THwDeviceId hwPostProc = 0;
810 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
811 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
814 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
815 return EInconclusive;
818 // select post-processor
819 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
820 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
823 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
824 return EInconclusive;
827 // get buffer options from the decoder
828 CMMFDevVideoPlay::TBufferOptions buffOptions;
829 aDevVideoPlay.GetBufferOptions(buffOptions);
831 // compare this to the test data
832 if ( !CompareBufferOptions(buffOptions, GetTestBufferOptions()) )
834 ERR_PRINTF1(_L("GetBufferOptions() comparison with test data failed!"));
839 INFO_PRINTF1(_L("GetBufferOptions() comparison with test data passed."));
840 INFO_PRINTF3(_L("GetBufferOptions(), %d = %d"), err, expErr);
845 //------------------------------------------------------------------
847 CTestDevVideoPlaySetHrdVbv::CTestDevVideoPlaySetHrdVbv(const TDesC& aTestName, TTestType aTestType)
848 :CTestDevVideoPlayStep(aTestName, aTestType)
852 CTestDevVideoPlaySetHrdVbv* CTestDevVideoPlaySetHrdVbv::NewL(const TDesC& aTestName, TTestType aTestType)
854 CTestDevVideoPlaySetHrdVbv* self = new(ELeave) CTestDevVideoPlaySetHrdVbv(aTestName, aTestType);
858 TVerdict CTestDevVideoPlaySetHrdVbv::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
860 TVerdict ret = EPass;
862 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetHrdVbv"));
865 if (iTestType != ETestValid)
867 ERR_PRINTF1(_L("Error - invalid test step type"));
868 return EInconclusive;
873 // THwDeviceId hwDecoder = 0;
874 // THwDeviceId hwPostProc = 0;
877 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
878 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
881 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
882 return EInconclusive;
885 // select post-processor
886 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
887 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
890 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
891 return EInconclusive;
894 HBufC8* hrdVbvParams = NULL;
895 TRAP(err, hrdVbvParams = KTestHrdVbvParams().AllocL());
898 ERR_PRINTF1(_L("Error - couldn't initialize hrd/vbv params"));
899 return EInconclusive;
902 // set hrd/vbv spec on decoder
903 aDevVideoPlay.SetHrdVbvSpec(KTestHrdVbvSpec, *hrdVbvParams);
904 // if this doesn't panic then test has passed
907 delete hrdVbvParams; hrdVbvParams = NULL;
909 INFO_PRINTF1(_L("SetHrdVbvSpec() called successfully."));
914 //------------------------------------------------------------------
916 void CTestDevVideoPlayInit::MdvpoInitComplete(TInt aError)
918 INFO_PRINTF2(_L("MdvpoInitComplete(): Error = %d"), aError);
923 CTestDevVideoPlayInit::CTestDevVideoPlayInit(const TDesC& aTestName, TTestType aTestType)
924 :CTestDevVideoPlayStep(aTestName, aTestType)
928 CTestDevVideoPlayInit* CTestDevVideoPlayInit::NewL(const TDesC& aTestName, TTestType aTestType)
930 CTestDevVideoPlayInit* self = new(ELeave) CTestDevVideoPlayInit(aTestName, aTestType);
934 TVerdict CTestDevVideoPlayInit::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
936 TVerdict ret = EPass;
937 TInt expErr = KErrNone;
939 INFO_PRINTF1(_L("CMMFDevVideoPlay: Init"));
942 if (iTestType != ETestValid)
944 ERR_PRINTF1(_L("Error - invalid test step type"));
945 return EInconclusive;
950 // THwDeviceId hwDecoder = 0;
951 // THwDeviceId hwPostProc = 0;
954 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
955 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
958 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
959 return EInconclusive;
962 // select post-processor
963 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
964 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
967 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
968 return EInconclusive;
971 // initialize CDevVideoPlay and wait for response in iError
972 // iError is set by the MdvpoInitComplete callback
973 aDevVideoPlay.Initialize();
975 if (iError != expErr)
977 ERR_PRINTF3(_L("Initialize() gave error %d (expected %d)"),iError, expErr);
981 INFO_PRINTF3(_L("Initialize(), %d = %d"), iError, expErr);
986 //------------------------------------------------------------------
988 void CTestDevVideoPlayStartDSA::MdvpoInitComplete(TInt aError)
990 INFO_PRINTF2(_L("CTestDevVideoPlayStartDSA::MdvpoInitComplete(): Error = %d"), aError);
995 CTestDevVideoPlayStartDSA::CTestDevVideoPlayStartDSA(const TDesC& aTestName, TTestType aTestType)
996 :CTestDevVideoPlayStep(aTestName, aTestType)
1000 CTestDevVideoPlayStartDSA* CTestDevVideoPlayStartDSA::NewL(const TDesC& aTestName, TTestType aTestType)
1002 CTestDevVideoPlayStartDSA* self = new(ELeave) CTestDevVideoPlayStartDSA(aTestName, aTestType);
1006 TVerdict CTestDevVideoPlayStartDSA::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1008 TVerdict ret = EPass;
1009 TInt expErr = KErrNone;
1011 INFO_PRINTF1(_L("CMMFDevVideoPlay: StartDSA"));
1014 if (iTestType != ETestValid)
1016 ERR_PRINTF1(_L("Error - invalid test step type"));
1017 return EInconclusive;
1020 TInt err = KErrNone;
1022 // THwDeviceId hwDecoder = 0;
1023 // THwDeviceId hwPostProc = 0;
1026 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1027 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1028 if (err != KErrNone)
1030 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1031 return EInconclusive;
1034 // select post-processor
1035 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1036 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1037 if (err != KErrNone)
1039 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1040 return EInconclusive;
1043 // initialize CDevVideoPlay and wait for response
1044 // iError is set by the MdvpoInitComplete callback
1045 aDevVideoPlay.Initialize();
1046 if (iError != KErrNone)
1048 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1049 return EInconclusive;
1052 // screen device is independant of DevVideo so we can construct one here
1053 // and just check that it is non NULL at the plugin
1054 CFbsScreenDevice *screenDev = NULL;
1055 TRAP(err, screenDev = CFbsScreenDevice::NewL(_L("scdv"), EColor16));
1056 if (err != KErrNone)
1058 ERR_PRINTF1(_L("Error - couldn't initialize screen device"));
1059 //return EInconclusive;
1062 TRect dsaRect(KTestDSARectA, KTestDSARectB, KTestDSARectC, KTestDSARectD);
1063 TRegionFix<1> reg1(dsaRect);
1065 // start direct screen access
1066 TRAP(err, aDevVideoPlay.StartDirectScreenAccessL(dsaRect, *screenDev, reg1) );
1068 // delete screen device and rect
1076 ERR_PRINTF3(_L("StartDirectScreenAccessL() gave error %d (expected %d)"),err, expErr);
1080 INFO_PRINTF3(_L("StartDirectScreenAccessL(), %d = %d"), err, expErr);
1084 //------------------------------------------------------------------
1086 void CTestDevVideoPlaySetClipRegion::MdvpoInitComplete(TInt aError)
1088 INFO_PRINTF2(_L("CTestDevVideoPlaySetClipRegion::MdvpoInitComplete(): Error = %d"), aError);
1093 CTestDevVideoPlaySetClipRegion::CTestDevVideoPlaySetClipRegion(const TDesC& aTestName, TTestType aTestType)
1094 :CTestDevVideoPlayStep(aTestName, aTestType)
1098 CTestDevVideoPlaySetClipRegion* CTestDevVideoPlaySetClipRegion::NewL(const TDesC& aTestName, TTestType aTestType)
1100 CTestDevVideoPlaySetClipRegion* self = new(ELeave) CTestDevVideoPlaySetClipRegion(aTestName, aTestType);
1104 TVerdict CTestDevVideoPlaySetClipRegion::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1106 TVerdict ret = EPass;
1108 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetClipRegion"));
1111 if (iTestType != ETestValid)
1113 ERR_PRINTF1(_L("Error - invalid test step type"));
1114 return EInconclusive;
1117 TInt err = KErrNone;
1119 // THwDeviceId hwDecoder = 0;
1120 // THwDeviceId hwPostProc = 0;
1123 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1124 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // eABI warning removal
1125 if (err != KErrNone)
1127 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1128 return EInconclusive;
1131 // select post-processor
1132 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1133 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1134 if (err != KErrNone)
1136 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1137 return EInconclusive;
1140 // initialize CDevVideoPlay and wait for response
1141 // iError is set by the MdvpoInitComplete callback
1142 aDevVideoPlay.Initialize();
1144 if (iError != KErrNone)
1146 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1147 return EInconclusive;
1150 TRect dsaRect(KTestDSARectA, KTestDSARectB, KTestDSARectC, KTestDSARectD);
1151 TRegionFix<1> reg1(dsaRect);
1154 aDevVideoPlay.SetScreenClipRegion(reg1);
1159 // if no PANIC then test has passed
1160 INFO_PRINTF1(_L("SetScreenClipRegion() called successfully"));
1164 //------------------------------------------------------------------
1166 void CTestDevVideoPlaySetPauseClipFail::MdvpoInitComplete(TInt aError)
1168 INFO_PRINTF2(_L("CTestDevVideoPlaySetPauseClipFail::MdvpoInitComplete(): Error = %d"), aError);
1173 CTestDevVideoPlaySetPauseClipFail::CTestDevVideoPlaySetPauseClipFail(const TDesC& aTestName, TTestType aTestType)
1174 :CTestDevVideoPlayStep(aTestName, aTestType)
1178 CTestDevVideoPlaySetPauseClipFail* CTestDevVideoPlaySetPauseClipFail::NewL(const TDesC& aTestName, TTestType aTestType)
1180 CTestDevVideoPlaySetPauseClipFail* self = new(ELeave) CTestDevVideoPlaySetPauseClipFail(aTestName, aTestType);
1184 TVerdict CTestDevVideoPlaySetPauseClipFail::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1186 TVerdict ret = EPass;
1188 INFO_PRINTF1(_L("CMMFDevVideoPlay: SetPauseClipFail"));
1191 if (iTestType != ETestValid)
1193 ERR_PRINTF1(_L("Error - invalid test step type"));
1194 return EInconclusive;
1197 TInt err = KErrNone;
1199 // THwDeviceId hwDecoder = 0;
1200 // THwDeviceId hwPostProc = 0;
1203 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1204 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1205 if (err != KErrNone)
1207 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1208 return EInconclusive;
1211 // select post-processor
1212 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1213 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1214 if (err != KErrNone)
1216 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1217 return EInconclusive;
1220 // initialize CDevVideoPlay and wait for response
1221 // iError is set by the MdvpoInitComplete callback
1222 aDevVideoPlay.Initialize();
1224 if (iError != KErrNone)
1226 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1227 return EInconclusive;
1230 // set pause on clip fail to ETrue
1231 aDevVideoPlay.SetPauseOnClipFail(ETrue);
1233 // if no PANIC then test has passed
1234 INFO_PRINTF1(_L("SetPauseClipFail() called successfully"));
1238 //------------------------------------------------------------------
1240 void CTestDevVideoPlayAbortDSA::MdvpoInitComplete(TInt aError)
1242 INFO_PRINTF2(_L("CTestDevVideoPlayAbortDSA::MdvpoInitComplete(): Error = %d"), aError);
1247 CTestDevVideoPlayAbortDSA::CTestDevVideoPlayAbortDSA(const TDesC& aTestName, TTestType aTestType)
1248 :CTestDevVideoPlayStep(aTestName, aTestType)
1252 CTestDevVideoPlayAbortDSA* CTestDevVideoPlayAbortDSA::NewL(const TDesC& aTestName, TTestType aTestType)
1254 CTestDevVideoPlayAbortDSA* self = new(ELeave) CTestDevVideoPlayAbortDSA(aTestName, aTestType);
1258 TVerdict CTestDevVideoPlayAbortDSA::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1260 TVerdict ret = EPass;
1262 INFO_PRINTF1(_L("CMMFDevVideoPlay: AbortDSA"));
1265 if (iTestType != ETestValid)
1267 ERR_PRINTF1(_L("Error - invalid test step type"));
1268 return EInconclusive;
1271 TInt err = KErrNone;
1273 // THwDeviceId hwDecoder = 0;
1274 // THwDeviceId hwPostProc = 0;
1277 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1278 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1279 if (err != KErrNone)
1281 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1282 return EInconclusive;
1285 // select post-processor
1286 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1287 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // eABI warning removal
1288 if (err != KErrNone)
1290 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1291 return EInconclusive;
1294 // initialize CDevVideoPlay and wait for response
1295 // iError is set by the MdvpoInitComplete callback
1296 aDevVideoPlay.Initialize();
1298 if (iError != KErrNone)
1300 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1301 return EInconclusive;
1304 // abort direct screen access [is there a way to check this?]
1305 aDevVideoPlay.AbortDirectScreenAccess();
1307 INFO_PRINTF1(_L("AbortDirectScreenAccess() called successfully"));
1311 //------------------------------------------------------------------
1313 void CTestDevVideoPlayIsPlaying::MdvpoInitComplete(TInt aError)
1315 INFO_PRINTF2(_L("CTestDevVideoPlayIsPlaying::MdvpoInitComplete(): Error = %d"), aError);
1320 CTestDevVideoPlayIsPlaying::CTestDevVideoPlayIsPlaying(const TDesC& aTestName, TTestType aTestType)
1321 :CTestDevVideoPlayStep(aTestName, aTestType)
1325 CTestDevVideoPlayIsPlaying* CTestDevVideoPlayIsPlaying::NewL(const TDesC& aTestName, TTestType aTestType)
1327 CTestDevVideoPlayIsPlaying* self = new(ELeave) CTestDevVideoPlayIsPlaying(aTestName, aTestType);
1331 TVerdict CTestDevVideoPlayIsPlaying::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1333 TVerdict ret = EPass;
1335 INFO_PRINTF1(_L("CMMFDevVideoPlay: IsPlaying"));
1338 if (iTestType != ETestValid)
1340 ERR_PRINTF1(_L("Error - invalid test step type"));
1341 return EInconclusive;
1344 TInt err = KErrNone;
1346 // THwDeviceId hwDecoder = 0;
1347 // THwDeviceId hwPostProc = 0;
1350 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1351 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1352 if (err != KErrNone)
1354 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1355 return EInconclusive;
1358 // select post-processor
1359 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1360 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1361 if (err != KErrNone)
1363 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1364 return EInconclusive;
1367 // initialize CDevVideoPlay and wait for response
1368 // iError is set by the MdvpoInitComplete callback
1369 aDevVideoPlay.Initialize();
1371 if (iError != KErrNone)
1373 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1374 return EInconclusive;
1377 TBool playing = ETrue;
1379 // check DevVideoPlay is not playing
1380 playing = aDevVideoPlay.IsPlaying();
1384 ERR_PRINTF1(_L("IsPlaying() reported ETrue - expected EFalse!"));
1388 INFO_PRINTF1(_L("IsPlaying() returned EFalse as expected"));
1392 //------------------------------------------------------------------
1394 void CTestDevVideoPlayRedraw::MdvpoInitComplete(TInt aError)
1396 INFO_PRINTF2(_L("CTestDevVideoPlayRedraw::MdvpoInitComplete(): Error = %d"), aError);
1401 CTestDevVideoPlayRedraw::CTestDevVideoPlayRedraw(const TDesC& aTestName, TTestType aTestType)
1402 :CTestDevVideoPlayStep(aTestName, aTestType)
1406 CTestDevVideoPlayRedraw* CTestDevVideoPlayRedraw::NewL(const TDesC& aTestName, TTestType aTestType)
1408 CTestDevVideoPlayRedraw* self = new(ELeave) CTestDevVideoPlayRedraw(aTestName, aTestType);
1412 TVerdict CTestDevVideoPlayRedraw::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1414 TVerdict ret = EPass;
1416 INFO_PRINTF1(_L("CMMFDevVideoPlay: Redraw"));
1419 if (iTestType != ETestValid)
1421 ERR_PRINTF1(_L("Error - invalid test step type"));
1422 return EInconclusive;
1425 TInt err = KErrNone;
1427 // THwDeviceId hwDecoder = 0;
1428 // THwDeviceId hwPostProc = 0;
1431 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1432 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1433 if (err != KErrNone)
1435 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1436 return EInconclusive;
1439 // select post-processor
1440 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1441 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1442 if (err != KErrNone)
1444 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1445 return EInconclusive;
1448 // initialize CDevVideoPlay and wait for response
1449 // iError is set by the MdvpoInitComplete callback
1450 aDevVideoPlay.Initialize();
1452 if (iError != KErrNone)
1454 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1455 return EInconclusive;
1458 // call redraw [is there a way to check this?]
1459 aDevVideoPlay.Redraw();
1461 INFO_PRINTF1(_L("Redraw() called successfully"));
1465 //------------------------------------------------------------------
1467 void CTestDevVideoPlayStart::MdvpoInitComplete(TInt aError)
1469 INFO_PRINTF2(_L("CTestDevVideoPlayStart::MdvpoInitComplete(): Error = %d"), aError);
1474 CTestDevVideoPlayStart::CTestDevVideoPlayStart(const TDesC& aTestName, TTestType aTestType)
1475 :CTestDevVideoPlayStep(aTestName, aTestType)
1479 CTestDevVideoPlayStart* CTestDevVideoPlayStart::NewL(const TDesC& aTestName, TTestType aTestType)
1481 CTestDevVideoPlayStart* self = new(ELeave) CTestDevVideoPlayStart(aTestName, aTestType);
1485 TVerdict CTestDevVideoPlayStart::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1487 TVerdict ret = EPass;
1488 // TInt expErr = KErrNone;
1489 TBool selDec = ETrue;
1490 TBool selPost = ETrue;
1492 INFO_PRINTF1(_L("CMMFDevVideoPlay: Start"));
1498 // expErr = KErrNone; // EABI warning removal
1500 case ETestDecoderOnly:
1503 case ETestPostProcOnly:
1507 ERR_PRINTF1(_L("Error - invalid test step type"));
1508 return EInconclusive;
1511 TInt err = KErrNone;
1513 // THwDeviceId hwDecoder = 0;
1514 // THwDeviceId hwPostProc = 0;
1519 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1520 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1521 if (err != KErrNone)
1523 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1524 return EInconclusive;
1528 // select post-processor
1531 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1532 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABIO warning removal
1533 if (err != KErrNone)
1535 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1536 return EInconclusive;
1540 // initialize CDevVideoPlay and wait for response
1541 // iError is set by the MdvpoInitComplete callback
1542 aDevVideoPlay.Initialize();
1544 if (iError != KErrNone)
1546 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1547 return EInconclusive;
1550 // check not already playing
1551 TBool playing = aDevVideoPlay.IsPlaying();
1554 ERR_PRINTF1(_L("Error - DevVideoPlay already playing!"));
1555 return EInconclusive;
1558 // call start on DevVideoPlay then check IsPlaying()
1559 aDevVideoPlay.Start();
1560 playing = aDevVideoPlay.IsPlaying();
1564 ERR_PRINTF1(_L("IsPlaying() returned EFalse - expected ETrue"));
1568 INFO_PRINTF1(_L("Start() called successfully"));
1572 //------------------------------------------------------------------
1574 void CTestDevVideoPlayStop::MdvpoInitComplete(TInt aError)
1576 INFO_PRINTF2(_L("CTestDevVideoPlayStop::MdvpoInitComplete(): Error = %d"), aError);
1581 CTestDevVideoPlayStop::CTestDevVideoPlayStop(const TDesC& aTestName, TTestType aTestType)
1582 :CTestDevVideoPlayStep(aTestName, aTestType)
1586 CTestDevVideoPlayStop* CTestDevVideoPlayStop::NewL(const TDesC& aTestName, TTestType aTestType)
1588 CTestDevVideoPlayStop* self = new(ELeave) CTestDevVideoPlayStop(aTestName, aTestType);
1592 TVerdict CTestDevVideoPlayStop::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1594 TVerdict ret = EPass;
1595 // TInt expErr = KErrNone;
1596 TBool selDec = ETrue;
1597 TBool selPost = ETrue;
1599 INFO_PRINTF1(_L("CMMFDevVideoPlay: Stop"));
1605 // expErr = KErrNone; // EABI warning removal
1607 case ETestDecoderOnly:
1610 case ETestPostProcOnly:
1614 ERR_PRINTF1(_L("Error - invalid test step type"));
1615 return EInconclusive;
1618 TInt err = KErrNone;
1620 // THwDeviceId hwDecoder = 0;
1621 // THwDeviceId hwPostProc = 0;
1626 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1627 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1628 if (err != KErrNone)
1630 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1631 return EInconclusive;
1635 // select post-processor
1638 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1639 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1640 if (err != KErrNone)
1642 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1643 return EInconclusive;
1646 // initialize CDevVideoPlay and wait for response
1647 // iError is set by the MdvpoInitComplete callback
1648 aDevVideoPlay.Initialize();
1650 if (iError != KErrNone)
1652 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1653 return EInconclusive;
1656 // check DevVideoPlay has started playing then call stop
1657 aDevVideoPlay.Start();
1658 TBool playing = aDevVideoPlay.IsPlaying();
1662 ERR_PRINTF1(_L("Error - couldn't start playback!"));
1663 return EInconclusive;
1667 aDevVideoPlay.Stop();
1668 playing = aDevVideoPlay.IsPlaying();
1672 ERR_PRINTF1(_L("IsPlaying() returned ETrue - expected EFalse"));
1676 INFO_PRINTF1(_L("Stop() called successfully"));
1680 //------------------------------------------------------------------
1682 void CTestDevVideoPlayPause::MdvpoInitComplete(TInt aError)
1684 INFO_PRINTF2(_L("CTestDevVideoPlayPause::MdvpoInitComplete(): Error = %d"), aError);
1689 CTestDevVideoPlayPause::CTestDevVideoPlayPause(const TDesC& aTestName, TTestType aTestType)
1690 :CTestDevVideoPlayStep(aTestName, aTestType)
1694 CTestDevVideoPlayPause* CTestDevVideoPlayPause::NewL(const TDesC& aTestName, TTestType aTestType)
1696 CTestDevVideoPlayPause* self = new(ELeave) CTestDevVideoPlayPause(aTestName, aTestType);
1700 TVerdict CTestDevVideoPlayPause::DoTestL(CMMFDevVideoPlay& aDevVideoPlay)
1702 TVerdict ret = EPass;
1703 // TInt expErr = KErrNone;
1704 TBool selDec = ETrue;
1705 TBool selPost = ETrue;
1707 INFO_PRINTF1(_L("CMMFDevVideoPlay: Pause"));
1713 // expErr = KErrNone; // EABI warning removal
1715 case ETestDecoderOnly:
1718 case ETestPostProcOnly:
1722 ERR_PRINTF1(_L("Error - invalid test step type"));
1723 return EInconclusive;
1726 TInt err = KErrNone;
1728 // THwDeviceId hwDecoder = 0;
1729 // THwDeviceId hwPostProc = 0;
1734 // TRAP(err, hwDecoder = aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice));
1735 TRAP(err, aDevVideoPlay.SelectDecoderL(KUidDevVideoTestDecodeHwDevice)); // EABI warning removal
1736 if (err != KErrNone)
1738 ERR_PRINTF1(_L("Error - couldn't initialize decoder"));
1739 return EInconclusive;
1743 // select post-processor
1746 // TRAP(err, hwPostProc = aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice));
1747 TRAP(err, aDevVideoPlay.SelectPostProcessorL(KUidDevVideoTestPostProcHwDevice)); // EABI warning removal
1748 if (err != KErrNone)
1750 ERR_PRINTF1(_L("Error - couldn't initialize post processor"));
1751 return EInconclusive;
1755 // initialize CDevVideoPlay and wait for response
1756 // iError is set by the MdvpoInitComplete callback
1757 aDevVideoPlay.Initialize();
1759 if (iError != KErrNone)
1761 ERR_PRINTF1(_L("Error - couldn't initialize DevVideoPlay"));
1762 return EInconclusive;
1765 // check DevVideoPlay has started playing then call pause
1766 aDevVideoPlay.Start();
1767 TBool playing = aDevVideoPlay.IsPlaying();
1771 ERR_PRINTF1(_L("Error - couldn't start playback!"));
1772 return EInconclusive;
1776 aDevVideoPlay.Pause();
1777 playing = aDevVideoPlay.IsPlaying();
1781 ERR_PRINTF1(_L("IsPlaying() returned ETrue - expected EFalse"));
1785 INFO_PRINTF1(_L("Pause() called successfully"));
1789 //------------------------------------------------------------------