First public contribution.
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Header file: DevVideo alloc tests.
19 @file TestStepDevVideoAllocFailNew.h
22 #ifndef __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__
23 #define __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__
25 #include "TestDevVideoPlay.h"
26 #include "TestDevVideoRecord.h"
29 * DevVideoPlay alloc test base class
31 * @class CTestStepDevVideoPlayAllocFail
33 * Req. under test REQ1931.3
36 // inherits from CTestDevVideoStep because CTestDevVideoPlayStep instantiates
37 // the CMMFDevVideoPlay class which we want to do ourselves
38 class CTestStepDevVideoPlayAllocFail : public CTestDevVideoStep, public MMMFDevVideoPlayObserver
41 static CTestStepDevVideoPlayAllocFail* NewL(const TDesC& aTestName);
42 CTestStepDevVideoPlayAllocFail(const TDesC& aTestName);
43 ~CTestStepDevVideoPlayAllocFail();
44 virtual TVerdict DoTestStepL();
45 virtual TVerdict DoTestL() = 0;
47 // MMMFDevVideoPlayObserver
48 virtual void MdvpoNewBuffers();
49 virtual void MdvpoReturnPicture(TVideoPicture* aPicture);
50 virtual void MdvpoSupplementalInformation(const TDesC8& aData,
51 const TTimeIntervalMicroSeconds& aTimestamp,
52 const TPictureId& aPictureId);
53 virtual void MdvpoPictureLoss();
54 virtual void MdvpoPictureLoss(const TArray<TPictureId>& aPictures);
55 virtual void MdvpoSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
56 virtual void MdvpoReferencePictureSelection(const TDesC8& aSelectionData);
57 virtual void MdvpoTimedSnapshotComplete(TInt aError,
58 TPictureData* aPictureData,
59 const TTimeIntervalMicroSeconds& aPresentationTimestamp,
60 const TPictureId& aPictureId);
61 virtual void MdvpoNewPictures();
62 virtual void MdvpoFatalError(TInt aError);
63 virtual void MdvpoInitComplete(TInt aError);
64 virtual void MdvpoStreamEnd();
68 CMMFDevVideoPlay* iDevVideoPlay;
73 class CTestStepDevVideoPlayAllocFailNew : public CTestStepDevVideoPlayAllocFail
76 static CTestStepDevVideoPlayAllocFailNew* NewL(const TDesC& aTestName);
77 CTestStepDevVideoPlayAllocFailNew(const TDesC& aTestName);
78 ~CTestStepDevVideoPlayAllocFailNew();
79 virtual TVerdict DoTestL();
83 class CTestStepDevVideoPlayAllocFailFindPlugins : public CTestStepDevVideoPlayAllocFail
86 static CTestStepDevVideoPlayAllocFailFindPlugins* NewL(const TDesC& aTestName);
87 CTestStepDevVideoPlayAllocFailFindPlugins(const TDesC& aTestName);
88 ~CTestStepDevVideoPlayAllocFailFindPlugins();
89 virtual TVerdict DoTestL();
92 void GetPostProcessorsL();
94 void FindPostProcessorsL();
95 void CheckPluginsL(const RArray<TUid>& aFoundPlugins, const RArray<TUid>& aExpectedPlugins, const RArray<TUid>& aUnExpectedPlugins);
98 class CTestStepDevVideoPlayAllocFailInfoDecoder : public CTestStepDevVideoPlayAllocFail
101 static CTestStepDevVideoPlayAllocFailInfoDecoder* NewL(const TDesC& aTestName);
102 CTestStepDevVideoPlayAllocFailInfoDecoder(const TDesC& aTestName);
103 ~CTestStepDevVideoPlayAllocFailInfoDecoder();
104 virtual TVerdict DoTestL();
107 class CTestStepDevVideoPlayAllocFailInfoPostProc : public CTestStepDevVideoPlayAllocFail
110 static CTestStepDevVideoPlayAllocFailInfoPostProc* NewL(const TDesC& aTestName);
111 CTestStepDevVideoPlayAllocFailInfoPostProc(const TDesC& aTestName);
112 ~CTestStepDevVideoPlayAllocFailInfoPostProc();
113 virtual TVerdict DoTestL();
116 class CTestStepDevVideoPlayAllocFailGetPictures : public CTestStepDevVideoPlayAllocFail
119 static CTestStepDevVideoPlayAllocFailGetPictures* NewL(const TDesC& aTestName);
120 CTestStepDevVideoPlayAllocFailGetPictures(const TDesC& aTestName);
121 ~CTestStepDevVideoPlayAllocFailGetPictures();
122 virtual TVerdict DoTestL();
124 virtual void MdvpoInitComplete(TInt aError);
125 virtual void MdvpoNewPictures();
126 void CheckNewPictureInfoL(TUint aNumPictures, const TTimeIntervalMicroSeconds& aFirst, const TTimeIntervalMicroSeconds& aLast);
127 void DoNewPicturesL();
129 TInt iCurrentPictureNumber;
137 * DevVideoRecord alloc test base class
139 * @class CTestStepDevVideoRecordAllocFail
141 * Req. under test REQ1931.3
144 // inherits from CTestDevVideoStep because CTestDevVideoRecordStep instantiates
145 // the CMMFDevVideoRecord class which we want to do ourselves
146 class CTestStepDevVideoRecordAllocFail : public CTestDevVideoStep, public MMMFDevVideoRecordObserver
149 static CTestStepDevVideoRecordAllocFail* NewL(const TDesC& aTestName);
150 CTestStepDevVideoRecordAllocFail(const TDesC& aTestName);
151 ~CTestStepDevVideoRecordAllocFail();
152 virtual TVerdict DoTestStepL();
153 virtual TVerdict DoTestL() = 0;
155 // MMMFDevVideoRecordObserver
156 virtual void MdvroReturnPicture(TVideoPicture* aPicture);
157 virtual void MdvroSupplementalInfoSent();
158 virtual void MdvroNewBuffers();
159 virtual void MdvroFatalError(TInt aError);
160 virtual void MdvroInitializeComplete(TInt aError);
161 virtual void MdvroStreamEnd();
165 CMMFDevVideoRecord* iDevVideoRecord;
169 class CTestStepDevVideoRecordAllocFailNew : public CTestStepDevVideoRecordAllocFail
172 static CTestStepDevVideoRecordAllocFailNew* NewL(const TDesC& aTestName);
173 CTestStepDevVideoRecordAllocFailNew(const TDesC& aTestName);
174 ~CTestStepDevVideoRecordAllocFailNew();
175 virtual TVerdict DoTestL();
178 class CTestStepDevVideoRecordAllocFailInfoEncoder : public CTestStepDevVideoRecordAllocFail
181 static CTestStepDevVideoRecordAllocFailInfoEncoder* NewL(const TDesC& aTestName);
182 CTestStepDevVideoRecordAllocFailInfoEncoder(const TDesC& aTestName);
183 ~CTestStepDevVideoRecordAllocFailInfoEncoder();
184 virtual TVerdict DoTestL();
187 class CTestStepDevVideoRecordAllocFailInfoPreProc : public CTestStepDevVideoRecordAllocFail
190 static CTestStepDevVideoRecordAllocFailInfoPreProc* NewL(const TDesC& aTestName);
191 CTestStepDevVideoRecordAllocFailInfoPreProc(const TDesC& aTestName);
192 ~CTestStepDevVideoRecordAllocFailInfoPreProc();
193 virtual TVerdict DoTestL();
196 class CTestStepDevVideoRecordAllocFailFindPlugins : public CTestStepDevVideoRecordAllocFail
199 static CTestStepDevVideoRecordAllocFailFindPlugins* NewL(const TDesC& aTestName);
200 CTestStepDevVideoRecordAllocFailFindPlugins(const TDesC& aTestName);
201 ~CTestStepDevVideoRecordAllocFailFindPlugins();
202 virtual TVerdict DoTestL();
205 void GetPreProcessorsL();
206 void FindEncodersL();
207 void FindPreProcessorsL();
208 void CheckPluginsL(const RArray<TUid>& aFoundPlugins, const RArray<TUid>& aExpectedPlugins, const RArray<TUid>& aUnExpectedPlugins);
211 class CTestStepDevVideoRecordAllocFailGetBuffers : public CTestStepDevVideoRecordAllocFail
214 static CTestStepDevVideoRecordAllocFailGetBuffers* NewL(const TDesC& aTestName);
215 CTestStepDevVideoRecordAllocFailGetBuffers(const TDesC& aTestName);
216 ~CTestStepDevVideoRecordAllocFailGetBuffers();
217 virtual TVerdict DoTestL();
219 virtual void MdvpoInitComplete(TInt aError);
220 virtual void MdvpoNewBuffers();
221 void CheckNewBufferInfoL(TUint aNumBuffers);
222 void DoNewBuffersL();
224 TInt iCurrentBufferNumber;
228 #endif //(__TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__)