os/mm/mmapitest/devvideohaitest/inc/H264DecTestEngine.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:  
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef __H264DecTestEngine_H
sl@0
    21
#define __H264DecTestEngine_H
sl@0
    22
sl@0
    23
#include <e32base.h>
sl@0
    24
#include <e32std.h>
sl@0
    25
#include <f32file.h>
sl@0
    26
sl@0
    27
#include "T_DevVideoConstants.h"
sl@0
    28
#include <Videoplayhwdevice.h>
sl@0
    29
#include <Devvideoplay.h>
sl@0
    30
#include <Devvideobase.h> 
sl@0
    31
sl@0
    32
//#define __CI_HEADERS__
sl@0
    33
//#define __SECUREOUTPUTCI__
sl@0
    34
sl@0
    35
sl@0
    36
#ifdef __CI_HEADERS__
sl@0
    37
#include <buffermanagementci.h>  // Custom interface buffre management
sl@0
    38
sl@0
    39
#endif
sl@0
    40
sl@0
    41
sl@0
    42
#ifdef __SECUREOUTPUTCI__
sl@0
    43
#include <secureoutputci.h>
sl@0
    44
#endif
sl@0
    45
sl@0
    46
#include <Bitdev.h>   // for display device 
sl@0
    47
#include <Fbs.h>      // for display device
sl@0
    48
#include <math.h> //pow
sl@0
    49
sl@0
    50
#ifdef __RESOURCENOTIFICATION__
sl@0
    51
#include <devvideostandardcustominterfaces.h>
sl@0
    52
#endif
sl@0
    53
sl@0
    54
sl@0
    55
sl@0
    56
sl@0
    57
sl@0
    58
//////////////////
sl@0
    59
// Utility function
sl@0
    60
//////////////////
sl@0
    61
sl@0
    62
sl@0
    63
// MACROS
sl@0
    64
sl@0
    65
// DATA TYPES
sl@0
    66
sl@0
    67
// FORWARD DECLARATIONS
sl@0
    68
sl@0
    69
// CLASS DECLARATION
sl@0
    70
sl@0
    71
const TUint KMaxNumberOfNals = 100;
sl@0
    72
//const TUint KDataChunkSize = 500000;
sl@0
    73
sl@0
    74
sl@0
    75
//#ifdef _DEBUG
sl@0
    76
#define DEBUGPRINT
sl@0
    77
//#endif
sl@0
    78
sl@0
    79
// Debug print macro
sl@0
    80
#ifdef DEBUGPRINT
sl@0
    81
#include <e32svr.h>
sl@0
    82
#define PRINT(x) RDebug::Print x;
sl@0
    83
#else
sl@0
    84
#define PRINT(x)
sl@0
    85
#endif
sl@0
    86
sl@0
    87
// ENumerations
sl@0
    88
sl@0
    89
sl@0
    90
enum TEngineState
sl@0
    91
     {
sl@0
    92
     EStateNone,
sl@0
    93
     ECreated,
sl@0
    94
     EInitialized,
sl@0
    95
     ERunning,	
sl@0
    96
     EPaused,	
sl@0
    97
     EStopped,	
sl@0
    98
     };
sl@0
    99
sl@0
   100
enum TYuvDataOptions
sl@0
   101
     {
sl@0
   102
     EYuv420Planner,
sl@0
   103
     EYuv422Interleaved
sl@0
   104
     };
sl@0
   105
sl@0
   106
enum THWDevice 
sl@0
   107
	{
sl@0
   108
	EPostProcessor,
sl@0
   109
	EDecoder
sl@0
   110
	};
sl@0
   111
sl@0
   112
enum TFLVFileType
sl@0
   113
	{
sl@0
   114
	EFLVNotSet,
sl@0
   115
	EFLVContainer,
sl@0
   116
	EFLVRaw
sl@0
   117
	};
sl@0
   118
sl@0
   119
// CLASS DECLARATION
sl@0
   120
class CVDecTestAO;
sl@0
   121
class CVDecTestEngine;
sl@0
   122
class MVDecEngineObserver;
sl@0
   123
sl@0
   124
sl@0
   125
/**
sl@0
   126
*  Video Decoder Test Engine Observer
sl@0
   127
*  
sl@0
   128
*  @lib 
sl@0
   129
*  @since 
sl@0
   130
*/
sl@0
   131
