omxilcomp/omxilgeneric/filesource/tests/unit/te_omx_filesource_audio.xml
changeset 0 58be5850fb6c
child 4 46e224560be8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omxilcomp/omxilgeneric/filesource/tests/unit/te_omx_filesource_audio.xml	Thu Sep 02 20:13:57 2010 +0300
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+	Copyright (c) NOKIA 2009. All rights reserved.
+	file Source Sink Audio tests for OpenMAX IL.
+	
+	Expected Result:
+	BasicOperation				Pass
+	GetFilenameNoFileSet_filesource		Fail	OMX_ErrorNotReady
+	GetFilenameOverFlow_filesource		Fail	OMX_ErrorBadParameter
+	ChangeEncodeType_filesource		Pass		
+	ChangeInvalidEncodeType_filesource	Fail	OMX_ErrorUnsupportedSetting
+	BasicOperation_nofilename_filesource	Pass
+
+-->
+
+<TestSet>
+
+	<!--  ->  
+		File Source Audio -> 	File Sink Audio	 	
+	-->
+	<Test name="BasicOperation">
+		<!-- Simple file read\write testcase: all comps. to IDLE then to EXECUTING then 3 secs later to IDLE
+			 -->
+		<LoadComponent comp="filesink" name="OMX.NOKIA.AUDIO.FILESINK" />
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+		
+		<SetupTunnel output="filesource:0" input="filesink:0" />
+		<BufferSupplierOverride output="filesource:0" input="filesink:0" supplier="output" />
+		
+		<SetFilename comp="filesink" filename="C:\omxil\data\aac_same_audio.stream" />
+		
+		<SetFilename comp="filesource" filename="C:\omxil\data\aac.stream" />
+		<GetFilename comp="filesource" filename="C:\omxil\data\aab.stream"/>	
+
+		<IgnoreEvent comp="filesink" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+		<IgnoreEvent comp="filesource" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+		
+		<IgnoreEvent comp="filesink" event="OMX_EventBufferFlag" nData1="0x00000000 " nData2="0x00000001" nData3="0"/>
+		<IgnoreEvent comp="filesource" event="OMX_EventBufferFlag" nData1="0x00000000 " nData2="0x00000001" nData3="0"/>
+		
+		<AllTransition state="idle" order="auto"/>
+		<AllTransition state="executing" order="auto" />
+		<Wait delaytime="3000000" />
+		<AllTransition state="idle" order="auto"/>
+		<AllTransition state="loaded" order="auto"/>
+	</Test>
+	
+	
+	<Test name="GetFilenameNoFileSet_filesource">
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+		<!--OMX_ErrorNotReady-->
+		<ExpectEvent comp="filesource" event="Error" nData1="0x80001010" nData2="0"/>
+		<GetFilename comp="filesource" filename="C:\omxil\data\aab.stream" expectedomxerr="OMX_ErrorNotReady"/>
+	</Test>
+	
+	<Test name="GetFilenameOverFlow_filesource">
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+		<!--OMX_ErrorBadParameter-->
+		
+		<SetFilename comp="filesource" filename="C:\omxil\data\aac.stream" />
+		<IgnoreEvent comp="filesource" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+		
+		<ExpectEvent comp="filesource" event="Error" nData1="0x80001005" nData2="0" />
+		<GetFilename comp="filesource" filename="C:\omxil\data\aa.stream" expectedomxerr="OMX_ErrorBadParameter"/>
+	</Test>
+	
+	
+	
+	<Test name="ChangeEncodeType_filesource">
+	<!-- expected result :Pass -->
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+		<!--Pass-->
+		<SetAudioPortDef port="filesource:0" codingType="unused" /> 
+		<IgnoreEvent comp="filesource" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+	</Test>
+	
+	
+	<Test name="ChangeInvalidEncodeType_filesource">
+	<!-- expected result :fail OMX_ErrorUnsupportedSetting-->
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+		<!--Pass-->
+		<SetAudioPortDef port="filesource:0" codingType="pcm" expectedomxerr="OMX_ErrorUnsupportedSetting"/> 
+		<IgnoreEvent comp="filesource" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+	</Test>
+	
+	<Test name="BasicOperation_nofilename_filesource">
+		<!-- Simple file read\write testcase: all comps. to IDLE then to EXECUTING then 3 secs later to IDLE
+		 no filename is set for the file source -->
+		<LoadComponent comp="filesink" name="OMX.NOKIA.AUDIO.FILESINK" />
+		<LoadComponent comp="filesource" name="OMX.NOKIA.AUDIO.FILESOURCE" />
+
+		<SetupTunnel output="filesource:0" input="filesink:0" />
+		<BufferSupplierOverride output="filesource:0" input="filesink:0" supplier="output" />
+
+		<SetFilename comp="filesink" filename="C:\omxil\data\aac_audio_invalid.stream" />
+		
+		<IgnoreEvent comp="filesink" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+		<IgnoreEvent comp="filesource" event="PortSettingsChanged" nData1="0x02000001" nData2="0" nData3="0"/>
+
+		<IgnoreEvent comp="filesink" event="OMX_EventBufferFlag" nData1="0x00000000 " nData2="0x00000001" nData3="0"/>
+		<IgnoreEvent comp="filesource" event="OMX_EventBufferFlag" nData1="0x00000000 " nData2="0x00000001" nData3="0"/>
+
+		<AllTransition state="idle" order="auto"/>
+		<AllTransition state="executing" order="auto" />
+		<Wait delaytime="3000000" />
+		<AllTransition state="idle" order="auto"/>
+		<AllTransition state="loaded" order="auto"/>
+	</Test>
+	
+	
+</TestSet>
+
+
+