sl@0: // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Header file: DevVideo alloc tests. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file TestStepDevVideoAllocFailNew.h sl@0: */ sl@0: sl@0: #ifndef __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__ sl@0: #define __TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__ sl@0: sl@0: #include "TestDevVideoPlay.h" sl@0: #include "TestDevVideoRecord.h" sl@0: sl@0: /** sl@0: * DevVideoPlay alloc test base class sl@0: * sl@0: * @class CTestStepDevVideoPlayAllocFail sl@0: * sl@0: * Req. under test REQ1931.3 sl@0: */ sl@0: sl@0: // inherits from CTestDevVideoStep because CTestDevVideoPlayStep instantiates sl@0: // the CMMFDevVideoPlay class which we want to do ourselves sl@0: class CTestStepDevVideoPlayAllocFail : public CTestDevVideoStep, public MMMFDevVideoPlayObserver sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFail* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFail(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFail(); sl@0: virtual TVerdict DoTestStepL(); sl@0: virtual TVerdict DoTestL() = 0; sl@0: sl@0: // MMMFDevVideoPlayObserver sl@0: virtual void MdvpoNewBuffers(); sl@0: virtual void MdvpoReturnPicture(TVideoPicture* aPicture); sl@0: virtual void MdvpoSupplementalInformation(const TDesC8& aData, sl@0: const TTimeIntervalMicroSeconds& aTimestamp, sl@0: const TPictureId& aPictureId); sl@0: virtual void MdvpoPictureLoss(); sl@0: virtual void MdvpoPictureLoss(const TArray& aPictures); sl@0: virtual void MdvpoSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture); sl@0: virtual void MdvpoReferencePictureSelection(const TDesC8& aSelectionData); sl@0: virtual void MdvpoTimedSnapshotComplete(TInt aError, sl@0: TPictureData* aPictureData, sl@0: const TTimeIntervalMicroSeconds& aPresentationTimestamp, sl@0: const TPictureId& aPictureId); sl@0: virtual void MdvpoNewPictures(); sl@0: virtual void MdvpoFatalError(TInt aError); sl@0: virtual void MdvpoInitComplete(TInt aError); sl@0: virtual void MdvpoStreamEnd(); sl@0: sl@0: protected: sl@0: TInt iError; sl@0: CMMFDevVideoPlay* iDevVideoPlay; sl@0: }; sl@0: sl@0: sl@0: sl@0: class CTestStepDevVideoPlayAllocFailNew : public CTestStepDevVideoPlayAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFailNew* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFailNew(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFailNew(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: sl@0: class CTestStepDevVideoPlayAllocFailFindPlugins : public CTestStepDevVideoPlayAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFailFindPlugins* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFailFindPlugins(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFailFindPlugins(); sl@0: virtual TVerdict DoTestL(); sl@0: private: sl@0: void GetDecodersL(); sl@0: void GetPostProcessorsL(); sl@0: void FindDecodersL(); sl@0: void FindPostProcessorsL(); sl@0: void CheckPluginsL(const RArray& aFoundPlugins, const RArray& aExpectedPlugins, const RArray& aUnExpectedPlugins); sl@0: }; sl@0: sl@0: class CTestStepDevVideoPlayAllocFailInfoDecoder : public CTestStepDevVideoPlayAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFailInfoDecoder* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFailInfoDecoder(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFailInfoDecoder(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: class CTestStepDevVideoPlayAllocFailInfoPostProc : public CTestStepDevVideoPlayAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFailInfoPostProc* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFailInfoPostProc(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFailInfoPostProc(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: class CTestStepDevVideoPlayAllocFailGetPictures : public CTestStepDevVideoPlayAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoPlayAllocFailGetPictures* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoPlayAllocFailGetPictures(const TDesC& aTestName); sl@0: ~CTestStepDevVideoPlayAllocFailGetPictures(); sl@0: virtual TVerdict DoTestL(); sl@0: void PerformTestL(); sl@0: virtual void MdvpoInitComplete(TInt aError); sl@0: virtual void MdvpoNewPictures(); sl@0: void CheckNewPictureInfoL(TUint aNumPictures, const TTimeIntervalMicroSeconds& aFirst, const TTimeIntervalMicroSeconds& aLast); sl@0: void DoNewPicturesL(); sl@0: private: sl@0: TInt iCurrentPictureNumber; sl@0: TInt iTestError; sl@0: }; sl@0: sl@0: sl@0: // DEVVIDEORECORD // sl@0: sl@0: /** sl@0: * DevVideoRecord alloc test base class sl@0: * sl@0: * @class CTestStepDevVideoRecordAllocFail sl@0: * sl@0: * Req. under test REQ1931.3 sl@0: */ sl@0: sl@0: // inherits from CTestDevVideoStep because CTestDevVideoRecordStep instantiates sl@0: // the CMMFDevVideoRecord class which we want to do ourselves sl@0: class CTestStepDevVideoRecordAllocFail : public CTestDevVideoStep, public MMMFDevVideoRecordObserver sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFail* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFail(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFail(); sl@0: virtual TVerdict DoTestStepL(); sl@0: virtual TVerdict DoTestL() = 0; sl@0: sl@0: // MMMFDevVideoRecordObserver sl@0: virtual void MdvroReturnPicture(TVideoPicture* aPicture); sl@0: virtual void MdvroSupplementalInfoSent(); sl@0: virtual void MdvroNewBuffers(); sl@0: virtual void MdvroFatalError(TInt aError); sl@0: virtual void MdvroInitializeComplete(TInt aError); sl@0: virtual void MdvroStreamEnd(); sl@0: sl@0: protected: sl@0: TInt iError; sl@0: CMMFDevVideoRecord* iDevVideoRecord; sl@0: }; sl@0: sl@0: sl@0: class CTestStepDevVideoRecordAllocFailNew : public CTestStepDevVideoRecordAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFailNew* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFailNew(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFailNew(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: class CTestStepDevVideoRecordAllocFailInfoEncoder : public CTestStepDevVideoRecordAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFailInfoEncoder* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFailInfoEncoder(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFailInfoEncoder(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: class CTestStepDevVideoRecordAllocFailInfoPreProc : public CTestStepDevVideoRecordAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFailInfoPreProc* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFailInfoPreProc(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFailInfoPreProc(); sl@0: virtual TVerdict DoTestL(); sl@0: }; sl@0: sl@0: class CTestStepDevVideoRecordAllocFailFindPlugins : public CTestStepDevVideoRecordAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFailFindPlugins* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFailFindPlugins(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFailFindPlugins(); sl@0: virtual TVerdict DoTestL(); sl@0: private: sl@0: void GetEncodersL(); sl@0: void GetPreProcessorsL(); sl@0: void FindEncodersL(); sl@0: void FindPreProcessorsL(); sl@0: void CheckPluginsL(const RArray& aFoundPlugins, const RArray& aExpectedPlugins, const RArray& aUnExpectedPlugins); sl@0: }; sl@0: sl@0: class CTestStepDevVideoRecordAllocFailGetBuffers : public CTestStepDevVideoRecordAllocFail sl@0: { sl@0: public: sl@0: static CTestStepDevVideoRecordAllocFailGetBuffers* NewL(const TDesC& aTestName); sl@0: CTestStepDevVideoRecordAllocFailGetBuffers(const TDesC& aTestName); sl@0: ~CTestStepDevVideoRecordAllocFailGetBuffers(); sl@0: virtual TVerdict DoTestL(); sl@0: void PerformTestL(); sl@0: virtual void MdvpoInitComplete(TInt aError); sl@0: virtual void MdvpoNewBuffers(); sl@0: void CheckNewBufferInfoL(TUint aNumBuffers); sl@0: void DoNewBuffersL(); sl@0: private: sl@0: TInt iCurrentBufferNumber; sl@0: TInt iTestError; sl@0: }; sl@0: sl@0: #endif //(__TEST_STEP_DEVVIDEO_ALLOCFAIL_NEW__)