tsrc/xmltestharness/xmlclient/src/omxscriptparser.h
changeset 0 0e4a32b9112d
child 5 fb6faddbb212
equal deleted inserted replaced
-1:000000000000 0:0e4a32b9112d
       
     1 /*
       
     2 * Copyright (c) 2008 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 #ifndef OMXSCRIPTPARSER_H_
       
    20 #define OMXSCRIPTPARSER_H_
       
    21 
       
    22 #include <f32file.h>
       
    23 #include <xml/contenthandler.h>
       
    24 #include <xml/documentparameters.h>
       
    25 
       
    26 #include <openmax/il/khronos/v1_x/OMX_Component.h>
       
    27 
       
    28 
       
    29 // a bit naughty, bit it will do for now
       
    30 using namespace Xml;
       
    31 
       
    32 enum TVideoFitMode
       
    33 	{
       
    34 	EVideoFitCentre,
       
    35 	EVideoFitScaleAndCentre,
       
    36 	EVideoFitRotateScaleAndCentre
       
    37 	};
       
    38 
       
    39 enum TTransitionOrder
       
    40 	{
       
    41 	ELoadOrder,
       
    42 	EAutoOrder
       
    43 	};
       
    44 
       
    45 /**
       
    46  * High-level elementary test actions. This interface can be driven by the COmxScriptParser.
       
    47  */
       
    48 class MOmxScriptIf
       
    49 	{
       
    50 public:
       
    51 	virtual TBool MosLoadComponentL(const TDesC8& aComp, const TDesC8& aName, TBool aBaseProfile, const TDesC8* aBaseImpl, TBool aLoadInCoreServerThread) = 0;
       
    52 	virtual TBool MosSetupTunnel(const TDesC8& aSourceComp, TInt aSourcePort,
       
    53 	                             const TDesC8& aSinkComp, TInt aSinkPort, OMX_ERRORTYPE aExpectedError) = 0;
       
    54 	virtual TBool MosSetupNonTunnel(const TDesC8& aSourceComp, TInt aSourcePort,
       
    55                                   const TDesC8& aSinkComp, TInt aSinkPort,
       
    56                                   OMX_BUFFERSUPPLIERTYPE aSupplier) = 0;
       
    57 	virtual TBool MosSetWindowL(const TDesC8& aComp) = 0;
       
    58 	virtual TBool MosAllTransitionL(OMX_STATETYPE aState,OMX_ERRORTYPE aExpectedError, TTransitionOrder order) = 0;
       
    59 	virtual TBool MosTransition(const TDesC8& aComp, OMX_STATETYPE aState, TBool aAsync) = 0;	
       
    60 	virtual TBool MosFailingTransition(const TDesC8& aComp, OMX_STATETYPE aState, OMX_ERRORTYPE aExpectedError) = 0;
       
    61 	virtual TBool MosWaitEOS() = 0;
       
    62 	virtual TBool MosSetFilename(const TDesC8& aComp, const TDesC& aFilename) = 0;
       
    63 	//meena
       
    64 	virtual TBool MosSetFilename_bellagio(const TDesC8& aComp, char *aFilename) = 0;
       
    65 	
       
    66 	virtual	TBool MosGetFilename(const TDesC8& aComp, TDesC& aFilename, OMX_ERRORTYPE aExpectedError) = 0;
       
    67 	virtual	TBool MosSetBadFilename(const TDesC8& aComp) = 0;
       
    68 
       
    69 	virtual TBool MosSetBufferCount(const TDesC8& aComp, TInt aPortIndex, TInt aCount, OMX_ERRORTYPE aExpectedError) = 0;
       
    70 	virtual TBool MosCompareFilesL(const TDesC& aFileOne, const TDesC& aFileTwo) = 0;
       
    71     virtual TBool MosFilterAndCompareFilesL(const TDesC& aFileOne, const TDesC8& aFile1Filter1, const TDesC8& aFile1Filter2, const TDesC8& aFile1Filter3,
       
    72                                                 const TDesC& aFileTwo, const TDesC8& aFile2Filter1, const TDesC8& aFile2Filter2, const TDesC8& aFile2Filter3) = 0;	
       
    73 	virtual TBool MosBufferSupplierOverrideL(const TDesC8& aSourceComp, TInt aSourcePort,
       
    74 			                                 const TDesC8& aSinkComp, TInt aSinkPort,
       
    75 			                                 OMX_BUFFERSUPPLIERTYPE aSupplier, 
       
    76 			                                 OMX_ERRORTYPE aExpectedSourceError, OMX_ERRORTYPE aExpectedSinkError) = 0;
       
    77 	virtual TBool MosSetVideoPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_COLOR_FORMATTYPE* aColorFormat, OMX_VIDEO_CODINGTYPE* aCodingType, TInt aStride, TReal aFps, OMX_ERRORTYPE aExpectedError) = 0;
       
    78 	virtual TBool MosSetCameraOneShotL(const TDesC8& aComp, TInt aIsOneShot, OMX_ERRORTYPE aExpectedError) = 0;
       
    79 	virtual TBool MosSetCameraCaptureL(const TDesC8& aComp, TInt aPortIndex, TInt aIsCapturing, OMX_ERRORTYPE aExpectedError) = 0;
       
    80 	virtual void MosParseError(const TDesC& aError) = 0;
       
    81 	virtual TBool MosWaitL(TTimeIntervalMicroSeconds32 aDelay) = 0;
       
    82 	virtual TBool MosExpectEventL(const TDesC8& aComp, OMX_EVENTTYPE aEvent, TUint32 nData1, TUint32 nData2) = 0;
       
    83 	virtual TBool MosWaitForAllEventsL() = 0;
       
    84 	virtual TBool MosCheckStateL(const TDesC8& aComp, OMX_STATETYPE aState) = 0;
       
    85 	virtual TBool MosCheckVideoPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aWidth, TInt aHeight, OMX_VIDEO_CODINGTYPE aCoding, OMX_COLOR_FORMATTYPE aColorFormat) = 0;
       
    86 	virtual TBool MosCheckMetaDataL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData) = 0;
       
    87 	virtual TBool MosGetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData) = 0;
       
    88 	virtual TBool MosSetParameterUnknownIndexTypeL(const TDesC8& aComp, TInt aPortIndex, OMX_METADATASCOPETYPE aScope, const TDesC8& aAtomType, TUint32 aAtomIndex, const TDesC8& aData) = 0;
       
    89 
       
    90 	virtual TBool MosDisablePort(const TDesC8& aComp, TInt aPortIndex) = 0;
       
    91 	virtual TBool MosEnablePort(const TDesC8& aComp, TInt aPortIndex) = 0;
       
    92 	virtual TBool MosIgnoreEventL(const TDesC8& aComp, OMX_EVENTTYPE aEvent, TUint32 nData1, TUint32 nData2) = 0;
       
    93 	virtual TBool MosSetPcmAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitsperSample, OMX_NUMERICALDATATYPE aNumData, OMX_ENDIANTYPE aEndian, OMX_BOOL* aInterleaved, const TDesC8* aEncoding) = 0;
       
    94 	virtual TBool MosSetConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume, OMX_ERRORTYPE aExpectedError) = 0;
       
    95 	virtual TBool MosCheckConfigAudioVolumeL(const TDesC8& aComp, TInt aPortIndex, TBool aLinear, TInt aMinVolume, TInt aMaxVolume, TInt aVolume) = 0;
       
    96 	virtual TBool MosCheckConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute) = 0;
       
    97 	virtual TBool MosSetConfigAudioMuteL(const TDesC8& aComp, TInt aPortIndex, TBool aMute) = 0;
       
    98 	virtual TBool MosSetAacAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitRate, TInt aAudioBandwidth, TInt aFrameLength, TInt aAacTools, TInt aAacErTools, TInt aProfile, TInt aStreamFormat, TInt aChannelMode) = 0;
       
    99 	virtual TBool MosSetAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, OMX_AUDIO_CODINGTYPE* aCodingType, OMX_ERRORTYPE aExpectedError) = 0;
       
   100 	virtual TBool MosSetRefClockTypeL(const TDesC8& aComp, OMX_TIME_REFCLOCKTYPE aRefClockType) = 0;
       
   101 	virtual TBool MosSetClockTimeScale(const TDesC8& aComp, OMX_S32 aScale) = 0;
       
   102 	virtual TBool MosSetClockStateL(const TDesC8& aComp, OMX_TIME_CLOCKSTATE aClockState, TInt aStartTime, TInt aOffset, TUint32 aWaitMask) = 0;
       
   103 	virtual TBool MosCheckClockStateL(const TDesC8& aComp, OMX_TIME_CLOCKSTATE aClockState) = 0;
       
   104 	virtual TBool MosCheckTimePositionL(const TDesC8& aComp, TInt aPortIndex, TInt aTimestamp) = 0;
       
   105 	virtual TBool MosSetTimePositionL(const TDesC8& aComp, TInt aPortIndex, TInt aTimestamp) = 0;
       
   106 	virtual TBool MosSetClientStartTimeL(const TDesC8& aComp, TInt aPortIndex, TInt aTimestamp) = 0;
       
   107 	virtual TBool MosSetCurrentAudioReferenceTimeL(const TDesC8& aComp, TInt aPortIndex, TInt aTimestamp) = 0;
       
   108 	virtual TBool MosSetVideoFitModeL(TVideoFitMode aVideoFitMode) = 0;
       
   109 	virtual TBool MosNegativeSetDataChunk(const TDesC8& aComp, OMX_ERRORTYPE aExpectedError, TInt aExpectedSystemError) = 0;
       
   110 	virtual TBool MosSetBufferSize(const TDesC8& aComp, TInt aPortIndex, TInt aCount, OMX_ERRORTYPE aExpectedError) = 0;
       
   111 	virtual TBool MosGetAndCompareBufferCount(const TDesC8& aComp, TInt aPortIndex, TInt aDataToCompare) = 0;
       
   112 	virtual TBool MosGetAndCompareBufferSize(const TDesC8& aComp, TInt aPortIndex, TInt aDataToCompare) = 0;
       
   113 	virtual TBool MosFlushBuffer(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError) = 0;
       
   114 	virtual TBool MosForceBufferSourceFlushBufferL(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError) = 0;
       
   115 	virtual TBool MosForceBufferSinkFlushBuffer(const TDesC8& aComp, TInt aPortIndex, OMX_ERRORTYPE aExpectedError) = 0;
       
   116 	virtual TBool MosSetActiveStream(const TDesC8& aComp, TUint32 aPortIndex)= 0;
       
   117 	virtual TBool MosGetActiveStream(const TDesC8& aComp, TUint32 aPortIndex) = 0;
       
   118 	virtual TBool MosSetDroppedFrameEvent(const TDesC8& aComp, const TDesC8& aAction) = 0;
       
   119 	virtual TBool MosCheckFrameCountL(const TDesC& aFilename, TInt aCount) = 0;
       
   120 	virtual TBool MosMarkBuffer(const TDesC8& aComp, TInt aPortIndex, const TDesC8& aTargetComp, TInt markData) = 0;
       
   121 	// mpeg4 encoder component
       
   122     virtual TBool MosSetVideoEncQuantL(const TDesC8& aComp, TInt aPortIndex, TInt aQpb) = 0;
       
   123     virtual TBool MosSetVideoEncMotionVectL(const TDesC8& aComp, TInt aPortIndex, TInt aAccuracy, TInt aSxSearchrange, TInt aSySearchrange, OMX_ERRORTYPE aExpectedError) = 0;
       
   124     virtual TBool MosSetVideoEncMpeg4TypeL(const TDesC8& aComp, TInt aPortIndex, OMX_VIDEO_MPEG4PROFILETYPE aMpeg4Profile, OMX_VIDEO_MPEG4LEVELTYPE aMpeg4Level, OMX_ERRORTYPE aExpectedError) = 0;
       
   125 	virtual TBool MosSetVideoEncBitRateL(const TDesC8& aComp, TInt aPortIndex, OMX_VIDEO_CONTROLRATETYPE aControlRate, TInt aTargetBitrate, OMX_ERRORTYPE aExpectedError) = 0;
       
   126     virtual TBool MosChangeFilledBufferLength(const TDesC8& aComp, TInt aValue) = 0;
       
   127     virtual TBool MosSetOMX_SymbianIndexParamBufferMsgQueueData(const TDesC8& aComp, OMX_ERRORTYPE aExpectedError) = 0;
       
   128     virtual TBool MosGetExtensionIndex(const TDesC8& aComp, const TDesC8& aParameterName, OMX_ERRORTYPE aExpectedError) = 0;
       
   129 
       
   130     virtual TBool MosCheckTimeClockState(const TDesC8& aComp, OMX_TIME_CLOCKSTATE aExpectedState) = 0;
       
   131     virtual TBool MosCheckMediaTime(const TDesC8& aComp, TInt aPortIndex, OMX_TICKS aMediaTime, TBool aMoreThan) = 0;
       
   132     
       
   133     // Buffer component handler
       
   134 	virtual TBool InitialiseBufferHandlerL(const TDesC8& aComp, TDesC& aName, const TDesC8* aType) = 0;
       
   135 	virtual void StartBufferHandler() = 0;
       
   136 	virtual void StopBufferHandler() = 0;
       
   137 	virtual TBool InitialiseBufferSinkHandlerL(const TDesC8& aComp, TDesC& aName) = 0;
       
   138     virtual void StartBufferSinkHandler() = 0;
       
   139     virtual void StopBufferSinkHandler() = 0;
       
   140     virtual void SendInvalidBufferId(TInt aInvalidId) = 0;
       
   141 
       
   142 	virtual TBool MosWaitEOS(const TDesC8& aComp) = 0;
       
   143 
       
   144 	virtual TBool MosSetAACProfileL(const TDesC8& aComp, TInt aPortIndex, TInt aChannels, TInt aSamplingRate, TInt aBitRate, TInt aAudioBandwidth, TInt aFrameLength, TInt aAACTools, TInt aAACERTools, OMX_AUDIO_AACPROFILETYPE aProfile, OMX_AUDIO_AACSTREAMFORMATTYPE aStreamFormat, OMX_AUDIO_CHANNELMODETYPE aChannelMode) = 0;
       
   145 	virtual TBool MosSetupBufferForPortL(const TDesC8& comp,TInt aPortIndex, const TDesC& aFileName,TInt aHeaderLength,OMX_BUFFERSUPPLIERTYPE aSupplier) = 0;
       
   146 	
       
   147 	// Camera
       
   148 
       
   149 	virtual TBool MosSetSensorModeTypeL(const TDesC8& aComp, TInt aPort, TInt aFrameRate, TBool aOneShot, TInt aWidth, TInt aHeight) = 0;
       
   150 	virtual TBool MosSetCaptureModeTypeL(const TDesC8& aComp, TInt aPort, TBool aContinuous, TBool aFrameLimited, TInt aFrameLimit) = 0;
       
   151 	
       
   152 	
       
   153 	// Debugging/Utility functions.
       
   154 	virtual TBool MosDeleteFileL(const TDesC& aFileName, TBool aFileMustExist) = 0;
       
   155 	virtual TBool MosLogAllEventsL() = 0;
       
   156 
       
   157 	// Methods supporting generic Base Profile communications support with components
       
   158 	virtual TBool MosBaseSupportPortL(const TDesC8& aComp, TInt aPortIndex) = 0;
       
   159 	virtual TBool MosBaseSetAutonomous(const TDesC8& aComp, TInt aPortIndex, TBool aEnabled) = 0;
       
   160 	virtual TBool MosBaseAllocateBuffersL(const TDesC8& aComp, TInt aPortIndex, TInt aNumberBuffers) = 0;
       
   161 	virtual TBool MosBaseFreeAllocatedBuffersL(const TDesC8& aComp) = 0;
       
   162 	virtual TBool MosBaseSetBufSupplier(const TDesC8& aComp, TInt aPortIndex, TBool aComponentSupplier) = 0;
       
   163 	virtual TBool MosBaseFillThisBuffer(const TDesC8& aComp, TInt aPortIndex, TInt aPortRelBufIndex) = 0;
       
   164     virtual TBool MosBaseEmptyThisBuffer(const TDesC8& aComp, TInt aPortIndex, TInt aPortRelBufIndex) = 0;
       
   165 	virtual TBool MosBaseWaitForBuffer(const TDesC8& aComp, TInt aPortIndex, TInt aPortRelBufIndex) = 0;	
       
   166 
       
   167 	// Methods supporting the Timestamp checking implementation for Base Profile testing
       
   168 	virtual TBool MosBaseTimestampPassClock(const TDesC8& aCompReceiving, const TDesC8& aClockCompToPass) = 0;
       
   169 	virtual TBool MosBaseTimestampCheckTimestampL(const TDesC8& aComp, TInt aPortIndex, TUint aExpectedTime, TUint aTolerance) = 0;
       
   170 	virtual TBool MosBaseTimestampCompareWithRefClockL(const TDesC8& aComp, TInt aPortIndex, TUint aTolerance) = 0;
       
   171 	
       
   172 	virtual TBool MosStartBuffersforPort(  const TDesC8& aComp, TInt aPortIndex) = 0;
       
   173 #ifdef OLD_ADPCM_EXTENSION
       
   174 	virtual TBool MosSetAdPcmAudioPortDefL(const TDesC8& aComp, TInt aPortIndex, TInt aNumChannels, TInt aSamplingRate, TInt aBitsperSample) = 0;
       
   175     virtual TBool MosConfigAdPcmDecoderBlockAlign(const TDesC8& aComp, OMX_S32 aBlockAlign) = 0;
       
   176 #endif
       
   177 	};
       
   178 
       
   179 /**
       
   180  * This parses an XML file to drive the operation of a MOmxScriptIf.
       
   181  */
       
   182 NONSHARABLE_CLASS(COmxScriptParser) : public CBase, public Xml::MContentHandler
       
   183 	{
       
   184 public:
       
   185 	static COmxScriptParser* NewL(RFs& aFs, const TDesC& aFilename, MOmxScriptIf& aCallback);
       
   186 	~COmxScriptParser();
       
   187 	
       
   188 	TBool RunScriptL(const TDesC& aSectionName);
       
   189 
       
   190 	// Xml::MContentHandler interface
       
   191 	void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
       
   192 	void OnEndDocumentL(TInt aErrorCode);
       
   193 	void OnStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes, 
       
   194 			TInt aErrorCode);
       
   195 	void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
       
   196 	void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
       
   197 	void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, 
       
   198 			TInt aErrorCode);
       
   199 	void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
       
   200 	void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
       
   201 	void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
       
   202 	void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, 
       
   203 			TInt aErrorCode);
       
   204 	void OnError(TInt aErrorCode);
       
   205 	TAny* GetExtendedInterface(const TInt32 aUid);
       
   206 
       
   207 protected:
       
   208 	COmxScriptParser(RFs& aFs, MOmxScriptIf& aCallback);
       
   209 	void ConstructL(const TDesC& aFilename);
       
   210 	
       
   211 private:
       
   212 	static const TDesC8* FindAttribute(const RArray<RAttribute>& aArray, const TDesC8& aAttribName);
       
   213 	const TDesC8& FindAttributeL(const RArray<RAttribute>& aArray, const TDesC8& aAttribName);
       
   214 	static void ParseCompPortL(const TDesC8& aInput, TPtrC8& aNameOut, TInt& aPortOut);
       
   215 	static OMX_STATETYPE ParseOmxStateL(const TDesC8& aStateDes);
       
   216 	static OMX_BUFFERSUPPLIERTYPE ParseOmxSupplierL(const TDesC8& aSupplierDes, TBool aAllowUnspecified = EFalse);
       
   217 	void CheckForAbortL(TBool success);
       
   218 	static TInt ParseOptionalIntL(const RArray<RAttribute>& aArray, const TDesC8& aAttribName, TInt aDefaultValue);
       
   219 	static TReal ParseOptionalRealL(const RArray<RAttribute>& aArray, const TDesC8& aAttribName, TReal aDefaultValue);
       
   220 	static OMX_COLOR_FORMATTYPE ParseOmxColorFormatL(const TDesC8& aDes);
       
   221 	static OMX_EVENTTYPE ParseOmxEventL(const TDesC8& aEventDes);
       
   222 	static TUint32 ParseUint32L(const TDesC8& aDes);
       
   223 	static TReal32 ParseReal32L(const TDesC8& aDes);
       
   224 	static OMX_VIDEO_CODINGTYPE ParseOmxVideoCodingL(const TDesC8& aDes);
       
   225 	static TBool ParseOptionalBooleanL(const RArray<RAttribute>& aArray, const TDesC8& aAttribName, TBool aDefaultValue);
       
   226 	static TBool ParseBooleanL(const TDesC8& aBool);
       
   227 
       
   228 	static OMX_METADATASCOPETYPE ParseOmxScopeTypeL(const TDesC8& aScopeDes);
       
   229 	static OMX_AUDIO_CODINGTYPE ParseOmxAudioCodingL(const TDesC8& aDes);
       
   230 	static OMX_TIME_REFCLOCKTYPE ParseOmxRefClockTypeL(const TDesC8& aDes);
       
   231 	static OMX_TIME_CLOCKSTATE ParseOmxClockStateL(const TDesC8& aDes);
       
   232 	static TVideoFitMode ParseVideoFitModeL(const TDesC8& aMode);
       
   233 	static OMX_COMMANDTYPE ParseOmxCommandL(const TDesC8& aDes);
       
   234 	static OMX_ERRORTYPE ParseOmxErrorL(const TDesC8& aDes);
       
   235 	static TBool ParseBoolean(const TDesC8& aDes);
       
   236 
       
   237     static OMX_ERRORTYPE ParseOmxErrorCode(const TDesC8& aErrorCode);
       
   238     static OMX_VIDEO_MPEG4PROFILETYPE ParseOmxMpeg4ProfileL(const TDesC8& aDes);
       
   239     static OMX_VIDEO_MPEG4LEVELTYPE ParseOmxMpeg4LevelL(const TDesC8& aDes);
       
   240     static OMX_VIDEO_CONTROLRATETYPE ParseOmxControlRateL(const TDesC8& aDes);
       
   241 	static OMX_AUDIO_AACPROFILETYPE ParseOmxAACProfileL(const TDesC8& aProfileDes);
       
   242 	static OMX_AUDIO_AACSTREAMFORMATTYPE ParseOmxAACStreamFormatL(const TDesC8& aFormatDes);
       
   243 	static OMX_AUDIO_CHANNELMODETYPE ParseOmxAudioChannelModeL(const TDesC8& aChannelModeDes);
       
   244     static TInt ParseSystemErrorCode(const TDesC8& aErrorCode);
       
   245     static OMX_AUDIO_AACSTREAMFORMATTYPE ParseAacStreamFormatL(const TDesC8& aStreamFormatStr);
       
   246 	static OMX_NUMERICALDATATYPE ParseNumericalDataL(const TDesC8& aDes);
       
   247 	static OMX_ENDIANTYPE ParseEndianL(const TDesC8& aDes);
       
   248 	static OMX_BOOL ParseBoolL(const TDesC8& aDes);
       
   249 
       
   250 private:
       
   251 	RFs& iFs;
       
   252 	RBuf iFilename;
       
   253 	MOmxScriptIf& iCallback;
       
   254 	
       
   255 	// state to allow filtering for a specific section within the XML document
       
   256 	const TDesC* iSectionName;	// not owned
       
   257 	TBool iInTest;
       
   258 	TBool iFoundTest;
       
   259 	TBool iCallbackAborted;
       
   260 	};
       
   261 	
       
   262 #endif /*OMXSCRIPTPARSER_H_*/