1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmdevicefw/mdfunittest/codecapi/video/src/videoplayfile_cov.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,118 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef VIDEOPLAYFILE_COV_H
1.20 +#define VIDEOPPLAYFILE_COV_H
1.21 +
1.22 +#include "tsu_mdf_videocodecs_step.h"
1.23 +#include <mmf/devvideo/devvideoplay.h>
1.24 +
1.25 +
1.26 +class RTestStepVideoCodecs;
1.27 +class CPlayVideoFileCov;
1.28 +
1.29 +
1.30 +// For Play tests
1.31 +class CPlayVideoFileCov : public CActive, public MMMFDevVideoPlayProxy
1.32 + {
1.33 +public:
1.34 +
1.35 +enum TPlayVideoFileState
1.36 + {
1.37 + EHwDeviceInit,
1.38 + EHwDeviceStartDecode,
1.39 + EHwDeviceAllowToComplete,
1.40 + EHwDeviceEncodeCheckData,
1.41 + EHwDeviceDone,
1.42 + EHwDeviceError
1.43 + };
1.44 +
1.45 +public:
1.46 + static CPlayVideoFileCov* NewL(RTestStepVideoCodecs* aParent);
1.47 + ~CPlayVideoFileCov();
1.48 +
1.49 + void LoadCodecL();
1.50 + void SetDSA(TBool aUseDSA);
1.51 + void StartPlaybackL();
1.52 + void SetState(TPlayVideoFileState aState);
1.53 + void CleanupAndSetDeviceError(TPtrC16 aText);
1.54 + void StartDirectScreenAccessL();
1.55 +
1.56 + // From CActive
1.57 + void RunL();
1.58 + void DoCancel();
1.59 +
1.60 + // From MMMFDevVideoPlayProxy
1.61 + virtual void MdvppNewPicture(TVideoPicture* aPicture);
1.62 + virtual void MdvppNewBuffers();
1.63 + virtual void MdvppReturnPicture(TVideoPicture* aPicture);
1.64 + virtual void MdvppSupplementalInformation(const TDesC8& aData,
1.65 + const TTimeIntervalMicroSeconds& aTimestamp, const TPictureId& aPictureId);
1.66 + virtual void MdvppPictureLoss();
1.67 + virtual void MdvppPictureLoss(const TArray<TPictureId>& aPictures);
1.68 + virtual void MdvppSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
1.69 + virtual void MdvppReferencePictureSelection(const TDesC8& aSelectionData);
1.70 + virtual void MdvppTimedSnapshotComplete(TInt aError, TPictureData* aPictureData,
1.71 + const TTimeIntervalMicroSeconds& aPresentationTimestamp, const TPictureId& aPictureId);
1.72 + virtual void MdvppFatalError(CMMFVideoHwDevice* aDevice, TInt aError);
1.73 + virtual void MdvppInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError);
1.74 + virtual void MdvppStreamEnd();
1.75 +
1.76 + //Wrappers for functions which panic
1.77 + void CancelTimedSnapshot();
1.78 + void GetTimedSnapshot1();
1.79 + void GetTimedSnapshot2();
1.80 + void GetSupportedSnapshotFormats();
1.81 +
1.82 +
1.83 + //Function for negative tests
1.84 +
1.85 + void NegTests();
1.86 + void InitializeCov1();
1.87 + void InitializeCov2();
1.88 +
1.89 +
1.90 +
1.91 +
1.92 +private:
1.93 + CPlayVideoFileCov(RTestStepVideoCodecs* aParent);
1.94 + void ConstructL();
1.95 + void StartDecodeL();
1.96 + void StartDecodePauseResumeL();
1.97 + void InitializeL();
1.98 + void ReadNextBufferL();
1.99 + void OpenTestFileL();
1.100 +
1.101 +private:
1.102 + //DevVideoPlay
1.103 + CMMFVideoDecodeHwDevice* iVideoHwDevice;
1.104 +
1.105 + TInt iError;
1.106 +
1.107 + // data section
1.108 + RFs iFs;
1.109 + RFile iFile;
1.110 + TPlayVideoFileState iState;
1.111 + RTestStepVideoCodecs* iParent;
1.112 + TBool iStoppedReceived;
1.113 + TBool iUseDSA;
1.114 +
1.115 + TSize iFrameSize;
1.116 + CFbsScreenDevice* iScreenDevice;
1.117 + };
1.118 +
1.119 +#endif // VIDEOPLAYFILE_COV_H
1.120 +
1.121 +