sl@0
|
1 |
// Copyright (c) 2007-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 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef VIDEOPLAYFILE_COV_H
|
sl@0
|
17 |
#define VIDEOPPLAYFILE_COV_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#include "tsu_mdf_videocodecs_step.h"
|
sl@0
|
20 |
#include <mmf/devvideo/devvideoplay.h>
|
sl@0
|
21 |
|
sl@0
|
22 |
|
sl@0
|
23 |
class RTestStepVideoCodecs;
|
sl@0
|
24 |
class CPlayVideoFileCov;
|
sl@0
|
25 |
|
sl@0
|
26 |
|
sl@0
|
27 |
// For Play tests
|
sl@0
|
28 |
class CPlayVideoFileCov : public CActive, public MMMFDevVideoPlayProxy
|
sl@0
|
29 |
{
|
sl@0
|
30 |
public:
|
sl@0
|
31 |
|
sl@0
|
32 |
enum TPlayVideoFileState
|
sl@0
|
33 |
{
|
sl@0
|
34 |
EHwDeviceInit,
|
sl@0
|
35 |
EHwDeviceStartDecode,
|
sl@0
|
36 |
EHwDeviceAllowToComplete,
|
sl@0
|
37 |
EHwDeviceEncodeCheckData,
|
sl@0
|
38 |
EHwDeviceDone,
|
sl@0
|
39 |
EHwDeviceError
|
sl@0
|
40 |
};
|
sl@0
|
41 |
|
sl@0
|
42 |
public:
|
sl@0
|
43 |
static CPlayVideoFileCov* NewL(RTestStepVideoCodecs* aParent);
|
sl@0
|
44 |
~CPlayVideoFileCov();
|
sl@0
|
45 |
|
sl@0
|
46 |
void LoadCodecL();
|
sl@0
|
47 |
void SetDSA(TBool aUseDSA);
|
sl@0
|
48 |
void StartPlaybackL();
|
sl@0
|
49 |
void SetState(TPlayVideoFileState aState);
|
sl@0
|
50 |
void CleanupAndSetDeviceError(TPtrC16 aText);
|
sl@0
|
51 |
void StartDirectScreenAccessL();
|
sl@0
|
52 |
|
sl@0
|
53 |
// From CActive
|
sl@0
|
54 |
void RunL();
|
sl@0
|
55 |
void DoCancel();
|
sl@0
|
56 |
|
sl@0
|
57 |
// From MMMFDevVideoPlayProxy
|
sl@0
|
58 |
virtual void MdvppNewPicture(TVideoPicture* aPicture);
|
sl@0
|
59 |
virtual void MdvppNewBuffers();
|
sl@0
|
60 |
virtual void MdvppReturnPicture(TVideoPicture* aPicture);
|
sl@0
|
61 |
virtual void MdvppSupplementalInformation(const TDesC8& aData,
|
sl@0
|
62 |
const TTimeIntervalMicroSeconds& aTimestamp, const TPictureId& aPictureId);
|
sl@0
|
63 |
virtual void MdvppPictureLoss();
|
sl@0
|
64 |
virtual void MdvppPictureLoss(const TArray<TPictureId>& aPictures);
|
sl@0
|
65 |
virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
|
sl@0
|
66 |
virtual void MdvppReferencePictureSelection(const TDesC8& aSelectionData);
|
sl@0
|
67 |
virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData* aPictureData,
|
sl@0
|
68 |
const TTimeIntervalMicroSeconds& aPresentationTimestamp, const TPictureId& aPictureId);
|
sl@0
|
69 |
virtual void MdvppFatalError(CMMFVideoHwDevice* aDevice, TInt aError);
|
sl@0
|
70 |
virtual void MdvppInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError);
|
sl@0
|
71 |
virtual void MdvppStreamEnd();
|
sl@0
|
72 |
|
sl@0
|
73 |
//Wrappers for functions which panic
|
sl@0
|
74 |
void CancelTimedSnapshot();
|
sl@0
|
75 |
void GetTimedSnapshot1();
|
sl@0
|
76 |
void GetTimedSnapshot2();
|
sl@0
|
77 |
void GetSupportedSnapshotFormats();
|
sl@0
|
78 |
|
sl@0
|
79 |
|
sl@0
|
80 |
//Function for negative tests
|
sl@0
|
81 |
|
sl@0
|
82 |
void NegTests();
|
sl@0
|
83 |
void InitializeCov1();
|
sl@0
|
84 |
void InitializeCov2();
|
sl@0
|
85 |
|
sl@0
|
86 |
|
sl@0
|
87 |
|
sl@0
|
88 |
|
sl@0
|
89 |
private:
|
sl@0
|
90 |
CPlayVideoFileCov(RTestStepVideoCodecs* aParent);
|
sl@0
|
91 |
void ConstructL();
|
sl@0
|
92 |
void StartDecodeL();
|
sl@0
|
93 |
void StartDecodePauseResumeL();
|
sl@0
|
94 |
void InitializeL();
|
sl@0
|
95 |
void ReadNextBufferL();
|
sl@0
|
96 |
void OpenTestFileL();
|
sl@0
|
97 |
|
sl@0
|
98 |
private:
|
sl@0
|
99 |
//DevVideoPlay
|
sl@0
|
100 |
CMMFVideoDecodeHwDevice* iVideoHwDevice;
|
sl@0
|
101 |
|
sl@0
|
102 |
TInt iError;
|
sl@0
|
103 |
|
sl@0
|
104 |
// data section
|
sl@0
|
105 |
RFs iFs;
|
sl@0
|
106 |
RFile iFile;
|
sl@0
|
107 |
TPlayVideoFileState iState;
|
sl@0
|
108 |
RTestStepVideoCodecs* iParent;
|
sl@0
|
109 |
TBool iStoppedReceived;
|
sl@0
|
110 |
TBool iUseDSA;
|
sl@0
|
111 |
|
sl@0
|
112 |
TSize iFrameSize;
|
sl@0
|
113 |
CFbsScreenDevice* iScreenDevice;
|
sl@0
|
114 |
};
|
sl@0
|
115 |
|
sl@0
|
116 |
#endif // VIDEOPLAYFILE_COV_H
|
sl@0
|
117 |
|
sl@0
|
118 |
|