class MVDecEngineObserver
sl@0
   132
{
sl@0
   133
public:
sl@0
   134
	
sl@0
   135
	virtual void MvdeStreamEndReached() = 0;
sl@0
   136
	virtual void MvdeSetError(TInt aError) = 0;
sl@0
   137
};
sl@0
   138
sl@0
   139
/**
sl@0
   140
*  Video Decoder Test Engine 
sl@0
   141
*  implements common test execution block
sl@0
   142
*  @lib 
sl@0
   143
*  @since 
sl@0
   144
*/
sl@0
   145
class CVDecTestEngine : public CBase , public MMMFDevVideoPlayObserver 
sl@0
   146
#ifdef __CI_HEADERS__
sl@0
   147
,public MMmfVideoBufferManagementObserver
sl@0
   148
#endif
sl@0
   149
#ifdef __RESOURCENOTIFICATION__
sl@0
   150
,public MMmfVideoResourceObserver
sl@0
   151
#endif
sl@0
   152
    {
sl@0
   153
public:
sl@0
   154
sl@0
   155
     
sl@0
   156
     TEngineState iState;
sl@0
   157
sl@0
   158
public:
sl@0
   159
    CVDecTestEngine () { }
sl@0
   160
    ~CVDecTestEngine ();
sl@0
   161
    static CVDecTestEngine* NewL(MVDecEngineObserver& aTestClass);
sl@0
   162
    
sl@0
   163
    //info test method
sl@0
   164
    void SetCodecType(TVideoCodec aCodec);
sl@0
   165
    //void GetDecoderInfoL(const TDesC8& aMimeType, TBool aExactMatch);
sl@0
   166
    //void GetPostProcessorInfoL(TInt aCombination);
sl@0
   167
    void GetHeaderInformationL();
sl@0
   168
    
sl@0
   169
	void GetHeaderInformationL(TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aDataUnitEncapsulation);
sl@0
   170
    //void GetHeaderInfoL(const TUid& aDecUid, TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aDataUnitEncapsulation);
sl@0
   171
	void GetBitstreamCountersL();
sl@0
   172
	void PreDecoderBufferBytes();	
sl@0
   173
    void PictureBufferBytes();
sl@0
   174
    
sl@0
   175
    // Video test control methods
sl@0
   176
    //void SetUpL(TBool aScreenAcces);
sl@0
   177
    void SetUpL(TSize aSize, TBool aScreenAccess, TBool aCIBuffMgmt);
sl@0
   178
    void CreateDecoderL(const TUid& aDecUid, TVideoCodec aCodec, const TDesC8& aMimeType, TYuvDataOptions aOutFormat);
sl@0
   179
    void CreatePostProcessorL(const TUid& aPostprocUid, const TYuvFormat& aInputFormat, const TUncompressedVideoFormat& aOutputFormat, TUint32 aCombination);
sl@0
   180
    void CreateDecPostprocL(const TUid& aDecUid, TVideoCodec aCodec, const TUid& aPostprocUid, TUint32 aCombination);
sl@0
   181
    TInt Initialize();
sl@0
   182
    TInt InitializeAndDelete();
sl@0
   183
    TInt Start(TBool aInputEnd);
sl@0
   184
    TInt Stop();
sl@0
   185
    TInt Resume();
sl@0
   186
    TInt Pause();
sl@0
   187
    void FreezePicture(TTimeIntervalMicroSeconds aTimeStamp);
sl@0
   188
    void ReleaseFreeze(TTimeIntervalMicroSeconds aTimeStamp);
sl@0
   189
    void TearDown();    
sl@0
   190
    void SetFrameMatch(TBool aMatch);
sl@0
   191
    TInt FrameJump(TInt aNumToJump );
sl@0
   192
    void SetFrameDrop(TInt aFrameInterval, TInt aFrameNum, TBool aFrameDropMarker );
sl@0
   193
    void SetFLVPassword(TDesC8& aPassword); 
sl@0
   194
    void EnableInstantFpsL(TFileName& aOutFileName);
sl@0
   195
    
sl@0
   196
    // Select and set Postprocessing  
sl@0
   197
    void SetPostProcessTypesL(TInt aHWDevice, TUint32 aCombination);
sl@0
   198
    void SetInputCropOptionsL(TInt aHWDevice, TRect aCrop);
sl@0
   199
    void SetYuvToRgbOptionsL(TInt aHWDevice, TYuvToRgbOptions aOptions);
sl@0
   200
    void SetRotateOptionsL(TInt aHWDevice, TRotationType aRotation);
sl@0
   201
    void SetScaleOptionsL(TInt aHWDevice, TSize aSize, TBool aAntiAliasFiltering);
sl@0
   202
    void SetScaleOptionsL(TInt aNumFactor,TInt aDenoFactor, TBool aAntiAliasFiltering);
sl@0
   203
    void SetOutputCropOptionsL(TInt aHWDevice, TRect aCrop);
sl@0
   204
    void CommitL();
sl@0
   205
    void Revert();    
sl@0
   206
    
sl@0
   207
    void SetClockSource();
sl@0
   208
    void SetInputBufferSize(TInt aSize);
sl@0
   209
    void SetHrdVbvSpec(THrdVbvSpecification aHrdVbvSpec, const TDesC8& aHrdVbvParams);
sl@0
   210
    void SetPostProcSpecificOptionsL(TInt aHWDevice, const TDesC8& aOptions);
sl@0
   211
    void SetScreenClipRegion(TRegion& aRegion);
sl@0
   212
    void SetPauseOnClipFail(TBool aPause);    
sl@0
   213
    void IsPlaying();
sl@0
   214
    void GetPictureCounters();
sl@0
   215
    void NumFreeBuffers();
sl@0
   216
    void NumComplexityLevels(TInt aHWDevice);
sl@0
   217
    void InputEnd();
sl@0
   218
    void GetNewPictureInfo(TTimeIntervalMicroSeconds& aEarliestTimestamp, 
sl@0
   219
						   TTimeIntervalMicroSeconds& aLatestTimestamp);
sl@0
   220
    void GetTimedSnapshotL(const TUncompressedVideoFormat& aFormat, 
sl@0
   221
							const TTimeIntervalMicroSeconds& aPresentationTimestamp); 
sl@0
   222
	void GetTimedSnapshotL(const TUncompressedVideoFormat& aFormat, const TPictureId& aPictureId);						
sl@0
   223
    void CancelTimedSnapshot();
sl@0
   224
    void GetSupportedSnapshotFormatsL();
sl@0
   225
    
sl@0
   226
    // Complexity level
sl@0
   227
    void SetComplexityLevel(TInt aHWDevice, TInt aLevel);
sl@0
   228
    void GetComplexityLevelInfo(TInt aHWDevice, TInt aLevel);
sl@0
   229
    
sl@0
   230
    //DSA
sl@0
   231
    void StartDirectScreenAccessL();
sl@0
   232
    void StartDirectScreenAccessL(TRect aVideoRect, TRect aClipRegion);
sl@0
   233
    void AbortDirectScreenAccess();    
sl@0
   234
    void Redraw();
sl@0
   235
    
sl@0
   236
    void SetWindowRect(TInt aX, TInt aY, TSize aSize);
sl@0
   237
    void SetSecondScreenAccess(TBool aStatus);
sl@0
   238
    
sl@0
   239
    // snap shot methods
sl@0
   240
    void GetSnapshotL(TUncompressedVideoFormat& aFormat);
sl@0
   241
    
sl@0
   242
    void EnableSynchronization(TInt aFrameRate);
sl@0
   243
    void EnableFrameMeasurementTest(TBool aEnable);
sl@0
   244
    void SetSecureOutputL(TBool aSecure);
sl@0
   245
    void SetPosition(const TTimeIntervalMicroSeconds& aPlaybackPosition);
sl@0
   246
    void ResetPosition();
sl@0
   247
    TTimeIntervalMicroSeconds PlaybackPosition();
sl@0
   248
    void DecodingPosition();
sl@0
   249
    void ListFrameSizeL(RArray<TInt> aFramesizes);
sl@0
   250
    TInt GetFrameSizeCount();
sl@0
   251
    //void GetPictureCounter();
sl@0
   252
    void SetLandscapeMode();
sl@0
   253
    void SelectDecoderL(const TUid& aUid);
sl@0
   254
    void SelectPostProcessorL(const TUid& aUid);
sl@0
   255
    void SetInputFormatL(TInt aHwDev, const TUncompressedVideoFormat& aFormat);
sl@0
   256
    void SetInputFormatL(TInt aHwDev, const CCompressedVideoFormat& aFormat, 
sl@0
   257
						 TVideoDataUnitType aDataUnitType, TVideoDataUnitEncapsulation aEncapsulation,
sl@0
   258
						 TBool aDataInOrder);
sl@0
   259
	void SetOutputFormatL(TInt aHwDev, const TUncompressedVideoFormat& aFormat);						 
sl@0
   260
    void SetBufferOptionsL(const CMMFDevVideoPlay::TBufferOptions& aOptions);
sl@0
   261
    void GetBufferOptions();
sl@0
   262
    void SynchronizeDecoding(TBool aSynch);
sl@0
   263
    void SetVideoDestScreenL(TBool aDest);
sl@0
   264
    void SetYuvToRgbOptionsL(TInt aHWDevice, const TYuvToRgbOptions& aOptions, const TYuvFormat& aYuvFormat, TRgbFormat aRgbFormat);
sl@0
   265
    void FindCommonFormatsL();
sl@0
   266
    TInt FindDecodersL(const TDesC8& aMimeType, TUint32 aPostProcType, TBool aExactMatch, TUid& aUid);
sl@0
   267
    TInt FindPostProcessorsL(TUid& aUid, TUint32 aPostProcType);
sl@0
   268
    void GetDecoderListL();
sl@0
   269
    void ConfigureDecoderL(TVideoPictureHeader& aVideoPictureHeader);
sl@0
   270
    void ConfigureDecoderL();
sl@0
   271
    void GetOutputFormatListL(TInt aHWDevice);
sl@0
   272
    void GetPostProcessorListL();
sl@0
   273
    void VideoDecoderInfoL(TUid aVideoDecoder);
sl@0
   274
    void PostProcessorInfoL(TUid aPostProcessor);
sl@0
   275
    
sl@0
   276
    TReal ConvertToRealL(const TDesC& aPtr);
sl@0
   277
    
sl@0
   278
    //File operations
sl@0
   279
    void OpenFileL(TFileName& aInFileName);
sl@0
   280
    void OpenFileL(TFileName& aOutFileName, TFileName& aInFileName);
sl@0
   281
    void CloseFile();
sl@0
   282
    void CorruptInput(TInt aFilter, TInt aInterval, TInt aFrameNum, TInt aPct);
sl@0
   283
    void CorruptEngineL();
sl@0
   284
    void CorruptEngineL( TVideoInputBuffer* aCodedInBuffer ); 
sl@0
   285
    TInt CreateCorruptedFileL(); 
sl@0
   286
    void OpenFileToWriteL(TFileName& aInFileName);
sl@0
   287
    TInt ReadVC1FrameL(TVideoInputBuffer* aCodedInBuffer);
sl@0
   288
    TInt ReadMPEG4FrameL(TVideoInputBuffer* aCodedInBuffer); 
sl@0
   289
    
sl@0
   290
    TInt SupportsFormatL(const TUid& aUid, const CCompressedVideoFormat& aFormat);
sl@0
   291
	TInt SupportsFormatInfoL(const TUid& aUid, const CCompressedVideoFormat& aFormat);		
sl@0
   292
	TInt SupportsAccelerationL(TInt aHwDev, const TUid& aUid);		
sl@0
   293
	TInt SupportsDirectDisplayL(TInt aHwDev, const TUid& aUid);		
sl@0
   294
	TInt SupportsMaxBitrateL(const TUid& aUid, TInt aBitrate);		
sl@0
   295
	TInt SupportsMaxPictureSizeL(const TUid& aUid, TSize aSize);		
sl@0
   296
	TInt SupportsMaxPictureRateL(const TUid& aUid, TPictureRateAndSize& aRateAndSize);			
sl@0
   297
	TInt SupportsPictureLossL(const TUid& aUid);		
sl@0
   298
	TInt SupportsSliceLossL(const TUid& aUid);
sl@0
   299
 	TInt SupportsOutputFormatL(TInt aHwdev, const TUncompressedVideoFormat& aFormat);
sl@0
   300
 	void SetSlowClient(TBool aOption);
sl@0
   301
 	void SetFastClient(TBool aOption);
sl@0
   302
 	TInt SetAUFormat();
sl@0
   303
 	TInt MoveFileL(const TDesC &anOld, const TDesC &aNew);
sl@0
   304
 	TInt CopyFileL(const TDesC &anOld, const TDesC &aNew); 	
sl@0
   305
 	
sl@0
   306
    
sl@0
   307
    // For Active objects
sl@0
   308
    void HandleNewBufferL();
sl@0
   309
        
sl@0
   310
    // From DevVideo Play observer 
sl@0
   311
    void MdvpoNewBuffers();
sl@0
   312
    void MdvpoReturnPicture(TVideoPicture* aPicture);
sl@0
   313
    void MdvpoSupplementalInformation(const TDesC8& aData, const TTimeIntervalMicroSeconds& aTimestamp, const TPictureId& aPictureId);
sl@0
   314
    void MdvpoPictureLoss();
sl@0
   315
    void MdvpoPictureLoss(const TArray<TPictureId>& aPictures);
sl@0
   316
    void MdvpoSliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
sl@0
   317
    void MdvpoReferencePictureSelection(const TDesC8& aSelectionData);
sl@0
   318
    void MdvpoTimedSnapshotComplete(TInt aError, TPictureData* aPictureData, const TTimeIntervalMicroSeconds& aPresentationTimestamp, const TPictureId& aPictureId);
sl@0
   319
    void MdvpoNewPictures();
sl@0
   320
    void MdvpoFatalError(TInt aError);
sl@0
   321
    void MdvpoInitComplete(TInt aError);
sl@0
   322
    void MdvpoStreamEnd();
sl@0
   323
   
sl@0
   324
    // Buffer Management Custom Interface observer 
sl@0
   325
#ifdef __CI_HEADERS__    
sl@0
   326
    void MmvbmoNewBuffers();
sl@0
   327
    void MmvbmoReleaseBuffers();
sl@0
   328
#endif
sl@0
   329
#ifdef __RESOURCENOTIFICATION__
sl@0
   330
	void MmvroResourcesLost(TUid aMediaDevice);
sl@0
   331
    void MmvroResourcesRestored(TUid aMediaDevice);
sl@0
   332
#endif
sl@0
   333
 
sl@0
   334
protected:
sl@0
   335
    // Own test functions
sl@0
   336
    void GetInputBufferL();
sl@0
   337
    void FillAndSendBufferL();
sl@0
   338
    void GetReturnedPictureL();
sl@0
   339
    void SaveAndReturnPicture();
sl@0
   340
    TInt ReadOneCodedPicture(TVideoInputBuffer* aCodedInBuffer);
sl@0
   341
    TInt ReadOneCodedPicture(TVideoInputBuffer* aCodedInBuffer, TInt aSize);
sl@0
   342
    TInt ReadRawPicture();
sl@0
   343
     
sl@0
   344
private:
sl@0
   345
	TUint8 ReadByteFromFile();
sl@0
   346
	void GoBackInFile(TUint aBytes);
sl@0
   347
	void ReadDataToBuffer(TVideoInputBuffer* aCodedInBuffer, TInt aSize, TBool aDiscard = EFalse);
sl@0
   348
	TBool CheckAndFillDataChunk();
sl@0
   349
	TBool ReadItemLE(unsigned char *readBuffer, int Size, unsigned char* pItem);
sl@0
   350
	TInt LoadNextFrameL(TVideoInputBuffer* aCodedInBuffer);
sl@0
   351
    void ConstructL(MVDecEngineObserver& aTestClass);
sl@0
   352
    void AssertTIntEqualL(TInt aExpected, TInt aActual);
sl@0
   353
    void PrintUncompressedFormat(const TUncompressedVideoFormat& aFormat);
sl@0
   354
    
sl@0
   355
private:
sl@0
   356
    CMMFDevVideoPlay* iDevvp;			  //points to DevVideo Play
sl@0
   357
    THwDeviceId iDecHWDevId;              //Hwdevise ID of selected Decoder
sl@0
   358
    THwDeviceId iPostProcId;              //Hwdevise ID of selected postprocessor
sl@0
   359
    TUid iPostProcessorUid;
sl@0
   360
    TUid iDecoderUid;
sl@0
   361
    CVDecTestAO* iDecTestAO;              
sl@0
   362
    TBool iRunning;                       //State of scheduler
sl@0
   363
    TYuvFormat iRawFormat;                //Used for Decoder output, postprocessor input 
sl@0
   364
    TRgbFormat iDispFormat;               // Display Options
sl@0
   365
    TRect iDispRect;                        
sl@0
   366
    TInt iError;
sl@0
   367
    TVideoInputBuffer* iCodedInBuffer;     // Pointer to Decoder input buffer
sl@0
   368
    TVideoInputBuffer* iCorruptedInBuffer;   //Pointer to corrupted input for decoder
sl@0
   369
    TInt iInBuffSize;                 // Size of decoder input buffer
sl@0
   370
    TVideoPicture* iOutBuffer;             // Pointer to picuture class for output data in memory buffer output 
sl@0
   371
    TVideoPicture* iOutBufferTemp;             // Pointer to picuture class for output data in memory buffer output 
sl@0
   372
    TVideoPicture* iRawInBuffer;            // Used for postprocessor input
sl@0
   373
    HBufC8* iRawDataArea;                  // Pointer to Heap buffer, filled with input data to postprocessor
sl@0
   374
    TInt64 iTimeStamp; 
sl@0
   375
    TInt64 iFrameTimeInterval;              
sl@0
   376
    TInt iSentBuffCount;                    //Number of frames sent to target HwDevice    
sl@0
   377
    TInt iReturnedBuffCount;                //Number of frames returned from target HwDevice
sl@0
   378
    TInt iPictureLoss;                      // number of picture loss
sl@0
   379
    TBool iInputEnd;
sl@0
   380
    TBool iStreamEnd; 
sl@0
   381
    TVideoCodec iCodecType;                
sl@0
   382
    TSize iPictureSize; 
sl@0
   383
    CSystemClockSource* iClock;            //Clock source, based on System clock
sl@0
   384
    TBool iSynchronized;
sl@0
   385
    TBool iDirectScreenAccess;
sl@0
   386
    TBool iCIBuffMgmtOn;
sl@0
   387
    TBool iDisableInputEnd;
sl@0
   388
    TBool iFrameMatch;              // input frame number should match output frame number
sl@0
   389
    TInt  iFrameJump;
sl@0
   390
    TInt  iFrameJumpCounter;
sl@0
   391
    TInt iFrameWriteLength;
sl@0
   392
    TInt iCurrentFilePos;
sl@0
   393
#ifdef __CI_HEADERS__     	   
sl@0
   394
    MMmfVideoBufferManagement* iCIBuffMgmt;  
sl@0
   395
#endif    
sl@0
   396
    MVDecEngineObserver* iTestClass;
sl@0
   397
    TBool iFrameMeasurement;
sl@0
   398
    TBool iDsaStarted;
sl@0
   399
    TBool iLandscapeMode;
sl@0
   400
    TInt iNoBuffAvailable;
sl@0
   401
    RArray<TInt> iFrameSizeList;
sl@0
   402
    TPictureData iPictureDataSnapshot;
sl@0
   403
    TBuf8<128> iInFileName;
sl@0
   404
    TBool iSetSlowClient;
sl@0
   405
    TBool iSetFastClient;
sl@0
   406
    TBool iSetAUFormat;
sl@0
   407
    TBool iOutFileOpen;
sl@0
   408
    TUint8* iAUBuffer;
sl@0
   409
    TUint32* iNalOffsetArray;
sl@0
   410
    TUint32* iNalLengthArray;
sl@0
   411
    TReal32 iFrameTime;
sl@0
   412
    
sl@0
   413
    TUint8* iDataChunk;
sl@0
   414
    TUint8* iReadDataChunk;
sl@0
   415
    TUint8* iWriteDataChunk;
sl@0
   416
    TUint iDataReadFromFile;
sl@0
   417
    TUint iDataThreshold;
sl@0
   418
    TBool iEndOfData;
sl@0
   419
    TBool iLastFrame;
sl@0
   420
    TBool iUseSecondScreen;
sl@0
   421
    
sl@0
   422
    //File IO
sl@0
   423
    RFs   iFs;
sl@0
   424
    RFile iInFile;                         // Input data file
sl@0
   425
    RFile iOutFile;                        // Output data file
sl@0
   426
    RFile iOutCorruptedFile;
sl@0
   427
    RFile iLogFile;
sl@0
   428
	TBool iDeleteDecoderFromInitComp;
sl@0
   429
	
sl@0
   430
	TInt iFlvCounter;
sl@0
   431
	TBool iCorruptMarker;
sl@0
   432
	TInt iFilter;
sl@0
   433
	TInt iInterval;
sl@0
   434
	TInt iFrameNum;
sl@0
   435
	TInt iPercentage;
sl@0
   436
	TInt iFrameCounter;
sl@0
   437
	TInt iCorruptCounter;
sl@0
   438
	TInt iFrameDropCounter;
sl@0
   439
	TInt iFrameDropInterval;
sl@0
   440
	TInt iFrameDropNum;
sl@0
   441
	TInt iFrameDropNumCounter;
sl@0
   442
	TBool iFrameDropMarker;
sl@0
   443
	TFileName iOutFileName;
sl@0
   444
	TFileName iOutCorruptedFileName;
sl@0
   445
	TBool iOutCorruptedFileOpen;
sl@0
   446
	TBuf8<128> iPasswordForFLV;
sl@0
   447
	TBool iSetPassword;
sl@0
   448
    TBool iInstantFpsEnabled;
sl@0
   449
    RArray<TTimeIntervalMicroSeconds> iInstantFpsList;
sl@0
   450
    RFile iFpsFile;
sl@0
   451
sl@0
   452
	
sl@0
   453
	// Memory check
sl@0
   454
	TInt iMemAlloc;
sl@0
   455
	TInt iMemDelete;
sl@0
   456
	
sl@0
   457
    
sl@0
   458
    TInt32 iDataChunkSize;
sl@0
   459
    //Fbs
sl@0
   460
sl@0
   461
    CFbsScreenDevice* iScreenDevice;
sl@0
   462
    
sl@0
   463
    CActiveSchedulerWait* iScheduler;      //Nested scheduler
sl@0
   464
    
sl@0
   465
    TTime							iTime;
sl@0
   466
	TDateTime						iTimeBeforeDecoding;
sl@0
   467
	TDateTime						iTimeAfterDecoding;	
sl@0
   468
	//TInt							iNumFramesDecoded;
sl@0
   469
	//TUint64							iTotalTime;
sl@0
   470
	//TBool 							iIsBeforeTimeUsed;
sl@0
   471
	TUint64							iBeforeDecodingTime;
sl@0
   472
	RArray<TUint64>					iBeforeDecoingTimesQueue;
sl@0
   473
    TUint							iFrame;
sl@0
   474
    //	TInt							iLength;
sl@0
   475
	//TBool							iFirstTime;
sl@0
   476
	TBool                           iNumFreeBufsFirstTime;
sl@0
   477
	TTimeIntervalMicroSeconds		iTimeToPlay;
sl@0
   478
    TTimeIntervalMicroSeconds		iPresentationTimestamp;
sl@0
   479
	TBool							iNoOfFreeBuffFlag;
sl@0
   480
	
sl@0
   481
	
sl@0
   482
	TInt tempFrame;
sl@0
   483
sl@0
   484
	TFLVFileType                    iFLVFileType;
sl@0
   485
    };
sl@0
   486
sl@0
   487
sl@0
   488
sl@0
   489
sl@0
   490
/**
sl@0
   491
*  Video Decoder Test Engine AO
sl@0
   492
*  Provides async services
sl@0
   493
*  @lib 
sl@0
   494
*  @since 
sl@0
   495
*/
sl@0
   496
sl@0
   497
class CVDecTestAO : public CActive
sl@0
   498
{
sl@0
   499
	public:
sl@0
   500
		CVDecTestAO(CVDecTestEngine* aTestEngine);
sl@0
   501
  		~CVDecTestAO();
sl@0
   502
  		void RequestData();
sl@0
   503
	private:
sl@0
   504
		void RunL();
sl@0
   505
  		void DoCancel();
sl@0
   506
sl@0
   507
	private:
sl@0
   508
  		CVDecTestEngine* iTestEngine;
sl@0
   509
  	    
sl@0
   510
};
sl@0
   511
sl@0
   512
sl@0
   513
sl@0
   514
sl@0
   515
#endif