tsrc/xmltestharness/xmlclient/src/videobufferhandler.h
changeset 0 0e4a32b9112d
equal deleted inserted replaced
-1:000000000000 0:0e4a32b9112d
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VIDEOBUFFERHANDLER_H
       
    21 #define VIDEOBUFFERHANDLER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32msgqueue.h>
       
    25 #include <f32file.h>
       
    26 #include <openmax/il/extensions/omxilsymbianbuffersextensions.h>
       
    27 #include <multimedia/mmfbuffershared.h>
       
    28 #include <openmax/il/khronos/v1_x/OMX_Component.h>
       
    29 
       
    30 NONSHARABLE_CLASS(CVideoBufferHandler) : public CActive
       
    31 	{
       
    32 public:
       
    33 	virtual ~CVideoBufferHandler();
       
    34 	static CVideoBufferHandler* NewL(TDesC& aFilename, OMX_SYMBIAN_PARAM_3PLANE_CHUNK_DATA& aChunkDataMsg, const OMX_SYMBIAN_PARAM_BUFFER_SIZE& aBufferSize, OMX_PARAM_PORTDEFINITIONTYPE& portDef);
       
    35 		
       
    36 public: 
       
    37 	void Start();
       
    38 	void ChangeFilledBufferLength(TInt aLength);
       
    39 	void SetSendInvalidBufferId(TInt aSendInvalidBufferId);
       
    40 
       
    41 protected:
       
    42 	CVideoBufferHandler(TDesC& aFilename);
       
    43 	
       
    44 private:
       
    45 	void ConstructL(OMX_SYMBIAN_PARAM_3PLANE_CHUNK_DATA& aChunkDataMsg, const OMX_SYMBIAN_PARAM_BUFFER_SIZE& aBufferSize, OMX_PARAM_PORTDEFINITIONTYPE& portDef);
       
    46 		
       
    47 	// From CActive
       
    48 	void RunL();
       
    49 	void DoCancel();
       
    50 
       
    51 protected:
       
    52 	RMsgQueue<TFilledBufferHeaderV2> iReceiveBuffer;
       
    53 	RMsgQueue<TFilledBufferHeaderV2> iSendBuffer;
       
    54 	TMMSharedChunkBufConfig iBufConfig;
       
    55 	TPtr8 iReadDes;
       
    56 
       
    57 	RChunk iBufferChunk;
       
    58 	TBuf<KMaxFileName> iFileName;
       
    59 	RFile iFileSource;
       
    60 	RFs iFs;
       
    61 	TBool iFirstBuffer;
       
    62 	TBool iChangeFileBufferLength;
       
    63 	TInt iFileBufferLengthTestValue;
       
    64 	TInt iSendInvalidBufferId;
       
    65 	TInt iTimeStamp;	
       
    66 	};
       
    67 
       
    68 #endif // VIDEOBUFFERHANDLER_H