sl@0
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Header file: DevVideo alloc tests.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
/**
|
sl@0
|
19 |
@file TestStepDevVideoAllocFailNew.h
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__
|
sl@0
|
23 |
#define __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__
|
sl@0
|
24 |
|
sl@0
|
25 |
#include "TestDevVideoPlay.h"
|
sl@0
|
26 |
#include "TestDevVideoRecord.h"
|
sl@0
|
27 |
|
sl@0
|
28 |
/**
|
sl@0
|
29 |
* DevVideoPlay alloc test base class
|
sl@0
|
30 |
*
|
sl@0
|
31 |
* @class CTestStepDevVideoPlayAllocFail
|
sl@0
|
32 |
*
|
sl@0
|
33 |
* Req. under test REQ1931.3
|
sl@0
|
34 |
*/
|
sl@0
|
35 |
|
sl@0
|
36 |
// inherits from CTestDevVideoStep because CTestDevVideoPlayStep instantiates
|
sl@0
|
37 |
// the CMMFDevVideoPlay class which we want to do ourselves
|
sl@0
|
38 |
class CTestStepDevVideoPlayAllocFail : public CTestDevVideoStep, public MMMFDevVideoPlayObserver
|
sl@0
|
39 |
{
|
sl@0
|
40 |
public:
|
sl@0
|
41 |
static CTestStepDevVideoPlayAllocFail* NewL(const TDesC& aTestName);
|
sl@0
|
42 |
CTestStepDevVideoPlayAllocFail(const TDesC& aTestName);
|
sl@0
|
43 |
~CTestStepDevVideoPlayAllocFail();
|
sl@0
|
44 |
virtual TVerdict DoTestStepL();
|
sl@0
|
45 |
virtual TVerdict DoTestL() = 0;
|
sl@0
|
46 |
|
sl@0
|
47 |
// MMMFDevVideoPlayObserver
|
sl@0
|
48 |
virtual void MdvpoNewBuffers();
|
sl@0
|
49 |
virtual void MdvpoReturnPicture(TVideoPicture* aPicture);
|
sl@0
|
50 |
virtual void MdvpoSupplementalInformation(const TDesC8& aData,
|
sl@0
|
51 |
const TTimeIntervalMicroSeconds& aTimestamp,
|
sl@0
|
52 |
const TPictureId& aPictureId);
|
sl@0
|
53 |
virtual void MdvpoPictureLoss();
|
sl@0
|
54 |
virtual void MdvpoPictureLoss(const TArray<TPictureId>& aPictures);
|
sl@0
|
55 |
virtual void MdvpoSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
|
sl@0
|
56 |
virtual void MdvpoReferencePictureSelection(const TDesC8& aSelectionData);
|
sl@0
|
57 |
virtual void MdvpoTimedSnapshotComplete(TInt aError,
|
sl@0
|
58 |
TPictureData* aPictureData,
|
sl@0
|
59 |
const TTimeIntervalMicroSeconds& aPresentationTimestamp,
|
sl@0
|
60 |
const TPictureId& aPictureId);
|
sl@0
|
61 |
virtual void MdvpoNewPictures();
|
sl@0
|
62 |
virtual void MdvpoFatalError(TInt aError);
|
sl@0
|
63 |
virtual void MdvpoInitComplete(TInt aError);
|
sl@0
|
64 |
virtual void MdvpoStreamEnd();
|
sl@0
|
65 |
|
sl@0
|
66 |
protected:
|
sl@0
|
67 |
TInt iError;
|
sl@0
|
68 |
CMMFDevVideoPlay* iDevVideoPlay;
|
sl@0
|
69 |
};
|
sl@0
|
70 |
|
sl@0
|
71 |
|
sl@0
|
72 |
|
sl@0
|
73 |
class CTestStepDevVideoPlayAllocFailNew : public CTestStepDevVideoPlayAllocFail
|
sl@0
|
74 |
{
|
sl@0
|
75 |
public:
|
sl@0
|
76 |
static CTestStepDevVideoPlayAllocFailNew* NewL(const TDesC& aTestName);
|
sl@0
|
77 |
CTestStepDevVideoPlayAllocFailNew(const TDesC& aTestName);
|
sl@0
|
78 |
~CTestStepDevVideoPlayAllocFailNew();
|
sl@0
|
79 |
virtual TVerdict DoTestL();
|
sl@0
|
80 |
};
|
sl@0
|
81 |
|
sl@0
|
82 |
|
sl@0
|
83 |
class CTestStepDevVideoPlayAllocFailFindPlugins : public CTestStepDevVideoPlayAllocFail
|
sl@0
|
84 |
{
|
sl@0
|
85 |
public:
|
sl@0
|
86 |
static CTestStepDevVideoPlayAllocFailFindPlugins* NewL(const TDesC& aTestName);
|
sl@0
|
87 |
CTestStepDevVideoPlayAllocFailFindPlugins(const TDesC& aTestName);
|
sl@0
|
88 |
~CTestStepDevVideoPlayAllocFailFindPlugins();
|
sl@0
|
89 |
virtual TVerdict DoTestL();
|
sl@0
|
90 |
private:
|
sl@0
|
91 |
void GetDecodersL();
|
sl@0
|
92 |
void GetPostProcessorsL();
|
sl@0
|
93 |
void FindDecodersL();
|
sl@0
|
94 |
void FindPostProcessorsL();
|
sl@0
|
95 |
void CheckPluginsL(const RArray<TUid>& aFoundPlugins, const RArray<TUid>& aExpectedPlugins, const RArray<TUid>& aUnExpectedPlugins);
|
sl@0
|
96 |
};
|
sl@0
|
97 |
|
sl@0
|
98 |
class CTestStepDevVideoPlayAllocFailInfoDecoder : public CTestStepDevVideoPlayAllocFail
|
sl@0
|
99 |
{
|
sl@0
|
100 |
public:
|
sl@0
|
101 |
static CTestStepDevVideoPlayAllocFailInfoDecoder* NewL(const TDesC& aTestName);
|
sl@0
|
102 |
CTestStepDevVideoPlayAllocFailInfoDecoder(const TDesC& aTestName);
|
sl@0
|
103 |
~CTestStepDevVideoPlayAllocFailInfoDecoder();
|
sl@0
|
104 |
virtual TVerdict DoTestL();
|
sl@0
|
105 |
};
|
sl@0
|
106 |
|
sl@0
|
107 |
class CTestStepDevVideoPlayAllocFailInfoPostProc : public CTestStepDevVideoPlayAllocFail
|
sl@0
|
108 |
{
|
sl@0
|
109 |
public:
|
sl@0
|
110 |
static CTestStepDevVideoPlayAllocFailInfoPostProc* NewL(const TDesC& aTestName);
|
sl@0
|
111 |
CTestStepDevVideoPlayAllocFailInfoPostProc(const TDesC& aTestName);
|
sl@0
|
112 |
~CTestStepDevVideoPlayAllocFailInfoPostProc();
|
sl@0
|
113 |
virtual TVerdict DoTestL();
|
sl@0
|
114 |
};
|
sl@0
|
115 |
|
sl@0
|
116 |
class CTestStepDevVideoPlayAllocFailGetPictures : public CTestStepDevVideoPlayAllocFail
|
sl@0
|
117 |
{
|
sl@0
|
118 |
public:
|
sl@0
|
119 |
static CTestStepDevVideoPlayAllocFailGetPictures* NewL(const TDesC& aTestName);
|
sl@0
|
120 |
CTestStepDevVideoPlayAllocFailGetPictures(const TDesC& aTestName);
|
sl@0
|
121 |
~CTestStepDevVideoPlayAllocFailGetPictures();
|
sl@0
|
122 |
virtual TVerdict DoTestL();
|
sl@0
|
123 |
void PerformTestL();
|
sl@0
|
124 |
virtual void MdvpoInitComplete(TInt aError);
|
sl@0
|
125 |
virtual void MdvpoNewPictures();
|
sl@0
|
126 |
void CheckNewPictureInfoL(TUint aNumPictures, const TTimeIntervalMicroSeconds& aFirst, const TTimeIntervalMicroSeconds& aLast);
|
sl@0
|
127 |
void DoNewPicturesL();
|
sl@0
|
128 |
private:
|
sl@0
|
129 |
TInt iCurrentPictureNumber;
|
sl@0
|
130 |
TInt iTestError;
|
sl@0
|
131 |
};
|
sl@0
|
132 |
|
sl@0
|
133 |
|
sl@0
|
134 |
// DEVVIDEORECORD //
|
sl@0
|
135 |
|
sl@0
|
136 |
/**
|
sl@0
|
137 |
* DevVideoRecord alloc test base class
|
sl@0
|
138 |
*
|
sl@0
|
139 |
* @class CTestStepDevVideoRecordAllocFail
|
sl@0
|
140 |
*
|
sl@0
|
141 |
* Req. under test REQ1931.3
|
sl@0
|
142 |
*/
|
sl@0
|
143 |
|
sl@0
|
144 |
// inherits from CTestDevVideoStep because CTestDevVideoRecordStep instantiates
|
sl@0
|
145 |
// the CMMFDevVideoRecord class which we want to do ourselves
|
sl@0
|
146 |
class CTestStepDevVideoRecordAllocFail : public CTestDevVideoStep, public MMMFDevVideoRecordObserver
|
sl@0
|
147 |
{
|
sl@0
|
148 |
public:
|
sl@0
|
149 |
static CTestStepDevVideoRecordAllocFail* NewL(const TDesC& aTestName);
|
sl@0
|
150 |
CTestStepDevVideoRecordAllocFail(const TDesC& aTestName);
|
sl@0
|
151 |
~CTestStepDevVideoRecordAllocFail();
|
sl@0
|
152 |
virtual TVerdict DoTestStepL();
|
sl@0
|
153 |
virtual TVerdict DoTestL() = 0;
|
sl@0
|
154 |
|
sl@0
|
155 |
// MMMFDevVideoRecordObserver
|
sl@0
|
156 |
virtual void MdvroReturnPicture(TVideoPicture* aPicture);
|
sl@0
|
157 |
virtual void MdvroSupplementalInfoSent();
|
sl@0
|
158 |
virtual void MdvroNewBuffers();
|
sl@0
|
159 |
virtual void MdvroFatalError(TInt aError);
|
sl@0
|
160 |
virtual void MdvroInitializeComplete(TInt aError);
|
sl@0
|
161 |
virtual void MdvroStreamEnd();
|
sl@0
|
162 |
|
sl@0
|
163 |
protected:
|
sl@0
|
164 |
TInt iError;
|
sl@0
|
165 |
CMMFDevVideoRecord* iDevVideoRecord;
|
sl@0
|
166 |
};
|
sl@0
|
167 |
|
sl@0
|
168 |
|
sl@0
|
169 |
class CTestStepDevVideoRecordAllocFailNew : public CTestStepDevVideoRecordAllocFail
|
sl@0
|
170 |
{
|
sl@0
|
171 |
public:
|
sl@0
|
172 |
static CTestStepDevVideoRecordAllocFailNew* NewL(const TDesC& aTestName);
|
sl@0
|
173 |
CTestStepDevVideoRecordAllocFailNew(const TDesC& aTestName);
|
sl@0
|
174 |
~CTestStepDevVideoRecordAllocFailNew();
|
sl@0
|
175 |
virtual TVerdict DoTestL();
|
sl@0
|
176 |
};
|
sl@0
|
177 |
|
sl@0
|
178 |
class CTestStepDevVideoRecordAllocFailInfoEncoder : public CTestStepDevVideoRecordAllocFail
|
sl@0
|
179 |
{
|
sl@0
|
180 |
public:
|
sl@0
|
181 |
static CTestStepDevVideoRecordAllocFailInfoEncoder* NewL(const TDesC& aTestName);
|
sl@0
|
182 |
CTestStepDevVideoRecordAllocFailInfoEncoder(const TDesC& aTestName);
|
sl@0
|
183 |
~CTestStepDevVideoRecordAllocFailInfoEncoder();
|
sl@0
|
184 |
virtual TVerdict DoTestL();
|
sl@0
|
185 |
};
|
sl@0
|
186 |
|
sl@0
|
187 |
class CTestStepDevVideoRecordAllocFailInfoPreProc : public CTestStepDevVideoRecordAllocFail
|
sl@0
|
188 |
{
|
sl@0
|
189 |
public:
|
sl@0
|
190 |
static CTestStepDevVideoRecordAllocFailInfoPreProc* NewL(const TDesC& aTestName);
|
sl@0
|
191 |
CTestStepDevVideoRecordAllocFailInfoPreProc(const TDesC& aTestName);
|
sl@0
|
192 |
~CTestStepDevVideoRecordAllocFailInfoPreProc();
|
sl@0
|
193 |
virtual TVerdict DoTestL();
|
sl@0
|
194 |
};
|
sl@0
|
195 |
|
sl@0
|
196 |
class CTestStepDevVideoRecordAllocFailFindPlugins : public CTestStepDevVideoRecordAllocFail
|
sl@0
|
197 |
{
|
sl@0
|
198 |
public:
|
sl@0
|
199 |
static CTestStepDevVideoRecordAllocFailFindPlugins* NewL(const TDesC& aTestName);
|
sl@0
|
200 |
CTestStepDevVideoRecordAllocFailFindPlugins(const TDesC& aTestName);
|
sl@0
|
201 |
~CTestStepDevVideoRecordAllocFailFindPlugins();
|
sl@0
|
202 |
virtual TVerdict DoTestL();
|
sl@0
|
203 |
private:
|
sl@0
|
204 |
void GetEncodersL();
|
sl@0
|
205 |
void GetPreProcessorsL();
|
sl@0
|
206 |
void FindEncodersL();
|
sl@0
|
207 |
void FindPreProcessorsL();
|
sl@0
|
208 |
void CheckPluginsL(const RArray<TUid>& aFoundPlugins, const RArray<TUid>& aExpectedPlugins, const RArray<TUid>& aUnExpectedPlugins);
|
sl@0
|
209 |
};
|
sl@0
|
210 |
|
sl@0
|
211 |
class CTestStepDevVideoRecordAllocFailGetBuffers : public CTestStepDevVideoRecordAllocFail
|
sl@0
|
212 |
{
|
sl@0
|
213 |
public:
|
sl@0
|
214 |
static CTestStepDevVideoRecordAllocFailGetBuffers* NewL(const TDesC& aTestName);
|
sl@0
|
215 |
CTestStepDevVideoRecordAllocFailGetBuffers(const TDesC& aTestName);
|
sl@0
|
216 |
~CTestStepDevVideoRecordAllocFailGetBuffers();
|
sl@0
|
217 |
virtual TVerdict DoTestL();
|
sl@0
|
218 |
void PerformTestL();
|
sl@0
|
219 |
virtual void MdvpoInitComplete(TInt aError);
|
sl@0
|
220 |
virtual void MdvpoNewBuffers();
|
sl@0
|
221 |
void CheckNewBufferInfoL(TUint aNumBuffers);
|
sl@0
|
222 |
void DoNewBuffersL();
|
sl@0
|
223 |
private:
|
sl@0
|
224 |
TInt iCurrentBufferNumber;
|
sl@0
|
225 |
TInt iTestError;
|
sl@0
|
226 |
};
|
sl@0
|
227 |
|
sl@0
|
228 |
#endif //(__TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__)
|