|
1 // Copyright (c) 2005-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef VIDEOPLAYFILE_H |
|
17 #define VIDEOPLAYFILE_H |
|
18 |
|
19 #include "tsu_mdf_videocodecs_step.h" |
|
20 #include <mmf/devvideo/devvideoplay.h> |
|
21 |
|
22 |
|
23 class RTestStepVideoCodecs; |
|
24 class CPlayVideoFile; |
|
25 |
|
26 |
|
27 // For Play tests |
|
28 class CPlayVideoFile : public CActive, public MMMFDevVideoPlayProxy |
|
29 { |
|
30 public: |
|
31 |
|
32 enum TPlayVideoFileState |
|
33 { |
|
34 EHwDeviceInit, |
|
35 EHwDeviceStartDecode, |
|
36 EHwDeviceAllowToComplete, |
|
37 EHwDeviceEncodeCheckData, |
|
38 EHwDeviceDone, |
|
39 EHwDeviceError |
|
40 }; |
|
41 |
|
42 public: |
|
43 static CPlayVideoFile* NewL(RTestStepVideoCodecs* aParent); |
|
44 ~CPlayVideoFile(); |
|
45 |
|
46 void LoadCodecL(); |
|
47 void SetDSA(TBool aUseDSA); |
|
48 void StartPlaybackL(); |
|
49 void SetState(TPlayVideoFileState aState); |
|
50 void CleanupAndSetDeviceError(TPtrC16 aText); |
|
51 void StartDirectScreenAccessL(); |
|
52 |
|
53 // From CActive |
|
54 void RunL(); |
|
55 void DoCancel(); |
|
56 |
|
57 // From MMMFDevVideoPlayProxy |
|
58 virtual void MdvppNewPicture(TVideoPicture* aPicture); |
|
59 virtual void MdvppNewBuffers(); |
|
60 virtual void MdvppReturnPicture(TVideoPicture* aPicture); |
|
61 virtual void MdvppSupplementalInformation(const TDesC8& aData, |
|
62 const TTimeIntervalMicroSeconds& aTimestamp, const TPictureId& aPictureId); |
|
63 virtual void MdvppPictureLoss(); |
|
64 virtual void MdvppPictureLoss(const TArray<TPictureId>& aPictures); |
|
65 virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture); |
|
66 virtual void MdvppReferencePictureSelection(const TDesC8& aSelectionData); |
|
67 virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData* aPictureData, |
|
68 const TTimeIntervalMicroSeconds& aPresentationTimestamp, const TPictureId& aPictureId); |
|
69 virtual void MdvppFatalError(CMMFVideoHwDevice* aDevice, TInt aError); |
|
70 virtual void MdvppInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError); |
|
71 virtual void MdvppStreamEnd(); |
|
72 |
|
73 private: |
|
74 CPlayVideoFile(RTestStepVideoCodecs* aParent); |
|
75 void ConstructL(); |
|
76 void StartDecodeL(); |
|
77 void InitializeL(); |
|
78 void ReadNextBufferL(); |
|
79 void OpenTestFileL(); |
|
80 |
|
81 private: |
|
82 //DevVideoPlay |
|
83 CMMFVideoDecodeHwDevice* iVideoHwDevice; |
|
84 |
|
85 TInt iError; |
|
86 |
|
87 // data section |
|
88 RFs iFs; |
|
89 RFile iFile; |
|
90 TPlayVideoFileState iState; |
|
91 RTestStepVideoCodecs* iParent; |
|
92 TBool iStoppedReceived; |
|
93 TBool iUseDSA; |
|
94 |
|
95 TSize iFrameSize; |
|
96 CFbsScreenDevice* iScreenDevice; |
|
97 }; |
|
98 |
|
99 #endif // VIDEOPLAYFILE_H |
|
100 |
|
101 |