diff options
60 files changed, 0 insertions, 8536 deletions
diff --git a/TC/_export_env.sh b/TC/_export_env.sh deleted file mode 100755 index 3089986..0000000 --- a/TC/_export_env.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -export ARCH=target - -export TET_INSTALL_PATH=/scratchbox/tetware -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 - -set $(date +%s) -FILE_NAME_EXTENSION=$1 - diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh deleted file mode 100755 index afeb412..0000000 --- a/TC/_export_target_env.sh +++ /dev/null @@ -1,15 +0,0 @@ -export ARCH=target - -export TET_INSTALL_PATH=/mnt/nfs/tetware -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 - -set $(data +s) -FILE_NAME_EXTENSION=$1 - diff --git a/TC/build.sh b/TC/build.sh deleted file mode 100755 index 2761b14..0000000 --- a/TC/build.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -#./_export_env.sh -export ARCH=target - -export TET_INSTALL_PATH=/scratchbox/tetware -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 - -set $(date +%s) -FILE_NAME_EXTENSION=$1 - -echo PATH=$PATH -echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH -echo TET_ROOT=$TET_ROOT -echo TET_SUITE_ROOT=$TET_SUITE_ROOT -echo ARCH=$ARCH - -RESULT_DIR=results-$ARCH -HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir $RESULT_DIR -mkdir $TET_SUITE_ROOT/utc/tet_xres - -tcc -c -p ./ -tcc -b -j $JOURNAL_RESULT -p ./ -grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT - diff --git a/TC/execute.sh b/TC/execute.sh deleted file mode 100755 index 078a91c..0000000 --- a/TC/execute.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -#./_export_target_env.sh -export ARCH=target - -export TET_INSTALL_PATH=/mnt/nfs/tetware -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 - -set $(date +%s) -FILE_NAME_EXTENSION=$1 - -echo PATH=$PATH -echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH -echo TET_ROOT=$TET_ROOT -echo TET_SUITE_ROOT=$TET_SUITE_ROOT -echo ARCH=$ARCH - -RESULT_DIR=results-$ARCH -HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir $RESULT_DIR - -tcc -e -j $JOURNAL_RESULT -p ./ -grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT - diff --git a/TC/making_new_tet_scen.py b/TC/making_new_tet_scen.py deleted file mode 100755 index 6c5b845..0000000 --- a/TC/making_new_tet_scen.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/python - -############################################# -# tet_scen auto generator -# -# ** argv[1] = TC root -############################################# - -import sys,string,os - - -write_file = open("tet_scen", 'w') - -# -# making new tet_scen -# -def making_tet_scen (filename): - #tmp_list = filename.strip().split('/') - n_filename = filename.replace(' ', '\\ ') - #print n_filename - #new_path = "/"+ sys.argv[1] +"/"+n_filename[2:-6] - new_path = "/"+n_filename[:-6] - #print new_path - file = open(filename, 'r') - lines = file.readlines() - for line in lines: - if len(line.strip()) > 1: - list = line.strip().split('/') - #print new_path + list[-1] - write_file.write("\t"+new_path+list[-1]+"\n") - -# -# usage() -# -def usage(): - print(" ") - print("./making_new_tet_scen.py tc_root") - print("Put the Test Case's root directory.") - print("Do not include '/' at the end") - print(" ") - -# -# main() -# -def main(): - if len(sys.argv) < 2: - usage() - sys.exit(0) - - os.system('find '+ sys.argv[1] +' -name "tslist" > tslist.txt') - - #write_file = open("tetscen", w) - write_file.write("# auto generated tet_scen\n") - write_file.write("all\n") - write_file.write("\t\"Starting Full Test Suite\"\n") - - for file in open("tslist.txt", 'r'): - #print file.strip() - making_tet_scen(file.strip()) - - write_file.write("\t\"Completed Full Test Suite\"\n") - write_file.write("# EOF\n") - write_file.close() - print(" ") - print("==============================") - print("New tet_scen file is made~~~~") - print("==============================") - print(" ") -main() diff --git a/TC/tet_scen b/TC/tet_scen deleted file mode 100755 index 38366c3..0000000 --- a/TC/tet_scen +++ /dev/null @@ -1,26 +0,0 @@ -# auto generated tet_scen -all - "Starting MMFW Camcorder APIs test" - /utc/uts_mm_camcorder_cancel - /utc/uts_mm_camcorder_capture_start - /utc/uts_mm_camcorder_capture_stop - /utc/uts_mm_camcorder_commit - /utc/uts_mm_camcorder_create - /utc/uts_mm_camcorder_destroy - /utc/uts_mm_camcorder_get_attrs - /utc/uts_mm_camcorder_get_state - /utc/uts_mm_camcorder_pause - /utc/uts_mm_camcorder_realize - /utc/uts_mm_camcorder_record - /utc/uts_mm_camcorder_set_attrs - /utc/uts_mm_camcorder_set_message_callback - /utc/uts_mm_camcorder_set_video_capture_callback - /utc/uts_mm_camcorder_set_video_stream_callback - /utc/uts_mm_camcorder_start - /utc/uts_mm_camcorder_start_focusing - /utc/uts_mm_camcorder_stop - /utc/uts_mm_camcorder_stop_focusing - /utc/uts_mm_camcorder_unrealize - /utc/uts_mm_camcorder_get_attr_info - "Completed MMFW Camcorder APIs test" -# EOF diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg deleted file mode 100644 index d947407..0000000 --- a/TC/tetbuild.cfg +++ /dev/null @@ -1,6 +0,0 @@ -TET_OUTPUT_CAPTURE=True -TET_BUILD_TOOL=make -TET_BUILD_FILE=-f Makefile -TET_API_COMPLIANT=True -TET_PASS_TC_NAME=True - diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg deleted file mode 100644 index 97c71c7..0000000 --- a/TC/tetclean.cfg +++ /dev/null @@ -1,6 +0,0 @@ -TET_OUTPUT_CAPTURE=True -TET_BUILD_TOOL=make clean -TET_BUILD_FILE=Makefile -TET_API_COMPLIANT=True -TET_PASS_TC_NAME=True - diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg deleted file mode 100644 index ed4e15d..0000000 --- a/TC/tetexec.cfg +++ /dev/null @@ -1,6 +0,0 @@ -TET_OUTPUT_CAPTURE=True -TET_BUILD_TOOL= -TET_BUILD_FILE= -TET_API_COMPLIANT=True -TET_PASS_TC_NAME=True - diff --git a/TC/utc/.cproject b/TC/utc/.cproject deleted file mode 100755 index 1dadf26..0000000 --- a/TC/utc/.cproject +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="0.1424057240">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1424057240" moduleId="org.eclipse.cdt.core.settings" name="Default">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration buildProperties="" description="" id="0.1424057240" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
- <folderInfo id="0.1424057240." name="/" resourcePath="">
- <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.90615989" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
- <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.90615989.2030895102" name=""/>
- <builder id="org.eclipse.cdt.build.core.settings.default.builder.1718853552" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.libs.518106426" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.280825162" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.350119631" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- <tool id="org.eclipse.cdt.build.core.settings.holder.143986256" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.827177070" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- <tool id="org.eclipse.cdt.build.core.settings.holder.469051175" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.655660498" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
- </tool>
- </toolChain>
- </folderInfo>
- </configuration>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="makefileGenerator">
- <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <scannerConfigBuildInfo instanceId="0.1424057240">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="makefileGenerator">
- <runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
- <buildOutputProvider>
- <openAction enabled="true" filePath=""/>
- <parser enabled="true"/>
- </buildOutputProvider>
- <scannerInfoProvider id="specsFile">
- <runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
- <parser enabled="true"/>
- </scannerInfoProvider>
- </profile>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="utc.null.1911877445" name="utc"/>
- </storageModule>
-</cproject>
diff --git a/TC/utc/.project b/TC/utc/.project deleted file mode 100755 index c1905de..0000000 --- a/TC/utc/.project +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>utc</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
-</projectDescription>
diff --git a/TC/utc/Makefile b/TC/utc/Makefile deleted file mode 100755 index 17c28c1..0000000 --- a/TC/utc/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -ifeq ($(ARCH),target) - PKG_CONFIG_PATH=/usr/lib/pkgconfig - export PKG_CONFIG_PATH - CC=arm-linux-gcc -Wall - CXX=arm-linux-g++ -Wall -else - PKG_CONFIG_PATH=/usr/lib/pkgconfig - export PKG_CONFIG_PATH - CC=gcc -Wall - CXX=gcc -Wall -endif - -TS1=uts_mm_camcorder_cancel -TS2=uts_mm_camcorder_capture_start -TS3=uts_mm_camcorder_capture_stop -TS4=uts_mm_camcorder_commit -TS5=uts_mm_camcorder_create -TS6=uts_mm_camcorder_destroy -TS7=uts_mm_camcorder_get_attrs -TS8=uts_mm_camcorder_get_state -TS9=uts_mm_camcorder_pause -TS10=uts_mm_camcorder_realize -TS11=uts_mm_camcorder_record -TS12=uts_mm_camcorder_set_attrs -TS13=uts_mm_camcorder_set_message_callback -TS14=uts_mm_camcorder_set_video_capture_callback -TS15=uts_mm_camcorder_set_video_stream_callback -TS16=uts_mm_camcorder_start -TS17=uts_mm_camcorder_start_focusing -TS18=uts_mm_camcorder_stop -TS19=uts_mm_camcorder_stop_focusing -TS20=uts_mm_camcorder_unrealize -TS21=uts_mm_camcorder_get_attr_info - -LIBS = `pkg-config --libs mm-camcorder` - -LIBS +=-L/usr/lib/:/usr/lib/pkgconfig - -#LIBS +=/scratchbox/tetware/tetware-target/lib/tet3/tcm_s.o -#LIBS +=-L/scratchbox/tetware/tetware-target/lib/lib/tet3 -ltcm_s -#LIBS +=-L/scratchbox/tetware/tetware-target/lib/lib/tet3/ -lapi_s -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3/ -lapi_s -#LIBS +=/scratchbox/users/root/home/share/work_box/TETware3.7/tetware-target/src/tet3/apishlib/libapi_s.so -#/scratchbox/TETware3.7/tetware-simulator/lib/tet3 - -INCS = -I. `pkg-config --cflags mm-camcorder` - - -#INCS += -I/scratchbox/tetware/tetware-target/lib/inc/tet3 -INCS += -I$(TET_ROOT)/inc/tet3 -#INCS += -I/usr/include/mmf -I/scratchbox/tetware/tetware-target/src/tet3/inc -I/scratchbox/tetware/tetware-target/inc/tet3 -INCS += -I/usr/include/mmf - -CFLAGS = $(INCS) -CC += $(CFLAGS) -LDFLAGS = $(LIBS) - - -all: $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS19) $(TS20) $(TS21) $(TS22) $(TS23) $(TS24) - - -$(TS1): uts_mm_camcorder_cancel.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS1) uts_mm_camcorder_utils.c uts_mm_camcorder_cancel.c $(LDFLAGS) - -$(TS2): uts_mm_camcorder_capture_start.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS2) uts_mm_camcorder_utils.c uts_mm_camcorder_capture_start.c $(LDFLAGS) - -$(TS3): uts_mm_camcorder_capture_stop.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS3) uts_mm_camcorder_utils.c uts_mm_camcorder_capture_stop.c $(LDFLAGS) - -$(TS4): uts_mm_camcorder_commit.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS4) uts_mm_camcorder_utils.c uts_mm_camcorder_commit.c $(LDFLAGS) - -$(TS5): uts_mm_camcorder_create.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS5) uts_mm_camcorder_utils.c uts_mm_camcorder_create.c $(LDFLAGS) - -$(TS6): uts_mm_camcorder_destroy.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS6) uts_mm_camcorder_utils.c uts_mm_camcorder_destroy.c $(LDFLAGS) - -$(TS7): uts_mm_camcorder_get_attrs.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS7) uts_mm_camcorder_utils.c uts_mm_camcorder_get_attrs.c $(LDFLAGS) - -$(TS8): uts_mm_camcorder_get_state.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS8) uts_mm_camcorder_utils.c uts_mm_camcorder_get_state.c $(LDFLAGS) - -$(TS9): uts_mm_camcorder_pause.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS9) uts_mm_camcorder_utils.c uts_mm_camcorder_pause.c $(LDFLAGS) - -$(TS10): uts_mm_camcorder_realize.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS10) uts_mm_camcorder_utils.c uts_mm_camcorder_realize.c $(LDFLAGS) - -$(TS11): uts_mm_camcorder_record.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS11) uts_mm_camcorder_utils.c uts_mm_camcorder_record.c $(LDFLAGS) - -$(TS12): uts_mm_camcorder_set_attrs.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS12) uts_mm_camcorder_utils.c uts_mm_camcorder_set_attrs.c $(LDFLAGS) - -$(TS13): uts_mm_camcorder_set_message_callback.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS13) uts_mm_camcorder_utils.c uts_mm_camcorder_set_message_callback.c $(LDFLAGS) - -$(TS14): uts_mm_camcorder_set_video_capture_callback.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS14) uts_mm_camcorder_utils.c uts_mm_camcorder_set_video_capture_callback.c $(LDFLAGS) - -$(TS15): uts_mm_camcorder_set_video_stream_callback.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS15) uts_mm_camcorder_utils.c uts_mm_camcorder_set_video_stream_callback.c $(LDFLAGS) - -$(TS16): uts_mm_camcorder_start.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS16) uts_mm_camcorder_utils.c uts_mm_camcorder_start.c $(LDFLAGS) - -$(TS17): uts_mm_camcorder_start_focusing.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS17) uts_mm_camcorder_utils.c uts_mm_camcorder_start_focusing.c $(LDFLAGS) - -$(TS18): uts_mm_camcorder_stop.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS18) uts_mm_camcorder_utils.c uts_mm_camcorder_stop.c $(LDFLAGS) - -$(TS19): uts_mm_camcorder_stop_focusing.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS19) uts_mm_camcorder_utils.c uts_mm_camcorder_stop_focusing.c $(LDFLAGS) - -$(TS20): uts_mm_camcorder_unrealize.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS20) uts_mm_camcorder_utils.c uts_mm_camcorder_unrealize.c $(LDFLAGS) - -$(TS21): uts_mm_camcorder_get_attr_info.[ch] uts_mm_camcorder_utils.[ch] - $(CC) -o $(TS21) uts_mm_camcorder_utils.c uts_mm_camcorder_get_attr_info.c $(LDFLAGS) - -clean: - rm -rf *~ *.o $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS19) $(TS20) $(TS21) - - - diff --git a/TC/utc/tslist b/TC/utc/tslist deleted file mode 100644 index 5dd41c4..0000000 --- a/TC/utc/tslist +++ /dev/null @@ -1,21 +0,0 @@ -uts_mm_camcorder_cancel -uts_mm_camcorder_capture_start -uts_mm_camcorder_capture_stop -uts_mm_camcorder_commit -uts_mm_camcorder_create -uts_mm_camcorder_destroy -uts_mm_camcorder_get_attrs -uts_mm_camcorder_get_state -uts_mm_camcorder_pause -uts_mm_camcorder_realize -uts_mm_camcorder_record -uts_mm_camcorder_set_attrs -uts_mm_camcorder_set_message_callback -uts_mm_camcorder_set_video_capture_callback -uts_mm_camcorder_set_video_stream_callback -uts_mm_camcorder_start -uts_mm_camcorder_start_focusing -uts_mm_camcorder_stop -uts_mm_camcorder_stop_focusing -uts_mm_camcorder_unrealize -uts_mm_camcorder_get_attr_info diff --git a/TC/utc/uts_mm_camcorder_cancel.c b/TC/utc/uts_mm_camcorder_cancel.c deleted file mode 100644 index 414b2ce..0000000 --- a/TC/utc/uts_mm_camcorder_cancel.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_CANCEL Uts_Mm_Camcorder_Cancel -* @{ -*/ - -/** -* @file uts_mm_camcorder_cancel.c -* @brief This is a suite of unit test cases to test mm_camcorder_cancel API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_cancel.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_cancel_001,1}, - {utc_camcorder_cancel_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_cancel API in normal conditions - * @par ID: - * UTC_CAMCORDER_CANCEL_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in RECORDING state. - * @post Camcorder should come to PREPARE state. - * @returns MM_ERROR_NONE - */ -void utc_camcorder_cancel_001() -{ - tet_printf("\n ======================utc_camcorder_cancel_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = VIDEO_MODE; - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_cancel_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_record(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_cancel_001 while recording with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_cancel(camcorder); - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq( "utc_camcorder_cancel_001", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_cancel_001 while canceling the camcorder recording with error %x", errorValue ); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_cancel_001 while stoping the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_cancel API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_CANCEL_002 - * @param [in] Invalid handle - * @param [out] None - * @returns Error code - */ -void utc_camcorder_cancel_002() -{ - tet_printf("\n ======================utc_camcorder_cancel_002====================== \n"); - gint errorValue = -1; - errorValue = mm_camcorder_cancel(0); - - dts_check_ne( "mm_camcorder_cancel", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_cancel_002 while canceling the camcorder recording with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ - - diff --git a/TC/utc/uts_mm_camcorder_cancel.h b/TC/utc/uts_mm_camcorder_cancel.h deleted file mode 100644 index 72c6a83..0000000 --- a/TC/utc/uts_mm_camcorder_cancel.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_cancel.h -* @brief This file declares the camcorder cancel test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_CANCEL_H -#define UTS_CAMCORDER_CANCEL_H - -void utc_camcorder_cancel_001(); -void utc_camcorder_cancel_002(); - -#endif /* UTS_CAMCORDER_CANCEL_H */ diff --git a/TC/utc/uts_mm_camcorder_capture_start.c b/TC/utc/uts_mm_camcorder_capture_start.c deleted file mode 100644 index 3c5d5cb..0000000 --- a/TC/utc/uts_mm_camcorder_capture_start.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_CAPTURE_START Uts_Mm_Camcorder_Capture_Start -* @{ -*/ - -/** -* @file uts_mm_camcorder_capture_start.c -* @brief This is a suite of unit test cases to test mm_camcorder_capture_start API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_capture_start.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_capture_start_001,1}, - {utc_camcorder_capture_start_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_capture_start API in normal conditions - * @par ID: - * UTC_CAMCORDER_CAPTURE_START_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in PREPARED state. - * @post Camcorder should come to CAPTURING state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_capture_start_001() -{ - tet_printf("\n ======================utc_camcorder_capture_start_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = IMAGE_MODE; - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_capture_start_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_capture_start(camcorder); - - sleep(5); - - errorValue = mm_camcorder_capture_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_capture_start_001 while stoping the capturing with error %x \n", errorValue); - return; - } - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_capture_start", errorValue_check, MM_ERROR_NONE, - "Failed in utc_camcorder_capture_start_001 while starting the capturing with error %x", errorValue ); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_capture_start_001 while stoping the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_capture_start API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_CAPTURE_START_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_capture_start_002() -{ - tet_printf("\n ======================utc_camcorder_capture_start_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_capture_start(0); - - dts_check_ne( "mm_camcorder_capture_start", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_capture_start_002 while starting the capturing with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_capture_start.h b/TC/utc/uts_mm_camcorder_capture_start.h deleted file mode 100644 index 389506d..0000000 --- a/TC/utc/uts_mm_camcorder_capture_start.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_capture_start.h -* @brief This file declares the camcorder capture start test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_CAPTURE_START_H -#define UTS_CAMCORDER_CAPTURE_START_H - -void utc_camcorder_capture_start_001(); -void utc_camcorder_capture_start_002(); - -#endif /* UTS_CAMCORDER_CAPTURE_START_H */ diff --git a/TC/utc/uts_mm_camcorder_capture_stop.c b/TC/utc/uts_mm_camcorder_capture_stop.c deleted file mode 100644 index d4776eb..0000000 --- a/TC/utc/uts_mm_camcorder_capture_stop.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_CAPTURE_STOP Uts_Mm_Camcorder_Capture_Stop -* @{ -*/ - -/** -* @file uts_mm_camcorder_capture_stop.c -* @brief This is a suite of unit test cases to test mm_camcorder_capture_stop API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_capture_stop.h" -#include "uts_mm_camcorder_utils.h" - - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_capture_stop_001,1}, - {utc_camcorder_capture_stop_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_capture_stop API in normal conditions - * @par ID: - * UTC_CAMCORDER_CAPTURE_STOP_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in CAPTURING state. - * @post Camcorder should come to PREPARED state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_capture_stop_001() -{ - tet_printf("\n ======================utc_camcorder_capture_stop_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = IMAGE_MODE; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_capture_stop_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_capture_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_capture_stop_001 while starting the capturing with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - sleep(5); - - errorValue = mm_camcorder_capture_stop(camcorder); - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_capture_stop", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_capture_stop_001 while stoping the capturing with error %x", errorValue ); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_capture_stop_001 while stoping the camcorder \n"); - return ; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_capture_stop API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_CAPTURE_STOP_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_capture_stop_002() -{ - tet_printf("\n ======================utc_camcorder_capture_stop_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_capture_stop(0); - - dts_check_ne( "mm_camcorder_capture_stop", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_capture_stop_002 while stoping the capturing with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_capture_stop.h b/TC/utc/uts_mm_camcorder_capture_stop.h deleted file mode 100644 index cdb72cb..0000000 --- a/TC/utc/uts_mm_camcorder_capture_stop.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_capture_stop.h -* @brief This file declares the camcorder capture stop test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_CAPTURE_STOP_H -#define UTS_CAMCORDER_CAPTURE_STOP_H - -void utc_camcorder_capture_stop_001(); -void utc_camcorder_capture_stop_002(); - -#endif /* UTS_CAMCORDER_CAPTURE_STOP_H */ diff --git a/TC/utc/uts_mm_camcorder_commit.c b/TC/utc/uts_mm_camcorder_commit.c deleted file mode 100644 index 5ee6e41..0000000 --- a/TC/utc/uts_mm_camcorder_commit.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_COMMIT Uts_Mm_Camcorder_Commit -* @{ -*/ - -/** -* @file uts_mm_camcorder_commit.c -* @brief This is a suite of unit test cases to test mm_camcorder_commit API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_commit.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_commit_001,1}, - {utc_camcorder_commit_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_commit API in normal conditions - * @par ID: - * UTC_CAMCORDER_COMMIT_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in RECORDING state. - * @post Camcorder should come to PREPARED state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_commit_001() -{ - tet_printf("\n ======================utc_camcorder_commit_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = VIDEO_MODE; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_commit_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_record(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_commit_001 while recording with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - sleep(5); - - errorValue = mm_camcorder_commit(camcorder); - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_commit", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_commit_001 while commiting with error %x", errorValue ); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_commit_001 while stoping the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_commit API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_COMMIT_002 - * @param [in] Invalid handle - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_commit_002() -{ - tet_printf("\n ======================utc_camcorder_commit_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_commit(0); - - dts_check_ne( "mm_camcorder_commit", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_commit_002 while commiting the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_commit.h b/TC/utc/uts_mm_camcorder_commit.h deleted file mode 100644 index 73fb314..0000000 --- a/TC/utc/uts_mm_camcorder_commit.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_commit.h -* @brief This file declares the camcorder capture stop test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_COMMIT_H -#define UTS_CAMCORDER_COMMIT_H - -void utc_camcorder_commit_001(); -void utc_camcorder_commit_002(); - -#endif /* UTS_CAMCORDER_COMMIT_H */ diff --git a/TC/utc/uts_mm_camcorder_create.c b/TC/utc/uts_mm_camcorder_create.c deleted file mode 100644 index 3c4e0a0..0000000 --- a/TC/utc/uts_mm_camcorder_create.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_CREATE Uts_Mm_Camcorder_Create -* @{ -*/ - -/** -* @file uts_mm_camcorder_create.c -* @brief This is a suite of unit test cases to test mm_camcorder_create API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_create.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_create_001,1}, - {utc_camcorder_create_002,2}, - {utc_camcorder_create_003,3}, - {utc_camcorder_create_004,4}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_create API in normal conditions with primary camera. - * @par ID: - * UTC_CAMCORDER_CREATE_001 - * @param [in] info - * @code - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - * @endcode - * @param [out] camcorder - * @pre None. - * @post Camcorder should come to NULL state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_create_001() -{ - tet_printf("\n ======================utc_camcorder_create_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - errorValue_check = mm_camcorder_create(&camcorder, &info); - errorValue = mm_camcorder_destroy(camcorder); - - dts_check_eq( "mm_camcorder_create", errorValue_check, MM_ERROR_NONE, - "Failed in utc_camcorder_create_001 while creating the camcorder with error %x", errorValue ); - - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_create_001 while destroying the camcorder with error %x but mm_camcorder_create API was passed \n", errorValue); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * @brief This tests mm_camcorder_create API with invalid output parameter. - * @par ID: - * UTC_CAMCORDER_CREATE_002 - * @param [in] info - * @code - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - * @endcode - * @param [out] pCamcorder - * @code -MMHandleType *pCamcorder = NULL; - * @endcode - * @return Error code - */ -void utc_camcorder_create_002() -{ - tet_printf("\n ======================utc_camcorder_create_002====================== \n"); - - gint errorValue = -1; - MMHandleType *pCamcorder = NULL; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - errorValue = mm_camcorder_create(pCamcorder, &info); - - dts_check_ne( "mm_camcorder_create", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_create_002 while creating the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * @brief This tests mm_camcorder_create API in normal conditions with secondary camera. - * @par ID: - * UTC_CAMCORDER_CREATE_003 - * @param [in] info - * @code - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_CAMERA1; - * @endcode - * @param [out] camcorder - * @pre None. - * @post Camcorder should come to NULL state. - * @return MM_ERROR_NONE - */ - void utc_camcorder_create_003() -{ - tet_printf("\n ======================utc_camcorder_create_003====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA1; - - errorValue_check = mm_camcorder_create(&camcorder, &info); - errorValue = mm_camcorder_destroy(camcorder); - - dts_check_eq( "mm_camcorder_create", errorValue_check, MM_ERROR_NONE, - "Failed in utc_camcorder_create_003 while creating the camcorder with error %x", errorValue ); - - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_create_003 while destroying the camcorder with error %x but mm_camcorder_create API was passed \n", errorValue); - return; - } - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * @brief This tests mm_camcorder_create API with invalid preset information. - * @par ID: - * UTC_CAMCORDER_CREATE_004 - * @param [in] info - * @code - MMCamPreset info; - info.videodev_type = MM_VIDEO_DEVICE_NUM; - * @endcode - * @param [out] camcorder - * @pre None. - * @post Camcorder should come to NULL state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_create_004() -{ - tet_printf("\n ======================utc_camcorder_create_004====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_NUM; - - errorValue = mm_camcorder_create(&camcorder, &info); - - dts_check_ne( "mm_camcorder_create", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_create_004 while creating the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_create.h b/TC/utc/uts_mm_camcorder_create.h deleted file mode 100644 index 3589ec5..0000000 --- a/TC/utc/uts_mm_camcorder_create.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_create.h -* @brief This file declares the camcorder create test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_CREATE_H -#define UTS_CAMCORDER_CREATE_H - -void utc_camcorder_create_001(); -void utc_camcorder_create_002(); -void utc_camcorder_create_003(); -void utc_camcorder_create_004(); - -#endif /* UTS_CAMCORDER_CREATE_H */ diff --git a/TC/utc/uts_mm_camcorder_destroy.c b/TC/utc/uts_mm_camcorder_destroy.c deleted file mode 100644 index a169802..0000000 --- a/TC/utc/uts_mm_camcorder_destroy.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_DESTROY Uts_Mm_Camcorder_Destroy -* @{ -*/ - - -/** -* @file uts_mm_camcorder_destroy.c -* @brief This is a suite of unit test cases to test mm_camcorder_destroy API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_destroy.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_destroy_001,1}, - {utc_camcorder_destroy_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_destroy API in normal conditions - * @par ID: - * UTC_CAMCORDER_DESTROY_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in NULL state. - * @post None - * @return MM_ERROR_NONE - */ -void utc_camcorder_destroy_001() -{ - tet_printf("\n ======================utc_camcorder_destroy_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_destroy_001 while creating the camcorder with error \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_destroy(camcorder); - - dts_check_eq( "mm_camcorder_destroy", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_destroy_001 while destroying the camcorder with error %x but mm_camcorder_create API was passed", errorValue ); - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_destroy API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_DESTROY_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_destroy_002() -{ - tet_printf("\n ======================utc_camcorder_destroy_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_destroy(0); - - dts_check_ne( "mm_camcorder_destroy", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_destroy_002 while destroying the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_destroy.h b/TC/utc/uts_mm_camcorder_destroy.h deleted file mode 100644 index d46e173..0000000 --- a/TC/utc/uts_mm_camcorder_destroy.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_destroy.h -* @brief This file declares the camcorder destroy test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_DESTROY_H -#define UTS_CAMCORDER_DESTROY_H - -void utc_camcorder_destroy_001(); -void utc_camcorder_destroy_002(); - -#endif /* UTS_CAMCORDER_DESTROY_H */ diff --git a/TC/utc/uts_mm_camcorder_get_attr_info.c b/TC/utc/uts_mm_camcorder_get_attr_info.c deleted file mode 100644 index 0b0992a..0000000 --- a/TC/utc/uts_mm_camcorder_get_attr_info.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_GET_ATTR_INFO Uts_Mm_Camcorder_Get_Attr_Info -* @{ -*/ - -/** -* @file uts_mm_camcorder_get_attr_info.c -* @brief This is a suite of unit test cases to test mmcam_get_attr_info API. -* @author Priyanka Aggarwal (priyanka.a@samsung.com) -* @version Initial Creation V0.1 -* @date 2010.06.10 -*/ - -#include "uts_mm_camcorder_get_attr_info.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_get_attr_info_001,1}, - {utc_camcorder_get_attr_info_002,2}, - {utc_camcorder_get_attr_info_003,3}, - {utc_camcorder_get_attr_info_004,4}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attr_info_001() -{ - tet_printf("\n ======================utc_camcorder_get_attr_info_001====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - MMCamAttrsInfo attr_info; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attribute_info(camcorder, MMCAM_DISPLAY_DEVICE, &attr_info); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attribute_info", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attr_info_001 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_001 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attr_info_002() -{ - tet_printf("\n ======================utc_camcorder_get_attr_info_002====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - //gboolean bErrorValue = false; - MMCamAttrsInfo info; - - errorValue = mm_camcorder_get_attribute_info(camcorder, MMCAM_DISPLAY_DEVICE, &info); - - dts_check_ne( "mm_camcorder_get_attribute_info", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attr_info_002 while getting attributes of the camcorder" ); - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attr_info_003() -{ - tet_printf("\n ======================utc_camcorder_get_attr_info_003====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - MMCamAttrsInfo attr_info; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_003 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attribute_info(camcorder, NULL, &attr_info); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne( "mm_camcorder_get_attribute_info", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attr_info_003 while getting attributes of the camcorder" ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_003 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attr_info_004() -{ - tet_printf("\n ======================utc_camcorder_get_attr_info_004====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_004 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attribute_info(camcorder, MMCAM_DISPLAY_DEVICE, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne( "mm_camcorder_get_attribute_info", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attr_info_004 while getting attributes of the camcorder" ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attr_info_004 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_get_attr_info.h b/TC/utc/uts_mm_camcorder_get_attr_info.h deleted file mode 100644 index ee818cc..0000000 --- a/TC/utc/uts_mm_camcorder_get_attr_info.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_get_attr_info.h -* @brief This file declares the camcorder get attr info test cases. -* @author Priyanka Aggarwal(priyanka.a@samsung.com) -* @version Initial Creation V0.1 -* @date 2010.06.10 -*/ - -#ifndef UTS_CAMCORDER_GET_ATTR_INFO_H -#define UTS_CAMCORDER_GET_ATTR_INFO_H - -void utc_camcorder_get_attr_info_001(); -void utc_camcorder_get_attr_info_002(); -void utc_camcorder_get_attr_info_003(); -void utc_camcorder_get_attr_info_004(); - -#endif /* UTS_CAMCORDER_GET_ATTR_INFO_H */ diff --git a/TC/utc/uts_mm_camcorder_get_attrs.c b/TC/utc/uts_mm_camcorder_get_attrs.c deleted file mode 100644 index 7172361..0000000 --- a/TC/utc/uts_mm_camcorder_get_attrs.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_GET_ATTRS Uts_Mm_Camcorder_Get_Attrs -* @{ -*/ - -/** -* @file uts_mm_camcorder_get_attrs.c -* @brief This is a suite of unit test cases to test mmcam_get_attrs API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_get_attrs.h" -#include "uts_mm_camcorder_utils.h" - -#define MM_CAMCORDER_BRIGHTNESS_LEVEL1 1 -#define MM_CAMCORDER_BRIGHTNESS_LEVEL9 9 - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_get_attrs_001,1}, - {utc_camcorder_get_attrs_002,2}, - {utc_camcorder_get_attrs_003,3}, - {utc_camcorder_get_attrs_004,4}, - {utc_camcorder_get_attrs_005,5}, - {utc_camcorder_get_attrs_006,6}, - {utc_camcorder_get_attrs_007,7}, - {utc_camcorder_get_attrs_008,8}, - {utc_camcorder_get_attrs_009,9}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_001() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_001====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_001 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_001 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_002() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_002====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_002 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_DISPLAY_DEVICE, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_002 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_002 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_003() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_003====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_003 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_COUNT, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_003 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_003 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_004() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_004====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_004 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_WIDTH, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_004 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_004 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_005() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_005====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - //gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - /* - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_005 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - */ - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, &AttrsValue, NULL); - - dts_check_ne( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_005 while getting attributes of the camcorder" ); - - /* - bErrorValue = DestroyCamcorder(camcorder); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_005 while destroying the camcorder \n"); - } - */ - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_006() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_006====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - //char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_006 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, NULL, MMCAM_MODE, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_006 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_006 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_007() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_007====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_007 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, NULL, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_007 while getting attributes of the camcorder" ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_007 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_008() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_008====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - //int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_008 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_008 while getting attributes of the camcorder" ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_008 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_get_attrs_009() -{ - tet_printf("\n ======================utc_camcorder_get_attrs_009====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_009 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_VIDEO_ENCODER, &AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_get_attributes", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_attrs_009 while getting attributes of the camcorder [%x]", errorValue ); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_get_attrs_009 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_get_attrs.h b/TC/utc/uts_mm_camcorder_get_attrs.h deleted file mode 100644 index 75033d1..0000000 --- a/TC/utc/uts_mm_camcorder_get_attrs.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_get_attrs.h -* @brief This file declares the camcorder get attrs test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_GET_ATTRS_H -#define UTS_CAMCORDER_GET_ATTRS_H - -void utc_camcorder_get_attrs_001(); -void utc_camcorder_get_attrs_002(); -void utc_camcorder_get_attrs_003(); -void utc_camcorder_get_attrs_004(); -void utc_camcorder_get_attrs_005(); -void utc_camcorder_get_attrs_006(); -void utc_camcorder_get_attrs_007(); -void utc_camcorder_get_attrs_008(); -void utc_camcorder_get_attrs_009(); - -#endif /* UTS_CAMCORDER_GET_ATTRS_H */ diff --git a/TC/utc/uts_mm_camcorder_get_state.c b/TC/utc/uts_mm_camcorder_get_state.c deleted file mode 100644 index d43a707..0000000 --- a/TC/utc/uts_mm_camcorder_get_state.c +++ /dev/null @@ -1,298 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_GET_STATE Uts_Mm_Camcorder_Get_State -* @{ -*/ - -/** -* @file uts_mm_camcorder_get_state.c -* @brief This is a suite of unit test cases to test mm_camcorder_get_state API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_get_state.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_get_state_001,1}, - {utc_camcorder_get_state_002,2}, - {utc_camcorder_get_state_003,3}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_get_state API in normal conditions. - * @par ID: - * UTC_CAMCORDER_GET_STATE_001 - * @par Description: In order to get each and every state we called mm_camcorder_create,mm_camcorder_realize,mm_camcorder_start,mm_camcorder_capture_start,mm_camcorder_capture_stop APIs. - * @param [in] camcorder = Valid Camcorder Handle - * @code - errorValue = mm_camcorder_create(&camcorder); - errorValue = mm_camcorder_get_state(camcorder); - - errorValue = mm_camcorder_realize(camcorder); - errorValue = mm_camcorder_get_state(camcorder); - - errorValue = mm_camcorder_start(camcorder); - errorValue = mm_camcorder_get_state(camcorder); - - errorValue = mm_camcorder_capture_start(camcorder); - errorValue = mm_camcorder_get_state(camcorder); - - errorValue = mm_camcorder_capture_stop(camcorder); - errorValue = mm_camcorder_get_state(camcorder); - * @param [out] None - * @param [out] None - * @return State of the camcorder - */ -void utc_camcorder_get_state_001() -{ - tet_printf("\n ======================utc_camcorder_get_state_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMCamcorderStateType state = MM_CAMCORDER_STATE_NUM; - int mode = IMAGE_MODE; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - errorValue = mm_camcorder_create(&camcorder, &info); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while creating the camcorder with error %x but mmcam_init API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_NULL != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the NULL state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while realizing the camcorder with error %x but mm_camcorder_create API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_READY != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the READY state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while starting the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_PREPARE != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the PREPARED state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - if(IMAGE_MODE == mode) { - errorValue = mm_camcorder_capture_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while starting the capture mode of the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_CAPTURING != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the CAPTURING state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } -/* - errorValue = mm_camcorder_pause(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while pausing the capture mode of the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder); - if (MM_CAMCORDER_STATE_PAUSED != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the PAUSE state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } -*/ - sleep(5); - - errorValue = mm_camcorder_capture_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while stoping the capture mode of the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - } - else if (VIDEO_MODE == mode) { - errorValue = mm_camcorder_record(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while recording in the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_RECORDING != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the RECORDING state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - errorValue = mm_camcorder_pause(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while pausing the recording mode of the camcorder with error %x but mm_camcorder_capture_start API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, &state); - if (MM_CAMCORDER_STATE_PAUSED != state) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while getting the PAUSE state from the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - errorValue = mm_camcorder_cancel(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while stoping the recording mode of the camcorder with error %x but mm_camcorder_record API was passed \n", errorValue); - return; - } - } - - tet_result(TET_PASS); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while stoping the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while unrealizing the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - return; - } - - errorValue = mm_camcorder_destroy(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_001 while destroying the camcorder with error %x but mm_camcorder_unrealize API was passed \n", errorValue); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_get_state API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_GET_STATE_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_get_state_002() -{ - tet_printf("\n ======================utc_camcorder_stop_002====================== \n"); - - gint errorValue = -1; - MMCamcorderStateType state = MM_CAMCORDER_STATE_NUM; - - errorValue = mm_camcorder_get_state(0, &state); - - dts_check_ne( "mm_camcorder_get_state", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_state_002 while getting the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_get_state API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_GET_STATE_003 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_get_state_003() -{ - tet_printf("\n ======================utc_camcorder_stop_002====================== \n"); - - gint errorValue = -1; - MMCamcorderStateType *state = NULL; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_NUM; - - errorValue = mm_camcorder_create(&camcorder, &info); - if (MM_ERROR_NONE == errorValue) { - tet_printf("\n Failed in utc_camcorder_get_state_003 while creating the camcorder with error %x but mmcam_init API was passed \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_get_state(camcorder, state); - - dts_check_ne( "mm_camcorder_get_state", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_get_state_003 while getting the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_get_state.h b/TC/utc/uts_mm_camcorder_get_state.h deleted file mode 100644 index 5dc0010..0000000 --- a/TC/utc/uts_mm_camcorder_get_state.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_get_state.h -* @brief This file declares the camcorder get state test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_GET_STATE_H -#define UTS_CAMCORDER_GET_STATE_H - -void utc_camcorder_get_state_001(); -void utc_camcorder_get_state_002(); -void utc_camcorder_get_state_003(); - -#endif /* UTS_CAMCORDER_GET_STATE_H */ diff --git a/TC/utc/uts_mm_camcorder_pause.c b/TC/utc/uts_mm_camcorder_pause.c deleted file mode 100644 index 618d506..0000000 --- a/TC/utc/uts_mm_camcorder_pause.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_PAUSE Uts_Mm_Camcorder_Pause -* @{ -*/ - -/** -* @file uts_mm_camcorder_pause.c -* @brief This is a suite of unit test cases to test mm_camcorder_pause API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_pause.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_pause_001,1}, - {utc_camcorder_pause_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_pause API in normal conditions. - * @par ID: - * UTC_CAMCORDER_PAUSE_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in RECORDING state. - * @post Camcorder should come to PAUSE state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_pause_001() -{ - tet_printf("\n ======================utc_camcorder_pause_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = VIDEO_MODE; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_pause_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_record(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_pause_001 while recording with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - sleep(5); - - errorValue_check = mm_camcorder_pause(camcorder); - - errorValue = mm_camcorder_cancel(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_pause_001 while canceling the recording in the camcorder with error %x \n", errorValue); - return; - } - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq( "mm_camcorder_pause", errorValue_check, MM_ERROR_NONE, - "Failed in utc_camcorder_pause_001 while pausing the camcorder with error %x", errorValue ); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_pause_001 while stoping the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_pause API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_PAUSE_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_pause_002() -{ - tet_printf("\n ======================utc_camcorder_pause_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_pause(0); - - dts_check_ne( "mm_camcorder_pause", errorValue, MM_ERROR_NONE, - "Failed in utc_camcorder_pause_002 while pausing the camcorder with error %x", errorValue ); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_pause.h b/TC/utc/uts_mm_camcorder_pause.h deleted file mode 100644 index 6340c5e..0000000 --- a/TC/utc/uts_mm_camcorder_pause.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_pause.h -* @brief This file declares the camcorder pause test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_PAUSE_H -#define UTS_CAMCORDER_PAUSE_H - -void utc_camcorder_pause_001(); -void utc_camcorder_pause_002(); - -#endif /* UTS_CAMCORDER_PAUSE_H */ diff --git a/TC/utc/uts_mm_camcorder_realize.c b/TC/utc/uts_mm_camcorder_realize.c deleted file mode 100644 index ebb044a..0000000 --- a/TC/utc/uts_mm_camcorder_realize.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_REALIZE Uts_Mm_Camcorder_Realize -* @{ -*/ - -/** -* @file uts_mm_camcorder_realize.c -* @brief This is a suite of unit test cases to test mm_camcorder_realize API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_realize.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_realize_001,1}, - {utc_camcorder_realize_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_realize API in normal conditions. - * @par ID: - * UTC_CAMCORDER_REALIZE_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in NULL state. - * @post Camcorder should come to READY state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_realize_001() -{ - tet_printf("\n ======================utc_camcorder_realize_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_realize(camcorder); - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while starting the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - return; - } - - sleep(2); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while stopping the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while unrealizing the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - return; - } - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_realize", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_realize_001 while realizing the camcorder with error %x but mm_camcorder_create API was passed \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_realize_001 while destroying the camcorder \n"); - return; - } - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_realize API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_REALIZE_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_realize_002() -{ - tet_printf("\n ======================utc_camcorder_realize_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_realize(0); - dts_check_ne("mm_camcorder_realize", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_realize_002 while realizing the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_realize.h b/TC/utc/uts_mm_camcorder_realize.h deleted file mode 100644 index e1c223f..0000000 --- a/TC/utc/uts_mm_camcorder_realize.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_realize.h -* @brief This file declares the camcorder realize test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_REALIZE_H -#define UTS_CAMCORDER_REALIZE_H - -void utc_camcorder_realize_001(); -void utc_camcorder_realize_002(); - -#endif /* UTS_CAMCORDER_REALIZE_H */ diff --git a/TC/utc/uts_mm_camcorder_record.c b/TC/utc/uts_mm_camcorder_record.c deleted file mode 100644 index 301ac17..0000000 --- a/TC/utc/uts_mm_camcorder_record.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_RECORD Uts_Mm_Camcorder_Record -* @{ -*/ - -/** -* @file uts_mm_camcorder_record.c -* @brief This is a suite of unit test cases to test MMCamcorderRecord API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_record.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_record_001,1}, - {utc_camcorder_record_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests MMCamcorderRecord API in normal conditions. - * @par ID: - * UTC_CAMCORDER_RECORD_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in PREPARE state. - * @post Camcorder should come to RECORDING state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_record_001() -{ - tet_printf("\n ======================utc_camcorder_record_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - int mode = VIDEO_MODE; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = StartCamcorder(&camcorder, &info, mode); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_record_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_record(camcorder); - - sleep(2); - - errorValue = mm_camcorder_cancel(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_record_001 while recording with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - bReturnValue = StopCamcorder(camcorder); - - dts_check_eq("mm_camcorder_record", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_record_001 while recording with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_record_001 while stoping the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests MMCamcorderRecord API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_RECORD_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_record_002() -{ - tet_printf("\n ======================utc_camcorder_record_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_record(0); - dts_check_ne("mm_camcorder_record", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_record_002 while recording the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_record.h b/TC/utc/uts_mm_camcorder_record.h deleted file mode 100644 index c442d81..0000000 --- a/TC/utc/uts_mm_camcorder_record.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_record.h -* @brief This file declares the camcorder record test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_RECORD_H -#define UTS_CAMCORDER_RECORD_H - -void utc_camcorder_record_001(); -void utc_camcorder_record_002(); - -#endif /* UTS_CAMCORDER_RECORD_H */ diff --git a/TC/utc/uts_mm_camcorder_set_attrs.c b/TC/utc/uts_mm_camcorder_set_attrs.c deleted file mode 100644 index c8cd014..0000000 --- a/TC/utc/uts_mm_camcorder_set_attrs.c +++ /dev/null @@ -1,374 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup CAMCORDER -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER -* @addtogroup UTS_mm_camcorder_set_attributes Uts_Mm_CamcorderSetAttrs -* @{ -*/ - -/** -* @file uts_mm_camcorder_set_attrs.c -* @brief This is a suite of unit test cases to test mm_camcorder_set_attributes API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_set_attrs.h" -#include "uts_mm_camcorder_utils.h" -#define MM_CAMCORDER_BRIGHTNESS_LEVEL1 1 -#define MM_CAMCORDER_BRIGHTNESS_LEVEL9 9 - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_set_attrs_001,1}, - {utc_camcorder_set_attrs_002,2}, - {utc_camcorder_set_attrs_003,3}, - {utc_camcorder_set_attrs_004,4}, - {utc_camcorder_set_attrs_005,5}, - {utc_camcorder_set_attrs_006,6}, - {utc_camcorder_set_attrs_007,7}, - {utc_camcorder_set_attrs_008,8}, - {utc_camcorder_set_attrs_009,9}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_001() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_001====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = MM_CAMCORDER_MODE_VIDEO; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_MODE, AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_001 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_001 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_001 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_002() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_002====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = DISPLAY_ID; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_002 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_DISPLAY_SURFACE, AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_002 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_002 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_002 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_003() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_003====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = IMAGE_CAPTURE_COUNT_STILL; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_003 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_COUNT, AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_003 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_003 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_003 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_004() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_004====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int width = SRC_W_320; - int height = SRC_H_240; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_004 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, - MMCAM_CAMERA_WIDTH, width, - MMCAM_CAMERA_HEIGHT, height, - NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_004 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_004 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_004 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_005() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_005====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - //gboolean bErrorValue = false; - int AttrsValue = MM_CAMCORDER_MODE_VIDEO; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - /* - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_005 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - */ - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_MODE, AttrsValue, NULL); - dts_check_ne("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_005 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_005 while setting attributes of the camcorder \n"); - - /* - bErrorValue = DestroyCamcorder(camcorder); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_005 while destroying the camcorder \n"); - } - */ - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_006() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_006====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = MM_CAMCORDER_MODE_VIDEO; - //char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_006 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, NULL, MMCAM_MODE, AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_006 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_006 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_006 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_007() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_007====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - int AttrsValue = 1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_007 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, NULL, AttrsValue, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_007 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_007 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_007 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_008() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_008====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - //int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_008 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_MODE, -1, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_008 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_008 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_008 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void utc_camcorder_set_attrs_009() -{ - tet_printf("\n ======================utc_camcorder_set_attrs_009====================== \n"); - - gint errorValue = -1; - MMHandleType camcorder = 0; - gboolean bErrorValue = false; - //int AttrsValue = -1; - char* err_attr_name = (char*)malloc(50); - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bErrorValue = CreateCamcorder(&camcorder, &info); - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_009 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, MMCAM_VIDEO_ENCODER, MM_VIDEO_CODEC_MPEG4, NULL); - - bErrorValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_attributes", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_attrs_009 while setting attributes of the camcorder \n"); - tet_printf("\n Passed in utc_camcorder_set_attrs_009 while setting attributes of the camcorder \n"); - - if (false == bErrorValue) { - tet_printf("\n Failed in utc_camcorder_set_attrs_009 while destroying the camcorder \n"); - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_set_attrs.h b/TC/utc/uts_mm_camcorder_set_attrs.h deleted file mode 100644 index e6e0223..0000000 --- a/TC/utc/uts_mm_camcorder_set_attrs.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_set_attrs.h -* @brief This file declares the camcorder set attrs test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_SET_ATTRS_H -#define UTS_CAMCORDER_SET_ATTRS_H - -void utc_camcorder_set_attrs_001(); -void utc_camcorder_set_attrs_002(); -void utc_camcorder_set_attrs_003(); -void utc_camcorder_set_attrs_004(); -void utc_camcorder_set_attrs_005(); -void utc_camcorder_set_attrs_006(); -void utc_camcorder_set_attrs_007(); -void utc_camcorder_set_attrs_008(); -void utc_camcorder_set_attrs_009(); - - -#endif /* UTS_CAMCORDER_SET_ATTRS_H */ diff --git a/TC/utc/uts_mm_camcorder_set_message_callback.c b/TC/utc/uts_mm_camcorder_set_message_callback.c deleted file mode 100644 index d0985ce..0000000 --- a/TC/utc/uts_mm_camcorder_set_message_callback.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_SET_MESSAGE_CALLBACK Uts_Mm_Camcorder_Set_Message_Callback -* @{ -*/ - - -/** -* @file uts_mm_camcorder_set_message_callback.c -* @brief This is a suite of unit test cases to test mm_camcorder_set_message_callback API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_set_message_callback.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_set_message_callback_001,1}, - {utc_camcorder_set_message_callback_002,2}, - {utc_camcorder_set_message_callback_003,3}, - {utc_camcorder_set_message_callback_004,4}, - {utc_camcorder_set_message_callback_005,5}, - {utc_camcorder_set_message_callback_006,6}, - {utc_camcorder_set_message_callback_007,7}, - {utc_camcorder_set_message_callback_008,8}, - {NULL,0} -}; -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API in normal conditions. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] MessageCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_message_callback_001() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(camcorder, MessageCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_001 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_002 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] MessageCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_message_callback_002() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_002====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_002 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(camcorder, MessageCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_002 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_002 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_003 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_003() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_003====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_003 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(camcorder, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_003 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_003 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with NULL callback function and NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_004 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_004() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_004====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_004 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(camcorder, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_004 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_004 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_005 - * @param [in] Invalid handle - * @param [in] MessageCallbackFunctionCalledByCamcorder (This itself is function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_005() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_005====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_005 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(0, MessageCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_005 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_005 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with invalid camcorder as well as with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_006 - * @param [in] Invalid handle - * @param [in] MessageCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_006() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_006====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_006 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(0, MessageCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_006 while setting filename callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_006 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with invalid camcorder as well as with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_007 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_007() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_007====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_007 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(0, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_007 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_007 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_message_callback API with invalid camcorder as well as with NULL callback function and NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_MESSAGE_CALLBACK_008 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_message_callback_008() -{ - tet_printf("\n ======================utc_camcorder_set_message_callback_008====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_008 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_message_callback(0, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_message_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_message_callback_008 while setting message callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_message_callback_008 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_set_message_callback.h b/TC/utc/uts_mm_camcorder_set_message_callback.h deleted file mode 100644 index 272fcc0..0000000 --- a/TC/utc/uts_mm_camcorder_set_message_callback.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_set_message_callback.h -* @brief This file declares the camcorder set message callback test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_MM_CAMCORDER_SET_MESSAGE_CALLBACK_H -#define UTS_MM_CAMCORDER_SET_MESSAGE_CALLBACK_H - -void utc_camcorder_set_message_callback_001(); -void utc_camcorder_set_message_callback_002(); -void utc_camcorder_set_message_callback_003(); -void utc_camcorder_set_message_callback_004(); -void utc_camcorder_set_message_callback_005(); -void utc_camcorder_set_message_callback_006(); -void utc_camcorder_set_message_callback_007(); -void utc_camcorder_set_message_callback_008(); - -#endif /* UTS_MM_CAMCORDER_SET_MESSAGE_CALLBACK_H */ diff --git a/TC/utc/uts_mm_camcorder_set_video_capture_callback.c b/TC/utc/uts_mm_camcorder_set_video_capture_callback.c deleted file mode 100644 index 6ce205f..0000000 --- a/TC/utc/uts_mm_camcorder_set_video_capture_callback.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK Uts_Mm_Camcorder_Set_Video_Capture_Callback -* @{ -*/ - - -/** -* @file uts_mm_camcorder_set_video_capture_callback.c -* @brief This is a suite of unit test cases to test mm_camcorder_set_video_capture_callback API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.03.04 -*/ - -#include "uts_mm_camcorder_set_video_capture_callback.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_set_video_capture_callback_001,1}, - {utc_camcorder_set_video_capture_callback_002,2}, - {utc_camcorder_set_video_capture_callback_003,3}, - {utc_camcorder_set_video_capture_callback_004,4}, - {utc_camcorder_set_video_capture_callback_005,5}, - {utc_camcorder_set_video_capture_callback_006,6}, - {utc_camcorder_set_video_capture_callback_007,7}, - {utc_camcorder_set_video_capture_callback_008,8}, - {NULL,0} -}; -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API in normal conditions. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] VideoCaptureCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_video_capture_callback_001() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(camcorder, VideoCaptureCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_001 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_002 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] VideoCaptureCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_video_capture_callback_002() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_002====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_002 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(camcorder, VideoCaptureCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_002 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_002 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_003 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_003() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_003====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_003 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(camcorder, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_003 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_003 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with NULL callback function as well as NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_004 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_004() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_004====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_004 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(camcorder, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_004 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_004 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_005 - * @param [in] Invalid handle - * @param [in] VideoCaptureCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_005() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_005====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_005 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(0, VideoCaptureCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_005 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_005 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with invalid camcorder as well as with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_006 - * @param [in] Invalid handle - * @param [in] VideoCaptureCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_006() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_006====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_006 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(0, VideoCaptureCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_006 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_006 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with invalid camcorder as well as with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_007 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_007() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_007====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_007 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(0, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_007 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_007 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_capture_callback API with invalid camcorder as well as with NULL callback function and NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_008 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_capture_callback_008() -{ - tet_printf("\n ======================utc_camcorder_set_video_capture_callback_008====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_008 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_capture_callback(0, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_capture_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_capture_callback_008 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_capture_callback_008 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ - diff --git a/TC/utc/uts_mm_camcorder_set_video_capture_callback.h b/TC/utc/uts_mm_camcorder_set_video_capture_callback.h deleted file mode 100644 index 9360829..0000000 --- a/TC/utc/uts_mm_camcorder_set_video_capture_callback.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_set_video_capture_callback.h -* @brief This file declares the camcorder set video capture callback test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2009.03.04 -*/ - -#ifndef UTS_MM_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_H -#define UTS_MM_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_H - -void utc_camcorder_set_video_capture_callback_001(); -void utc_camcorder_set_video_capture_callback_002(); -void utc_camcorder_set_video_capture_callback_003(); -void utc_camcorder_set_video_capture_callback_004(); -void utc_camcorder_set_video_capture_callback_005(); -void utc_camcorder_set_video_capture_callback_006(); -void utc_camcorder_set_video_capture_callback_007(); -void utc_camcorder_set_video_capture_callback_008(); - -#endif /* UTS_MM_CAMCORDER_SET_VIDEO_CAPTURE_CALLBACK_H */ - diff --git a/TC/utc/uts_mm_camcorder_set_video_stream_callback.c b/TC/utc/uts_mm_camcorder_set_video_stream_callback.c deleted file mode 100644 index f5b0dbb..0000000 --- a/TC/utc/uts_mm_camcorder_set_video_stream_callback.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_SET_VIDEO_STREAM_CALLBACK Uts_Mm_Camcorder_Set_Video_Stream_Callback -* @{ -*/ - - -/** -* @file uts_mm_camcorder_set_video_stream_callback.c -* @brief This is a suite of unit test cases to test mm_camcorder_set_video_stream_callback API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_set_video_stream_callback.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_set_video_stream_callback_001,1}, - {utc_camcorder_set_video_stream_callback_002,2}, - {utc_camcorder_set_video_stream_callback_003,3}, - {utc_camcorder_set_video_stream_callback_004,4}, - {utc_camcorder_set_video_stream_callback_005,5}, - {utc_camcorder_set_video_stream_callback_006,6}, - {utc_camcorder_set_video_stream_callback_007,7}, - {utc_camcorder_set_video_stream_callback_008,8}, - {NULL,0} -}; -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API in normal conditions. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] VideoStreamCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_video_stream_callback_001() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_001 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(camcorder, VideoStreamCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_001 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_002 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] VideoStreamCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return MM_ERROR_NONE - */ -void utc_camcorder_set_video_stream_callback_002() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_002====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_002 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(camcorder, VideoStreamCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_002 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_002 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_003 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_003() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_003====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_003 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(camcorder, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_003 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_003 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with NULL callback function as well as NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_004 - * @param [in] camcorder = Valid Camcorder Handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_004() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_004====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_004 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(camcorder, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_004 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_004 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_005 - * @param [in] Invalid handle - * @param [in] VideoStreamCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_005() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_005====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_005 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(0, VideoStreamCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_005 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_005 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with invalid camcorder as well as with NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_006 - * @param [in] Invalid handle - * @param [in] VideoStreamCallbackFunctionCalledByCamcorder (This itself is a function) - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_006() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_006====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_006 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(0, VideoStreamCallbackFunctionCalledByCamcorder, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_006 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_006 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with invalid camcorder as well as with NULL callback function. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_007 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] gCamcorderCallbackParameters - * @code - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file";; - gCamcorderCallbackParameters->multishot_filename = "multishot_file";; - * @endcode - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_007() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_007====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_007 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(0, NULL, gCamcorderCallbackParameters); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_007 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_007 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_set_video_stream_callback API with invalid camcorder as well as with NULL callback function and NULL user parameter. - * @par ID: - * UTC_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_008 - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_set_video_stream_callback_008() -{ - tet_printf("\n ======================utc_camcorder_set_video_stream_callback_008====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_008 while starting the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_set_video_stream_callback(0, NULL, NULL); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_ne("mm_camcorder_set_video_stream_callback", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_set_video_stream_callback_008 while setting video stream callback function with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_set_video_stream_callback_008 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_set_video_stream_callback.h b/TC/utc/uts_mm_camcorder_set_video_stream_callback.h deleted file mode 100644 index ebb4b9f..0000000 --- a/TC/utc/uts_mm_camcorder_set_video_stream_callback.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_set_video_stream_callback.h -* @brief This file declares the camcorder set video stream callback test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2009.03.04 -*/ - -#ifndef UTS_MM_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_H -#define UTS_MM_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_H - -void utc_camcorder_set_video_stream_callback_001(); -void utc_camcorder_set_video_stream_callback_002(); -void utc_camcorder_set_video_stream_callback_003(); -void utc_camcorder_set_video_stream_callback_004(); -void utc_camcorder_set_video_stream_callback_005(); -void utc_camcorder_set_video_stream_callback_006(); -void utc_camcorder_set_video_stream_callback_007(); -void utc_camcorder_set_video_stream_callback_008(); - -#endif /* UTS_MM_CAMCORDER_SET_VIDEO_STREAM_CALLBACK_H */ - diff --git a/TC/utc/uts_mm_camcorder_start.c b/TC/utc/uts_mm_camcorder_start.c deleted file mode 100644 index 7b0397d..0000000 --- a/TC/utc/uts_mm_camcorder_start.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_START Uts_Mm_Camcorder_Start -* @{ -*/ - - -/** -* @file uts_mm_camcorder_strat.c -* @brief This is a suite of unit test cases to test mm_camcorder_start API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_start.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_start_001,1}, - {utc_camcorder_start_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_start API in normal conditions. - * @par ID: - * UTC_CAMCORDER_START_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in READY state. - * @post Camcorder should come to PREPARE state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_start_001() -{ - tet_printf("\n ======================utc_camcorder_start_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while realizing the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_start(camcorder); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while stoping the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while unrealizing the camcorder with error %x \n", errorValue); - return; - } - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_start", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_start_001 while starting the camcorder with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_start API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_START_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_start_002() -{ - tet_printf("\n ======================utc_camcorder_start_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_start(0); - dts_check_ne("mm_camcorder_start", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_start_002 while starting the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_start.h b/TC/utc/uts_mm_camcorder_start.h deleted file mode 100644 index 326b262..0000000 --- a/TC/utc/uts_mm_camcorder_start.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_start.h -* @brief This file declares the camcorder start test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_START_H -#define UTS_CAMCORDER_START_H - -void utc_camcorder_start_001(); -void utc_camcorder_start_002(); - -#endif /* UTS_CAMCORDER_START_H */ diff --git a/TC/utc/uts_mm_camcorder_start_focusing.c b/TC/utc/uts_mm_camcorder_start_focusing.c deleted file mode 100644 index eff0e1b..0000000 --- a/TC/utc/uts_mm_camcorder_start_focusing.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_START Uts_Mm_Camcorder_Start -* @{ -*/ - - -/** -* @file uts_mm_camcorder_strat.c -* @brief This is a suite of unit test cases to test mm_camcorder_start API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_start_focusing.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_start_focusing_001,1}, - {utc_camcorder_start_focusing_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_start API in normal conditions. - * @par ID: - * UTC_CAMCORDER_START_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in READY state. - * @post Camcorder should come to PREPARE state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_start_focusing_001() -{ - tet_printf("\n ======================utc_camcorder_start_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while realizing the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while starting the camcorder with error %x \n", errorValue); - tet_result(TET_FAIL); - return; - } - - errorValue_check = mm_camcorder_start_focusing(camcorder); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while stoping the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while unrealizing the camcorder with error %x \n", errorValue); - return; - } - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_start_focusing", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_start_focusing_001 while starting focusing with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_start_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_start API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_START_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_start_focusing_002() -{ - tet_printf("\n ======================utc_camcorder_start_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_start_focusing(0); - dts_check_ne("mm_camcorder_start_focusing", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_start_focusing_002 while starting the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_start_focusing.h b/TC/utc/uts_mm_camcorder_start_focusing.h deleted file mode 100644 index 6a0b999..0000000 --- a/TC/utc/uts_mm_camcorder_start_focusing.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_start.h -* @brief This file declares the camcorder start test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_START_FOCUSING_H -#define UTS_CAMCORDER_START_FOCUSING_H - -void utc_camcorder_start_focusing_001(); -void utc_camcorder_start_focusing_002(); - -#endif /* UTS_CAMCORDER_START_H */ diff --git a/TC/utc/uts_mm_camcorder_stop.c b/TC/utc/uts_mm_camcorder_stop.c deleted file mode 100644 index 6b5d640..0000000 --- a/TC/utc/uts_mm_camcorder_stop.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_STOP Uts_Mm_Camcorder_Stop -* @{ -*/ - - -/** -* @file uts_mm_camcorder_stop.c -* @brief This is a suite of unit test cases to test mm_camcorder_stop API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_stop.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_stop_001,1}, - {utc_camcorder_stop_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_stop API in normal conditions. - * @par ID: - * UTC_CAMCORDER_STOP_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in PREPARE state. - * @post Camcorder should come to READY state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_stop_001() -{ - tet_printf("\n ======================utc_camcorder_stop_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while realizing the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while starting the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_stop(camcorder); - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while unrealizing the camcorder with error %x \n", errorValue); - return; - } - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_start_focusing", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_stop_001 while stoping the camcorder with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_stop API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_STOP_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_stop_002() -{ - tet_printf("\n ======================utc_camcorder_stop_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_stop(0); - dts_check_ne("mm_camcorder_start_focusing", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_stop_002 while stoping the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_stop.h b/TC/utc/uts_mm_camcorder_stop.h deleted file mode 100644 index 5d6de94..0000000 --- a/TC/utc/uts_mm_camcorder_stop.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_stop.h -* @brief This file declares the camcorder stop test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_STOP_H -#define UTS_CAMCORDER_STOP_H - -void utc_camcorder_stop_001(); -void utc_camcorder_stop_002(); - -#endif /* UTS_CAMCORDER_STOP_H */ diff --git a/TC/utc/uts_mm_camcorder_stop_focusing.c b/TC/utc/uts_mm_camcorder_stop_focusing.c deleted file mode 100644 index 8b7aab3..0000000 --- a/TC/utc/uts_mm_camcorder_stop_focusing.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_STOP Uts_Mm_Camcorder_Stop -* @{ -*/ - - -/** -* @file uts_mm_camcorder_stop.c -* @brief This is a suite of unit test cases to test mm_camcorder_stop API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_stop_focusing.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_stop_focusing_001,1}, - {utc_camcorder_stop_focusing_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_stop API in normal conditions. - * @par ID: - * UTC_CAMCORDER_STOP_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in PREPARE state. - * @post Camcorder should come to READY state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_stop_focusing_001() -{ - tet_printf("\n ======================utc_camcorder_stop_001====================== \n"); - - gint errorValue = -1; - gint errorValue_check = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while realizing the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while starting the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_start_focusing(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_focusing_001 while starting focusing with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue_check = mm_camcorder_stop_focusing(camcorder); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while stoping the camcorder with error %x \n", errorValue); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while unrealizing the camcorder with error %x \n", errorValue); - return; - } - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_stop_focusing", errorValue_check, MM_ERROR_NONE, "Failed in utc_camcorder_stop_focusing_001 while stoping focusing with error %x \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_stop_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_stop API with invalid camcorder. - * @par ID: - * UTC_CAMCORDER_STOP_002 - * @param [in] Invalid handle - * @param [out] None - * @return Error code - */ -void utc_camcorder_stop_focusing_002() -{ - tet_printf("\n ======================utc_camcorder_stop_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_stop_focusing(0); - dts_check_ne("mm_camcorder_stop_focusing", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_stop_focusing_002 while stoping the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_stop_focusing.h b/TC/utc/uts_mm_camcorder_stop_focusing.h deleted file mode 100644 index ecc08a1..0000000 --- a/TC/utc/uts_mm_camcorder_stop_focusing.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_stop.h -* @brief This file declares the camcorder stop test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_STOP_FOCUSING_H -#define UTS_CAMCORDER_STOP_FOCUSING_H - -void utc_camcorder_stop_focusing_001(); -void utc_camcorder_stop_focusing_002(); - -#endif /* UTS_CAMCORDER_STOP_H */ diff --git a/TC/utc/uts_mm_camcorder_unrealize.c b/TC/utc/uts_mm_camcorder_unrealize.c deleted file mode 100644 index 5f2c1fa..0000000 --- a/TC/utc/uts_mm_camcorder_unrealize.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @ingroup Camcorder_API -* @addtogroup CAMCORDER Camcorder -*/ - -/** -* @ingroup CAMCORDER Camcorder -* @addtogroup UTS_CAMCORDER Unit -*/ - - -/** -* @ingroup UTS_CAMCORDER Unit -* @addtogroup UTS_MM_CAMCORDER_UNREALIZE Uts_Mm_Camcorder_Unrealize -* @{ -*/ - -/** -* @file uts_mm_camcorder_unrealize.c -* @brief This is a suite of unit test cases to test mm_camcorder_unrealize API. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#include "uts_mm_camcorder_unrealize.h" -#include "uts_mm_camcorder_utils.h" - -struct tet_testlist tet_testlist[] = { - {utc_camcorder_unrealize_001,1}, - {utc_camcorder_unrealize_002,2}, - {NULL,0} -}; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_unrealize API in normal conditions. - * @par ID: - * UTC_CAMCORDER_UNREALIZE_001 - * @param [in] camcorder = Valid Camcorder Handle - * @param [out] None - * @pre Camcorder should be in READY state. - * @post Camcorder should come to NULL state. - * @return MM_ERROR_NONE - */ -void utc_camcorder_unrealize_001() -{ - tet_printf("\n ======================utc_camcorder_unrealize_001====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - MMHandleType camcorder = 0; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - bReturnValue = CreateCamcorder(&camcorder, &info); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while creating the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - bReturnValue = SetDefaultAttributes(camcorder,IMAGE_MODE); - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while setting default attributes to the camcorder \n"); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_realize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while realizing the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_start(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while starting the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - sleep(2); - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while stopping the camcorder with error %x \n", errorValue); - tet_result(TET_UNTESTED); - return; - } - - errorValue = mm_camcorder_unrealize(camcorder); - - bReturnValue = DestroyCamcorder(camcorder); - - dts_check_eq("mm_camcorder_unrealize", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_unrealize_001 while unrealizing the camcorder with error %x but mm_camcorder_realize API was passed \n", errorValue); - - if (true != bReturnValue) { - tet_printf("\n Failed in utc_camcorder_unrealize_001 while destroying the camcorder \n"); - return; - } - - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This tests mm_camcorder_unrealize API iwith invalid handle. - * @par ID: - * UTC_CAMCORDER_UNREALIZE_002 - * @param [in] camcorder = Invalid Camcorder Handle - * @param [out] None - * @return Error code. - */ -void utc_camcorder_unrealize_002() -{ - tet_printf("\n ======================utc_camcorder_unrealize_002====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_unrealize(0); - dts_check_ne("mm_camcorder_unrealize", errorValue, MM_ERROR_NONE, "Failed in utc_camcorder_unrealize_002 while unrealizing the camcorder with error %x \n", errorValue); - - return; -} -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** @} */ diff --git a/TC/utc/uts_mm_camcorder_unrealize.h b/TC/utc/uts_mm_camcorder_unrealize.h deleted file mode 100644 index 8c4565c..0000000 --- a/TC/utc/uts_mm_camcorder_unrealize.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** -* @file uts_mm_camcorder_unrealize.h -* @brief This file declares the camcorder unrealize test cases. -* @author Kishor Reddy (p.kishor@samsung.com) -* @version Initial Creation V0.1 -* @date 2008.11.27 -*/ - -#ifndef UTS_CAMCORDER_UNREALIZE_H -#define UTS_CAMCORDER_UNREALIZE_H - -void utc_camcorder_unrealize_001(); -void utc_camcorder_unrealize_002(); - -#endif /* UTS_CAMCORDER_UNREALIZE_H */ diff --git a/TC/utc/uts_mm_camcorder_utils.c b/TC/utc/uts_mm_camcorder_utils.c deleted file mode 100644 index 0096a51..0000000 --- a/TC/utc/uts_mm_camcorder_utils.c +++ /dev/null @@ -1,911 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "uts_mm_camcorder_utils.h" - -#ifndef __arm__ -#include <gst/gst.h> -#endif -#include<stdio.h> - -#include <mm_sound.h> -GMainLoop *gGMainLoop = NULL; -camcorder_callback_parameters *gCamcorderCallbackParameters = NULL; -camcorder_callback_parameters *gCamcorderCallbackParametersArray[STRESS]; -int overlay = 1; - -void (*tet_startup)() = Startup; -void (*tet_cleanup)() = Cleanup; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void Startup() -{ - gGMainLoop = g_main_loop_new(NULL, FALSE); - if(!gGMainLoop) { - tet_printf("\n Failed in startup function while initializing GMainLoop \n"); - return; - } -#ifndef __arm__ - gst_init(NULL, NULL); -#endif - tet_printf("\n Initialization[Startup function] was completed \n"); - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void Cleanup() -{ - if (!gGMainLoop) { - return; - } - g_main_loop_unref(gGMainLoop); -/* if(gGMainLoop->context) { \\Kishor :: This is to check whether g_main_loop_unref was success or not - tet_printf("\n Failed in cleanup function while cleaning GMainLoop \n"); - return; - } -*/ tet_printf("\n Deinitialization[Cleanup function] was completed \n"); - return; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean CreateCamcorder(MMHandleType* camcorder, MMCamPreset* pInfo) -{ - tet_printf("\n ======================Creating Camcorder====================== \n"); - gint errorValue = -1; - - errorValue = mm_camcorder_create(camcorder, pInfo); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in CreateCamcorder while creating the camcorder with error %x \n", errorValue); - return false; - } - - if(gCamcorderCallbackParameters) { - free(gCamcorderCallbackParameters); - } - - gCamcorderCallbackParameters = (camcorder_callback_parameters *)malloc(sizeof(camcorder_callback_parameters)); - if(!gCamcorderCallbackParameters) { - tet_printf("\n Failed while allocating memory to gCamcorderCallbackParameters \n"); - return false; - } - - gCamcorderCallbackParameters->camcorder = *camcorder; - gCamcorderCallbackParameters->mode = IMAGE_MODE; - gCamcorderCallbackParameters->isMultishot = false; - gCamcorderCallbackParameters->stillshot_count = 0; - gCamcorderCallbackParameters->multishot_count = 0; - gCamcorderCallbackParameters->stillshot_filename = NULL; - gCamcorderCallbackParameters->multishot_filename = NULL; - gCamcorderCallbackParameters->stillshot_filename = (char *)malloc(25*sizeof(char)); - memset(gCamcorderCallbackParameters->stillshot_filename, 0, (25*sizeof(char))); - if(gCamcorderCallbackParameters->stillshot_filename!=NULL) { - gCamcorderCallbackParameters->stillshot_filename = "stillshot_file"; - } - gCamcorderCallbackParameters->multishot_filename = (char *)malloc(25*sizeof(char)); - if(!(gCamcorderCallbackParameters->multishot_filename)) { - gCamcorderCallbackParameters->multishot_filename = "multishot_file"; - } - /* - errorValue = mm_camcorder_set_filename_callback(gCamcorderCallbackParameters->camcorder, FilenameCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in CreateCamcorder while setting filename callback function in the camcorder with error %x \n", errorValue); - return false; - } - */ - - errorValue = mm_camcorder_set_message_callback(gCamcorderCallbackParameters->camcorder, MessageCallbackFunctionCalledByCamcorder, gCamcorderCallbackParameters); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in CreateCamcorder while setting message callback function in the camcorder with error %x \n", errorValue); - return false; - } - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This destroys the camcorder. - * @param [in] camcorder - * @code - errorValue = mm_camcorder_destroy(camcorder); - * @endcode - * @param [out] None - * @return true if successful, otherwise false. - */ -gboolean DestroyCamcorder(MMHandleType camcorder) -{ - tet_printf("\n ======================Destroying Camcorder====================== \n"); - - gint errorValue = -1; - - errorValue = mm_camcorder_destroy(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in DestroyCamcorder while destroying the camcorder with error %x \n", errorValue); - return false; - } - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean StartCamcorder(MMHandleType* camcorder, MMCamPreset* pInfo,gint mode) -{ - tet_printf("\n ======================Starting Camcorder====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - - bReturnValue = CreateCamcorder(camcorder, pInfo); - if (false == bReturnValue) { - tet_printf("\n Failed in StartCamcorder while creating the camcorder \n"); - return false; - } - - bReturnValue = SetDefaultAttributes(*camcorder,mode); - if (true != bReturnValue) { - tet_printf("\n Failed in StartCamcorder while setting default attributes to the camcorder \n"); - return false; - } - - errorValue = mm_camcorder_realize(*camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorder while realizing the camcorder with error %x but mm_camcorder_start API was passed \n", errorValue); - return false; - } - - errorValue = mm_camcorder_start(*camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorder while starting the camcorder with error %x but mm_camcorder_create API was passed \n", errorValue); - return false; - } - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @brief This stops and destroys the camcorder. - * @param [in] camcorder - * @code - errorValue = mm_camcorder_stop(camcorder); - errorValue = mm_camcorder_unrealize(camcorder); - bReturnValue = DestroyCamcorder(camcorder); - * @endcode - * @return true if successful, otherwise false. - */ -gboolean StopCamcorder(MMHandleType camcorder) -{ - tet_printf("\n ======================Stoping Camcorder====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - - errorValue = mm_camcorder_stop(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StopCamcorder while stoping the camcorder with error %x \n", errorValue); - return false; - } - - errorValue = mm_camcorder_unrealize(camcorder); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StopCamcorder while unrealizing the camcorder with error %x \n", errorValue); - return false; - } - - bReturnValue = DestroyCamcorder(camcorder); - if (true != bReturnValue) { - tet_printf("\n Failed in StopCamcorder while destroying the camcorder \n"); - return false; - } - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean StartCamcorderforNInstances(MMHandleType camcorderInstances[], gint noOfInstances) -{ - tet_printf("\n ======================StartCamcorderforNInstances====================== \n"); - - gint errorValue = -1; - gboolean bReturnValue = false; - gint outerLoopVariable = 0; - gint mode = IMAGE_MODE; - MMCamPreset info; - - info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - - for(outerLoopVariable = 0; outerLoopVariable < noOfInstances ; outerLoopVariable++) { - camcorderInstances[outerLoopVariable] = 0; - - errorValue = mm_camcorder_create((MMHandleType*)camcorderInstances[outerLoopVariable], &info); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while creating the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - return false;; - } - - if (!camcorderInstances[outerLoopVariable]) { - tet_printf("\n Failed in StartCamcorderforNInstances while accessing the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - return false;; - } - - mode = outerLoopVariable%3; - gCamcorderCallbackParametersArray[outerLoopVariable] = NULL; - gCamcorderCallbackParametersArray[outerLoopVariable] = (camcorder_callback_parameters *)malloc(sizeof(camcorder_callback_parameters)); - if(!gCamcorderCallbackParametersArray[outerLoopVariable]) { - tet_printf("\n Failed while allocating memory to gCamcorderCallbackParameters \n"); - return false; - } - - gCamcorderCallbackParametersArray[outerLoopVariable]->camcorder = camcorderInstances[outerLoopVariable]; - gCamcorderCallbackParametersArray[outerLoopVariable]->mode = mode; - gCamcorderCallbackParametersArray[outerLoopVariable]->isMultishot = false; - gCamcorderCallbackParametersArray[outerLoopVariable]->stillshot_count = 0; - gCamcorderCallbackParametersArray[outerLoopVariable]->multishot_count = 0; - gCamcorderCallbackParametersArray[outerLoopVariable]->stillshot_filename = NULL; - gCamcorderCallbackParametersArray[outerLoopVariable]->multishot_filename = NULL; - gCamcorderCallbackParametersArray[outerLoopVariable]->stillshot_filename = (char *)malloc(25*sizeof(char)); - if(!(gCamcorderCallbackParametersArray[outerLoopVariable]->stillshot_filename)) { - gCamcorderCallbackParametersArray[outerLoopVariable]->stillshot_filename = "stillshot_file"; - } - - gCamcorderCallbackParametersArray[outerLoopVariable]->multishot_filename = (char *)malloc(25*sizeof(char)); - if(!(gCamcorderCallbackParametersArray[outerLoopVariable]->multishot_filename)) { - gCamcorderCallbackParametersArray[outerLoopVariable]->multishot_filename = "multishot_file"; - } - /* - errorValue = mm_camcorder_set_filename_callback(camcorderInstances[outerLoopVariable], FilenameCallbackFunctionCalledByCamcorder, gCamcorderCallbackParametersArray[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while setting filename callback function in the camcorder with error %d \n", errorValue); - return false; - } - */ - - errorValue = mm_camcorder_set_message_callback(camcorderInstances[outerLoopVariable], MessageCallbackFunctionCalledByCamcorder, gCamcorderCallbackParametersArray[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while setting message callback function in the camcorder with error %x \n", errorValue); - return false; - } - - bReturnValue = SetDefaultAttributes(camcorderInstances[outerLoopVariable], mode); - if (true != bReturnValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while setting default attributes to the camcorder with mode %d (%d time) \n",mode, outerLoopVariable); - return false; - } - - errorValue = mm_camcorder_realize(camcorderInstances[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while realizing the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - return false; - } - - errorValue = mm_camcorder_start(camcorderInstances[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StartCamcorderforNInstances while starting the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - return false; - } - } - - tet_printf("\n In StartCamcorderforNInstances: All instances were started \n"); - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean StopCamcorderforNInstances(MMHandleType camcorderInstances[], gint noOfInstances) -{ - tet_printf("\n ======================StopCamcorderforNInstances====================== \n"); - - gint errorValue = -1; - gint failedInstances = 0; - gint outerLoopVariable = 0; - - for(outerLoopVariable = 0; outerLoopVariable < noOfInstances ; outerLoopVariable++) { - errorValue = mm_camcorder_stop(camcorderInstances[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StopCamcorderforNInstances while stoping the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - failedInstances++; - break; - } - - errorValue = mm_camcorder_unrealize(camcorderInstances[outerLoopVariable]); - if (MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in StopCamcorderforNInstances while unrealizing the camcorder with error %x (%d time) \n", errorValue, outerLoopVariable); - failedInstances++; - break; - } - - errorValue = mm_camcorder_destroy(camcorderInstances[outerLoopVariable]); - if ((MM_ERROR_NONE != errorValue) || (camcorderInstances[outerLoopVariable])) { - tet_printf("\n Failed in StopCamcorderforNInstances while destroying the camcorder with error %x (%d time) but mm_camcorder_create API was passed \n", errorValue, outerLoopVariable); - failedInstances++; - break; - } - } - - if(0 != failedInstances) { - tet_printf("\n Failed in StopCamcorderforNInstances, Number of Instances failed %d \n", failedInstances); - return false; - } - - tet_printf("\n In StopCamcorderforNInstances: All instances were stopped \n"); - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean SetDefaultAttributes(MMHandleType camcorder, gint mode) -{ - tet_printf("\n ======================Setting Default Attributes====================== \n"); - - if(0 == camcorder) { - tet_printf(" \n Failed in SetDefaultAttributes: Camcorder not yet created \n"); - return false; - } - - //MMHandleType attrsHandle =0; - char* err_attr_name = (char*)malloc(50); - int errorValue = -1; - - /*================================================================================ - Image mode - *=================================================================================*/ - if (IMAGE_MODE == mode) - { - errorValue = mm_camcorder_set_attributes(camcorder, &err_attr_name, - MMCAM_MODE, MM_CAMCORDER_MODE_IMAGE, - MMCAM_CAMERA_WIDTH, 320, - MMCAM_CAMERA_HEIGHT, 240, - MMCAM_CAMERA_FORMAT, MM_PIXEL_FORMAT_YUYV, - MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG, - MMCAM_IMAGE_ENCODER_QUALITY, IMAGE_ENC_QUALITY, - MMCAM_DISPLAY_DEVICE, MM_DISPLAY_DEVICE_MAINLCD, - MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_X, - MMCAM_DISPLAY_ROTATION, MM_DISPLAY_ROTATION_270, - MMCAM_CAPTURE_WIDTH, SRC_W_320, - MMCAM_CAPTURE_HEIGHT, SRC_H_240, - MMCAM_CAPTURE_COUNT, IMAGE_CAPTURE_COUNT_STILL, - NULL ); - - if (errorValue != MM_ERROR_NONE) { - tet_printf("\n Failed in mm_camcorder_set_attributes in image mode. attr_name[%s]\n", err_attr_name); - free( err_attr_name ); - err_attr_name = NULL; - return false; - } - } - /*================================================================================ - video mode - *=================================================================================*/ - else if (VIDEO_MODE == mode) - { - errorValue = mm_camcorder_set_attributes( camcorder, &err_attr_name, - MMCAM_CAMERA_WIDTH, SRC_W_320, - MMCAM_CAMERA_HEIGHT, SRC_H_240, - MMCAM_CAMERA_FORMAT, MM_PIXEL_FORMAT_NV12, - MMCAM_CAMERA_FPS, SRC_VIDEO_FRAME_RATE_30, - MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO, - MMCAM_AUDIO_DEVICE, MM_AUDIO_DEVICE_MIC, - MMCAM_AUDIO_ENCODER, MM_AUDIO_CODEC_AMR, - MMCAM_VIDEO_ENCODER, MM_VIDEO_CODEC_H264, - MMCAM_FILE_FORMAT, MM_FILE_FORMAT_3GP, - MMCAM_AUDIO_SAMPLERATE, AUDIO_SOURCE_SAMPLERATE, - MMCAM_AUDIO_FORMAT, AUDIO_SOURCE_FORMAT, - MMCAM_AUDIO_CHANNEL, AUDIO_SOURCE_CHANNEL, - "audio-input-route", MM_AUDIOROUTE_CAPTURE_NORMAL, - "audio-encoder-bitrate", AUDIO_SOURCE_SAMPLERATE, - MMCAM_DISPLAY_DEVICE, MM_DISPLAY_DEVICE_MAINLCD, - MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_X, - MMCAM_TARGET_FILENAME, TARGET_FILENAME, TARGET_FILENAME_LENGTH, - //MM_CAMCORDER_DISPLAY_ROTATION, DISPLAY_ROTATION, - NULL ); - - tet_printf("\n Setting MM_CAMCORDER_DISPLAY_HANDLE \n"); - - if (errorValue != MM_ERROR_NONE) { - tet_printf( "\n Failed in mm_camcorder_set_attributes in video mode. attr_name[%s]\n", err_attr_name ); - free( err_attr_name ); - err_attr_name = NULL; - return false; - } - } - /*================================================================================ - Audio mode - *=================================================================================*/ - else if (AUDIO_MODE == mode) - { - errorValue = mm_camcorder_set_attributes( camcorder, &err_attr_name, MMCAM_MODE, MM_CAMCORDER_MODE_AUDIO, - MMCAM_AUDIO_DEVICE, MM_AUDIO_DEVICE_MIC, - MMCAM_AUDIO_ENCODER, MM_AUDIO_CODEC_AMR, - MMCAM_FILE_FORMAT, MM_FILE_FORMAT_3GP, - MMCAM_AUDIO_SAMPLERATE, AUDIO_SOURCE_SAMPLERATE, - MMCAM_AUDIO_FORMAT, AUDIO_SOURCE_FORMAT, - MMCAM_AUDIO_CHANNEL, AUDIO_SOURCE_CHANNEL, - MMCAM_AUDIO_VOLUME, AUDIO_SOURCE_VOLUME, - MMCAM_AUDIO_ENCODER_BITRATE, MM_CAMCORDER_MR59, - MMCAM_TARGET_FILENAME, TARGET_FILENAME, TARGET_FILENAME_LENGTH, - NULL ); - - if (errorValue != MM_ERROR_NONE) { - tet_printf( "\n Failed in mm_camcorder_set_attributes in audio mode. attr_name[%s]\n", err_attr_name ); - free( err_attr_name ); - err_attr_name = NULL; - return false; - } - } - - free(err_attr_name); - err_attr_name = NULL; - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -gboolean GetDefaultAttributes(MMHandleType camcorder, gint mode) -{ - tet_printf("\n ======================Getting Default Attributes====================== \n"); - - if(0 == camcorder) { - tet_printf(" \n Failed in GetDefaultAttributes: Camcorder not yet created \n"); - return false; - } - - //MMHandleType attrsHandle = 0; - int attrsValue = -1; - char *stringAttrsValue = TARGET_FILENAME; - int filenameLength = TARGET_FILENAME_LENGTH; - int errorValue = -1; - char* err_attr_name = (char*)malloc(50); - - /*================================================================================ - Image mode - *=================================================================================*/ - if (IMAGE_MODE == mode) - { - /* profile attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_CAMCORDER_MODE_IMAGE)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting profile mode attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_DEVICE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_VIDEO_DEVICE_CAMERA0)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting profile video device attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_IMAGE_ENCODER, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_IMAGE_CODEC_JPEG)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting profile image codec attribute \n"); - return false; - } - /* image encoder attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_IMAGE_ENCODER_QUALITY, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != IMAGE_ENC_QUALITY)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting image encoder quality attribute \n"); - return false; - } - - /* display attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_DISPLAY_SURFACE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != DISPLAY_ID)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting display ID attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_DISPLAY_ROTATION, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != DISPLAY_ROTATION)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting display rotation attribute \n"); - return false; - } - - /* capture attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_WIDTH, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_W_320)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting capture width attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_HEIGHT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_H_240)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting capture height attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_COUNT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != IMAGE_CAPTURE_COUNT_STILL)) { - tet_printf("\n Failed in GetDefaultAttributes in image mode while getting capture count attribute \n"); - return false; - } - } - /*================================================================================ - video mode - *=================================================================================*/ - else if (VIDEO_MODE == mode) - { - /* video source attribute */ - /* - errorValue = mm_camcorder_get_attributes(camcorder, MM_CAMCORDER_ATTR_VIDEO_SOURCE, &attrsHandle); - if(MM_ERROR_NONE != errorValue) { - tet_printf("\n Failed in GetDefaultAttributes while getting the camcorder video mode video source attributes \n"); - return false; - } - */ - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_WIDTH, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_W_320)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video source width attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_HEIGHT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_H_240)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video source height attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_FPS, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_VIDEO_FRAME_RATE_30)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video source frame rate attribute \n"); - return false; - } - /* profile attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_CAMCORDER_MODE_VIDEO)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video mode attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_DEVICE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_AUDIO_DEVICE_MIC)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting audio device attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAMERA_DEVICE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_VIDEO_DEVICE_CAMERA0)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video device attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_ENCODER, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_AUDIO_CODEC_AMR)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting audio codec attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_VIDEO_ENCODER, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_VIDEO_CODEC_MPEG4)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video codec attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_FILE_FORMAT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_FILE_FORMAT_3GP)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting video file format attribute \n"); - return false; - } - - /* audio source attribute setting */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_SAMPLERATE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_SAMPLERATE)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting audio sample rate attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_FORMAT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_FORMAT)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting audio source format attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_CHANNEL, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_CHANNEL)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting audio source channel attribute \n"); - return false; - } - /* display attribute */ - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_DISPLAY_SURFACE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != DISPLAY_ID)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting display ID attribute \n"); - return false; - } - - /* capture attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_WIDTH, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_W_320)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting capture width attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_CAPTURE_HEIGHT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != SRC_H_240)) { - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting capture height attribute \n"); - return false; - } - /* target attribute setting */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, &stringAttrsValue, &filenameLength, NULL); - if ((errorValue < 0) || (stringAttrsValue != NULL)) { //Kishor: string comparison required between stringAttrsValue and TARGET_FILENAME - tet_printf("\n Failed in GetDefaultAttributes in video mode while getting target filename attribute \n"); - return false; - } - } - /*================================================================================ - Audio mode - *=================================================================================*/ - else if (AUDIO_MODE == mode) - { - /* profile attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_MODE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_CAMCORDER_MODE_AUDIO)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio mode attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_DEVICE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_AUDIO_DEVICE_MIC)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio device attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_ENCODER, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_AUDIO_CODEC_AMR)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio codec attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_FILE_FORMAT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_FILE_FORMAT_3GP)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio file format attribute \n"); - return false; - } - - /* audio source attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_SAMPLERATE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_SAMPLERATE)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio sample rate attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_FORMAT, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_FORMAT)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio source format attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_CHANNEL, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_CHANNEL)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio source channel attribute \n"); - return false; - } - - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_AUDIO_VOLUME, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != AUDIO_SOURCE_VOLUME)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio encoder bitrate attribute \n"); - return false; - } - /* audio encoder attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_VIDEO_ENCODER_BITRATE, &attrsValue, NULL); - if ((errorValue < 0) || (attrsValue != MM_CAMCORDER_MR59)) { - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting audio sample rate attribute \n"); - return false; - } - /* target attribute */ - errorValue = mm_camcorder_get_attributes(camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, &stringAttrsValue, &filenameLength, NULL); - if ((errorValue < 0) || (stringAttrsValue != NULL)) { //Kishor: string comparison required between stringAttrsValue and TARGET_FILENAME - tet_printf("\n Failed in GetDefaultAttributes in audio mode while getting target filename attribute \n"); - return false; - } - } - - free(err_attr_name); - err_attr_name = NULL; - - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool FilenameCallbackFunctionCalledByCamcorder(int format, char *filename, void *user_param) -{ - CAMCORDER_RETURN_IF_FAIL(filename, FALSE); - CAMCORDER_RETURN_IF_FAIL(user_param, FALSE); - - //MMHandleType attrsHandle; - char *newFilename = NULL, *previousFilename = NULL; - int errorValue; - int filenameLength = TARGET_FILENAME_LENGTH; - char* err_attr_name = (char*)malloc(50); - - camcorder_callback_parameters *userParamFromCamcorder = (camcorder_callback_parameters *)user_param; - switch (format) { - case MM_FILE_FORMAT_JPG: - /* target attribute */ - /* - errorValue = mm_camcorder_get_attributes(userParamFromCamcorder->camcorder, MM_CAMCORDER_ATTR_TARGET, &attrsHandle, NULL); - if(errorValue != MM_ERROR_NONE) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while getting attributes for the camcorder with JPG format \n"); - return FALSE; - } - */ - - errorValue = mm_camcorder_get_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, &previousFilename, &filenameLength, NULL); - newFilename = (char *)malloc(CAPTURE_FILENAME_LEN); - if (!newFilename) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while allocating memory for new file in the camcorder with JPG format \n"); - return FALSE; - } - memset(newFilename, '\0', CAPTURE_FILENAME_LEN); //Kishor :: needs to check the error - if (userParamFromCamcorder->isMultishot) { - sprintf(newFilename, "%s%03d.jpg", userParamFromCamcorder->multishot_filename, userParamFromCamcorder->multishot_count++); - } - else { - sprintf(newFilename, "%s%03d.jpg", userParamFromCamcorder->stillshot_filename, userParamFromCamcorder->stillshot_count++); - } - errorValue = mm_camcorder_set_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, newFilename, sizeof(newFilename), NULL); - if(errorValue < 0) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while setting the string attribute for the camcorder with JPG format \n"); - return FALSE; - } - - //Kishor :: free previous filename space - if (previousFilename) { - free(previousFilename); - } - break; - case MM_FILE_FORMAT_3GP: - /* target attribute setting */ - errorValue = mm_camcorder_get_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, &previousFilename, &filenameLength, NULL); - newFilename = (char *)malloc(CAPTURE_FILENAME_LEN); - if (!newFilename) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while allocating memory for new file in the camcorder with 3GP format \n"); - return FALSE; - } - memset(newFilename, '\0', CAPTURE_FILENAME_LEN); //Kishor :: needs to check the error - if (userParamFromCamcorder->isMultishot) { - sprintf(newFilename, "%s%03d.3gp", userParamFromCamcorder->multishot_filename, userParamFromCamcorder->multishot_count++); - } - else { - sprintf(newFilename, "%s%03d.3gp", userParamFromCamcorder->stillshot_filename, userParamFromCamcorder->stillshot_count++); //recorder team check - } - - errorValue = mm_camcorder_set_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, newFilename, sizeof(newFilename), NULL); - if(errorValue < 0) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while setting the string attribute for the camcorder with 3GP format \n"); - return FALSE; - } - - //Kishor :: free previous filename space - if (previousFilename) { - free(previousFilename); - } - break; - case MM_FILE_FORMAT_MP4: - /* target attribute setting */ - errorValue = mm_camcorder_get_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, &previousFilename, &filenameLength, NULL); - newFilename = (char *)malloc(CAPTURE_FILENAME_LEN); - if (!newFilename) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while allocating memory for new file in the camcorder with MP4 format \n"); - return FALSE; - } - memset(newFilename, '\0', CAPTURE_FILENAME_LEN); //Kishor :: needs to check the error - if (userParamFromCamcorder->isMultishot) { - sprintf(newFilename, "%s%03d.mp4", userParamFromCamcorder->multishot_filename, userParamFromCamcorder->multishot_count++); - } - else { - sprintf(newFilename, "%s%03d.mp4", userParamFromCamcorder->stillshot_filename, userParamFromCamcorder->stillshot_count++); //recorder team check - } - errorValue = mm_camcorder_set_attributes(userParamFromCamcorder->camcorder, &err_attr_name, MMCAM_TARGET_FILENAME, newFilename, sizeof(newFilename), NULL); - if(errorValue < 0) { - tet_printf("\n Failed in CallbackFunctionCalledByCamcorder while setting the string attribute for the camcorder with MP4 format \n"); - return FALSE; - } - - //Kishor :: free previous filename space - if (previousFilename) { - free(previousFilename); - } - break; - default: - g_assert_not_reached(); - break; - } - - CAMCORDER_RETURN_IF_FAIL(newFilename, FALSE); - strcpy(filename, newFilename); - if (newFilename) { - free(newFilename); - } - newFilename = NULL; - - return TRUE; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -int MessageCallbackFunctionCalledByCamcorder(int message, void *msg_param, void *user_param) -{ - CAMCORDER_RETURN_IF_FAIL(msg_param, FALSE); - CAMCORDER_RETURN_IF_FAIL(user_param, FALSE); - - MMMessageParamType *messageFromCamcorder = (MMMessageParamType*) msg_param; - //camcorder_callback_parameters *userParamFromCamcorder = (camcorder_callback_parameters *)user_param; - int camcorderState = -1; - //MMCamStillshotReport *stillshotReport = NULL; - switch (message) { - case MM_MESSAGE_CAMCORDER_ERROR: - tet_printf("\n In MessageCallbackFunctionCalledByCamcorder with MM_MESSAGE_CAMCORDER_ERROR \n"); - break; - case MM_MESSAGE_CAMCORDER_STATE_CHANGED: - camcorderState = messageFromCamcorder->state.current; - switch(camcorderState) { - case MM_CAMCORDER_STATE_NULL: - tet_printf("[CamcorderApp] Camcorder State is NULL \n"); - break; - case MM_CAMCORDER_STATE_READY: - tet_printf("[CamcorderApp] Camcorder State is READY \n"); - break; - case MM_CAMCORDER_STATE_PREPARE: - tet_printf("[CamcorderApp] Camcorder State is PREPARE \n"); - break; - case MM_CAMCORDER_STATE_CAPTURING: - tet_printf("[CamcorderApp] Camcorder State is CAPTURING \n"); - break; - case MM_CAMCORDER_STATE_RECORDING: - tet_printf("[CamcorderApp] Camcorder State is RECORDING \n"); - break; - case MM_CAMCORDER_STATE_PAUSED: - tet_printf("[CamcorderApp] Camcorder State is PAUSED \n"); - break; - default: - tet_printf("[CamcorderApp] Camcorder State is Unknown \n"); - break; - } - break; - case MM_MESSAGE_CAMCORDER_CAPTURED: - /* - stillshotReport = (MMCamStillshotReport*)(messageFromCamcorder->data); - if (!stillshotReport) { - tet_printf("\n Failed in MessageCallbackFunctionCalledByCamcorder while retriving mmcam_stillshot_report \n"); - return FALSE; - } - if (userParamFromCamcorder->isMultishot) { - tet_printf("[CamcorderApp] Camcorder Captured(filename=%s) \n", stillshotReport->stillshot_filename); - if (stillshotReport->stillshot_no >= IMAGE_CAPTURE_COUNT_MULTI) { - userParamFromCamcorder->isMultishot = FALSE; - } - } - if (stillshotReport->stillshot_filename) { - free(stillshotReport->stillshot_filename); - } - stillshotReport->stillshot_filename = NULL; - if (stillshotReport) { - free(stillshotReport); - } - stillshotReport = NULL; - */ - break; - default: - tet_printf("\n In MessageCallbackFunctionCalledByCamcorder with message as default \n"); - break; - } - return TRUE; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool VideoStreamCallbackFunctionCalledByCamcorder(void *stream, int width, int height, void *user_param) -{ - tet_printf("\n In VideoStreamCallbackFunctionCalledByCamcorder \n"); - return true; -} -//////////////////////////////////////////////////////////////////////////////////////////////////////////////// -bool VideoCaptureCallbackFunctionCalledByCamcorder(MMCamcorderCaptureDataType *frame, MMCamcorderCaptureDataType *thumbnail, void *user_param) -{ - tet_printf("\n In VideoCaptureCallbackFunctionCalledByCamcorder \n"); - return true; -} diff --git a/TC/utc/uts_mm_camcorder_utils.h b/TC/utc/uts_mm_camcorder_utils.h deleted file mode 100644 index 1a2368b..0000000 --- a/TC/utc/uts_mm_camcorder_utils.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * libmm-camcorder TC - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef UTS_MM_CAMCORDER_UTILS_H -#define UTS_MM_CAMCORDER_UTILS_H - -#define _MMCAMCORDER_ENABLE_CAMPROC - -#include <mm_camcorder.h> -#include <glib.h> -#include <tet_api.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -/** test case startup function */ -void Startup(); -/** test case clean up function */ -void Cleanup(); - -enum { - IMAGE_MODE = MM_CAMCORDER_MODE_IMAGE, - VIDEO_MODE = MM_CAMCORDER_MODE_VIDEO, - AUDIO_MODE = MM_CAMCORDER_MODE_AUDIO, -}; - -// 2M -#define SRC_W_1600 1600 -#define SRC_H_1200 1200 - -//VGA -#define SRC_W_640 640 -#define SRC_H_480 480 - -//QVGA -#define SRC_W_320 320 // video input width -#define SRC_H_240 240 // video input height - -//QCIF -#define SRC_W_176 176 // video input width -#define SRC_H_144 144 // video input height - -//QQVGA -#define SRC_W_160 160 // video input width -#define SRC_H_120 120 // video input heith - -//special resolution -#define SRC_W_400 400 // video input width -#define SRC_H_300 300 // video input height - -#define SRC_W_192 192 // video input width -#define SRC_H_256 256 // video input height - -#define SRC_W_144 144 // video input width -#define SRC_H_176 176 // video input height - -#define SRC_W_300 300 -#define SRC_W_400 400 - - -#define DISPLAY_X_0 0 //for direct FB -#define DISPLAY_Y_0 0 //for direct FB - -#define DISPLAY_W_320 320 //for direct FB -#define DISPLAY_H_240 240 //for direct FB -#define DISPLAY_W_640 640 -#define DISPLAY_H_480 480 -#define DISPLAY_ROTATION 0 - -#define MM_CAMCORDER_MR59 59 - -#ifdef __arm__ -#define AUDIO_SOURCE_CHANNEL 2 -#else -#define AUDIO_SOURCE_CHANNEL 1 -#endif - -#define AUDIO_SOURCE_SAMPLERATE 8000 -#define AUDIO_SOURCE_FORMAT MM_CAMCORDER_AUDIO_FORMAT_PCM_S16_LE -#define TARGET_FILENAME "/opt/media/.tc_tmp" -#define TARGET_FILENAME_LENGTH (sizeof(TARGET_FILENAME)+1) -#define AUDIO_SOURCE_VOLUME 1 - -#define DISPLAY_ID MM_DISPLAY_SURFACE_X - -#define SRC_VIDEO_FRAME_RATE_15 15 -#define SRC_VIDEO_FRAME_RATE_30 30 -#define IMAGE_ENC_QUALITY 85 -#define IMAGE_CAPTURE_COUNT_STILL 1 -#define IMAGE_CAPTURE_COUNT_MULTI 3 -#define IMAGE_CAPTURE_COUNT_INTERVAL 1000 - -#define CAPTURE_FILENAME_LEN 256 - -#define CAMCORDER_RETURN_IF_FAIL(expr, val) \ - if(expr) { \ - } \ - else { \ - return (val); \ - }; - -typedef struct _camcorder_callback_parameters -{ - MMHandleType camcorder; - int mode; /* image(capture)/video(recording) mode */ -// int flip_mode; - bool isMultishot; - int stillshot_count; /* total stillshot count */ - int multishot_count; /* total multishot count */ - char *stillshot_filename; /* stored filename of stillshot */ - char *multishot_filename; /* stored filename of multishot */ -// int g_current_state; -// int src_w, src_h; -// GstCaps *filtercaps; - -}camcorder_callback_parameters; - -#define STRESS 3 //This is for stress testing. - -extern camcorder_callback_parameters *gCamcorderCallbackParameters ; -extern camcorder_callback_parameters *gCamcorderCallbackParametersArray[STRESS] ; - -gboolean CreateCamcorder(MMHandleType* camcorder, MMCamPreset* pInfo); -gboolean DestroyCamcorder(MMHandleType camcorder); - -gboolean StartCamcorder(MMHandleType* camcorder, MMCamPreset* pInfo,gint mode); -gboolean StopCamcorder(MMHandleType camcorder); - -gboolean StartCamcorderforNInstances(MMHandleType camcorderInstances[], gint noOfInstances); -gboolean StopCamcorderforNInstances(MMHandleType camcorderInstances[], gint noOfInstances); - -gboolean SetDefaultAttributes(MMHandleType camcorder, gint mode); -gboolean GetDefaultAttributes(MMHandleType camcorder, gint mode); - -int MessageCallbackFunctionCalledByCamcorder(int message, void *msg_param, void *user_param); -bool FilenameCallbackFunctionCalledByCamcorder(int format, char *filename, void *user_param); -bool VideoStreamCallbackFunctionCalledByCamcorder(void *stream, int width, int height, void *user_param); -bool VideoCaptureCallbackFunctionCalledByCamcorder(MMCamcorderCaptureDataType *frame, MMCamcorderCaptureDataType *thumbnail, void *user_param); - -#endif /* UTS_MM_CAMCORDER_UTILS_H */ diff --git a/missing b/missing deleted file mode 100755 index 1c8ff70..0000000 --- a/missing +++ /dev/null @@ -1,367 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2006-05-10.23 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to <bug-automake@gnu.org>." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case $1 in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $1 in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/test/Makefile.am b/test/Makefile.am index c6859b0..c6859b0 100755..100644 --- a/test/Makefile.am +++ b/test/Makefile.am diff --git a/test/mm_camcorder_samplecode.c b/test/mm_camcorder_samplecode.c deleted file mode 100644 index 85cbf44..0000000 --- a/test/mm_camcorder_samplecode.c +++ /dev/null @@ -1,1116 +0,0 @@ -/* - * mm_camcorder_samsplecode - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: Jeongmo Yang <jm80.yang@samsung.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @mm_camcorder_samplecode.c - * - * @description - * This file contains usage example of mm_camcorder API. - * - * @author SoYeon Kang<soyeon.kang @samsung.com> - * Wonhyung Cho<wh01.cho@samsung.com> - */ - -/* =========================================================================================== -EDIT HISTORY FOR MODULE - This section contains comments describing changes made to the module. - Notice that changes are listed in reverse chronological order. -when who what, where, why ---------- -------------------- ---------------------------------------------------------- -07/07/10 wh01.cho@samsung.com Created -*/ - - -/*=========================================================================================== -| | -| INCLUDE FILES | -| | -========================================================================================== */ -#include <stdio.h> -#include <stdlib.h> -#include <glib.h> - -#include <mm_camcorder.h> - -#include <appcore-efl.h> - -#include <Elementary.h> -#include <Ecore_X.h> - -/*--------------------------------------------------------------------------- -| GLOBAL VARIABLE DEFINITIONS: | ----------------------------------------------------------------------------*/ - -GIOChannel *stdin_channel; -int g_current_state; - -MMHandleType hcam = 0; -unsigned int elapsed_time = 0; -int stillshot_count = 0; - -void * overlay = NULL; - -struct appdata -{ - Evas *evas; - Ecore_Evas *ee; - Evas_Object *win_main; - - Evas_Object *layout_main; /* layout widget based on EDJ */ - Ecore_X_Window xid; - - /* add more variables here */ -}; - -int r; -struct appdata ad; - - -/*--------------------------------------------------------------------------- -| LOCAL CONSTANT DEFINITIONS: | ----------------------------------------------------------------------------*/ -#define MAX_STRING_LEN 256 // maximum length of string -#define TARGET_FILENAME "/root/av.mp4" - -/*--------------------------------------------------------------------------- -| LOCAL DATA TYPE DEFINITIONS: | ----------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------- -| LOCAL VARIABLE DEFINITIONS: | ----------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------- -| LOCAL FUNCTION PROTOTYPES: | ----------------------------------------------------------------------------*/ -/* Application Body */ -int main(int argc, char **argv); -static gboolean cmd_input(GIOChannel *channel); -static void main_menu(gchar buf); -static gboolean mode_change(); -static void menu(); - - -/* Start and finish */ -static gboolean msg_callback(int message, void *msg_param, void *user_param); -static gboolean initialize_image_capture(); -static gboolean initialize_video_capture(); //A/V recording -static gboolean initialize_audio_capture(); //audio only recording -static gboolean uninitialize_camcorder(); - - -/* Sample functions */ -static gboolean capturing_picture(); -static gboolean record_and_save_video_file(); -static gboolean record_and_cancel_video_file(); -static gboolean record_pause_and_resume_recording(); -static gboolean get_state_of_camcorder(); -static gboolean start_autofocus(); -static gboolean filename_setting(); -static gboolean set_video_stream_callback(); - - -/* APPFWK functions*/ -int app_init(void *data); -int app_exit(void *data); -int app_start(void *data); -int app_stop(void *data); -int idler_exit_cb(void *data); - - -/*--------------------------------------------------------------------------- -| LOCAL FUNCTION DEFINITIONS: | ----------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------- -| Sample Functions: | ----------------------------------------------------------------------------*/ -static int -camcordertest_video_capture_cb(MMCamcorderCaptureDataType *src, MMCamcorderCaptureDataType *thumb, void *preview) -{ - int nret = 0; - char m_filename[MAX_STRING_LEN]; - FILE* fp=NULL; - - snprintf(m_filename, MAX_STRING_LEN, "./stillshot_%03d.jpg", stillshot_count++); - - printf("filename : %s\n", m_filename); - - fp=fopen(m_filename, "w+"); - if(fp==NULL) - { - printf("FileOPEN error!!\n"); - return FALSE; - } - else - { - printf("open success\n\n"); - if(fwrite(src->data, src->length, 1, fp )!=1) - { - printf("File write error!!\n"); - return FALSE; - } - printf("write success\n"); - } - fclose(fp); - printf("Capture done!\n"); - - return TRUE; -} - - -static int -camcordertest_video_stream_cb(MMCamcorderVideoStreamDataType *stream, void *user_param) -{ - int nret = 0; - - printf("stream cb is called(%p, %d, %d)\n", stream->data, stream->width, stream->height); - - return TRUE; -} - - -static gboolean msg_callback(int message, void *msg_param, void *user_param) -{ - MMHandleType hcamcorder = (MMHandleType)user_param; - MMMessageParamType *param = (MMMessageParamType *) msg_param; - int err = 0; - - switch (message) { - case MM_MESSAGE_CAMCORDER_ERROR: - printf("MM_MESSAGE_CAMCORDER_ERROR : code = %x\n", param->code); - break; - case MM_MESSAGE_CAMCORDER_STATE_CHANGED: - g_current_state = param->state.current; - break; - - case MM_MESSAGE_CAMCORDER_CAPTURED: - { - //Get mode of camcorder - int mode = 0; - err = mm_camcorder_get_attributes(hcamcorder, NULL, - MMCAM_MODE, &mode, - NULL); - - if (mode == MM_CAMCORDER_MODE_IMAGE) - { - printf("Stillshot Captured!!(number=%d)\n", param->code); //If you start multi shot, 'param->code' will give you the order of the pictrues. - - err = mm_camcorder_capture_stop(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_capture_start = %x\n", err); - return FALSE; - } - } - else - { - //Audio/Video recording - MMCamRecordingReport* report ; - - if (param) - report = (MMCamRecordingReport*)(param->data); - else - return FALSE; - - printf("Recording Complete(filename=%s)\n", report->recording_filename); - - //You have to release 'recording_filename' and 'MMCamRecordingReport' structure. - if (report->recording_filename) - free(report->recording_filename); - - if (report) - free(report); - } - } - break; - case MM_MESSAGE_CAMCORDER_RECORDING_STATUS: - { - unsigned int elapsed; - elapsed = param->recording_status.elapsed / 1000; - if (elapsed_time != elapsed) { - unsigned int temp_time; - int hour, minute, second; - elapsed_time = elapsed; - temp_time = elapsed; - hour = temp_time / 3600; - temp_time = elapsed % 3600; - minute = temp_time / 60; - second = temp_time % 60; - printf("Current Time - %d:%d:%d\n", hour, minute, second); - } - } - break; - case MM_MESSAGE_CAMCORDER_MAX_SIZE: - { - printf("Reach Size limitation.\n"); - - /* After reaching max size, Camcorder starts to drop all buffers that it receives. - You have to call mm_camcorder_commit() to finish recording. */ - err = mm_camcorder_commit(hcamcorder); - - if (err < 0) - { - printf("Save recording mm_camcorder_commit = %x\n", err); - } - } - break; - case MM_MESSAGE_CAMCORDER_NO_FREE_SPACE: - { - printf("There is no space in storage.\n"); - - /* If there is no free space to save recording frame, Camcorder starts to drop all buffers that it receives. - You have to call mm_camcorder_commit() to finish recording. */ - err = mm_camcorder_commit(hcamcorder); - - if (err < 0) - { - printf("Save recording mm_camcorder_commit = %x\n", err); - } - } - break; - case MM_MESSAGE_CAMCORDER_TIME_LIMIT: - { - printf("Reach time limitation.\n"); - - /* After reaching time limit, Camcorder starts to drop all buffers that it receives. - You have to call mm_camcorder_commit() to finish recording. */ - err = mm_camcorder_commit(hcamcorder); - - if (err < 0) - { - printf("Save recording mm_camcorder_commit = %x\n", err); - } - } - break; - case MM_MESSAGE_CAMCORDER_FOCUS_CHANGED: - { - printf( "Focus State changed. State:[%d]\n", param->code ); - } - break; - default: - break; - } - - return TRUE; -} - -static gboolean initialize_image_capture() -{ - int err; - MMCamPreset cam_info; - char *err_attr_name = NULL; - void * hdisplay = NULL; - int hsize = 0; - - cam_info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - /* If you want to turn front camera on, disable upper line and enable below one.*/ -// cam_info.videodev_type = MM_VIDEO_DEVICE_CAMERA1; - - err = mm_camcorder_create(&hcam, &cam_info); - - if (err != MM_ERROR_NONE) - { - printf("Fail to call mm_camcorder_create = %x\n", err); - return FALSE; - } - - mm_camcorder_set_message_callback(hcam, (MMMessageCallback)msg_callback, (void*)hcam); - mm_camcorder_set_video_capture_callback(hcam, (mm_camcorder_video_capture_callback)camcordertest_video_capture_cb, (void*)hcam); - - hdisplay = &ad.xid; - hsize = sizeof(ad.xid); - - /* camcorder attribute setting */ - err = mm_camcorder_set_attributes((MMHandleType)hcam, &err_attr_name, - MMCAM_MODE, MM_CAMCORDER_MODE_IMAGE, - MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG, - MMCAM_CAMERA_WIDTH, 640, - MMCAM_CAMERA_HEIGHT, 480, - MMCAM_CAMERA_FORMAT, MM_PIXEL_FORMAT_YUYV, - MMCAM_CAMERA_FPS, 30, - MMCAM_DISPLAY_ROTATION, MM_DISPLAY_ROTATION_270, - MMCAM_DISPLAY_HANDLE, (void*) hdisplay, hsize, - MMCAM_CAPTURE_FORMAT, MM_PIXEL_FORMAT_ENCODED, - MMCAM_CAPTURE_WIDTH, 640, - MMCAM_CAPTURE_HEIGHT, 480, - NULL); - - if (err < 0) - { - printf("Set attrs fail. (%s:%x)\n", err_attr_name, err); - if (err_attr_name) { - free(err_attr_name); - err_attr_name = NULL; - return FALSE; - } - } - - err = mm_camcorder_realize(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_realize = %x\n", err); - return FALSE; - } - - /* start camcorder */ - err = mm_camcorder_start(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_start = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean initialize_video_capture() //A/V recording -{ - int err; - MMCamPreset cam_info; - char *err_attr_name = NULL; - void * hdisplay = NULL; - int hsize = 0; - - cam_info.videodev_type = MM_VIDEO_DEVICE_CAMERA0; - /* If you want to turn front camera on, disable upper line and enable below one.*/ -// cam_info.videodev_type = MM_VIDEO_DEVICE_CAMERA1; - - err = mm_camcorder_create(&hcam, &cam_info); - - if (err != MM_ERROR_NONE) - { - printf("Fail to call mm_camcorder_create = %x\n", err); - return FALSE; - } - - mm_camcorder_set_message_callback(hcam, (MMMessageCallback)msg_callback, hcam); - - hdisplay = &ad.xid; - hsize = sizeof(ad.xid); - - /* camcorder attribute setting */ - err = mm_camcorder_set_attributes((MMHandleType)hcam, &err_attr_name, - MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO, - MMCAM_AUDIO_DEVICE, MM_AUDIO_DEVICE_MIC, - MMCAM_AUDIO_ENCODER, MM_AUDIO_CODEC_AAC, - MMCAM_VIDEO_ENCODER, MM_VIDEO_CODEC_MPEG4, - MMCAM_FILE_FORMAT, MM_FILE_FORMAT_3GP, - MMCAM_CAMERA_WIDTH, 1280, - MMCAM_CAMERA_HEIGHT, 720, - MMCAM_CAMERA_FORMAT, MM_PIXEL_FORMAT_NV12, - MMCAM_CAMERA_FPS, 30, - MMCAM_AUDIO_SAMPLERATE, 44100, - MMCAM_AUDIO_FORMAT, MM_CAMCORDER_AUDIO_FORMAT_PCM_S16_LE, - MMCAM_AUDIO_CHANNEL, 2, - MMCAM_AUDIO_INPUT_ROUTE, MM_AUDIOROUTE_CAPTURE_NORMAL, - MMCAM_DISPLAY_ROTATION, MM_DISPLAY_ROTATION_270, - MMCAM_DISPLAY_HANDLE, (void*) hdisplay, hsize, - MMCAM_TARGET_FILENAME, TARGET_FILENAME, strlen(TARGET_FILENAME), - NULL); - - if (err < 0) - { - printf("Set attrs fail. (%s:%x)\n", err_attr_name, err); - if (err_attr_name) { - free(err_attr_name); - err_attr_name = NULL; - return FALSE; - } - } - - err = mm_camcorder_realize(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_realize = %x\n", err); - return FALSE; - } - - /* start camcorder */ - err = mm_camcorder_start(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_start = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean initialize_audio_capture() //audio only recording -{ - int err; - MMCamPreset cam_info; - char *err_attr_name = NULL; - void * hdisplay = NULL; - int hsize = 0; - - cam_info.videodev_type = MM_VIDEO_DEVICE_NONE; - - err = mm_camcorder_create(&hcam, &cam_info); - - if (err != MM_ERROR_NONE) - { - printf("Fail to call mm_camcorder_create = %x\n", err); - return FALSE; - } - - mm_camcorder_set_message_callback(hcam, (MMMessageCallback)msg_callback, (void*)hcam); - - hdisplay = &ad.xid; - hsize = sizeof(ad.xid); - - /* camcorder attribute setting */ - err = mm_camcorder_set_attributes((MMHandleType)hcam, &err_attr_name, - MMCAM_MODE, MM_CAMCORDER_MODE_AUDIO, - MMCAM_AUDIO_DEVICE, MM_AUDIO_DEVICE_MIC, - MMCAM_AUDIO_ENCODER, MM_AUDIO_CODEC_AAC, - MMCAM_FILE_FORMAT, MM_FILE_FORMAT_3GP, - MMCAM_AUDIO_SAMPLERATE, 44100, - MMCAM_AUDIO_FORMAT, MM_CAMCORDER_AUDIO_FORMAT_PCM_S16_LE, - MMCAM_AUDIO_CHANNEL, 2, - MMCAM_AUDIO_INPUT_ROUTE, MM_AUDIOROUTE_CAPTURE_NORMAL, - MMCAM_TARGET_FILENAME, TARGET_FILENAME, strlen(TARGET_FILENAME), - MMCAM_TARGET_TIME_LIMIT, 360000, - NULL); - - if (err < 0) - { - printf("Set attrs fail. (%s:%x)\n", err_attr_name, err); - if (err_attr_name) { - free(err_attr_name); - err_attr_name = NULL; - return FALSE; - } - } - - err = mm_camcorder_realize(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_realize = %x\n", err); - return FALSE; - } - - /* start camcorder */ - err = mm_camcorder_start(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_start = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean uninitialize_camcorder() -{ - int err; - - err = mm_camcorder_stop(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_stop = %x\n", err); - return FALSE; - } - - err = mm_camcorder_unrealize(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_unrealize = %x\n", err); - return FALSE; - } - - err = mm_camcorder_destroy(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_destroy = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean capturing_picture() -{ - int err; - - err = mm_camcorder_capture_start(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_capture_start = %x\n", err); - return FALSE; - } - - //mm_camcorder_capture_stop should be called after getting MM_MESSAGE_CAMCORDER_CAPTURED message. - sleep(3); - - return TRUE; -} - - -static gboolean record_and_save_video_file() -{ - int err; - - /* Start recording */ - err = mm_camcorder_record(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_record = %x\n", err); - return FALSE; - } - - sleep(5); - - /* Save file */ - err = mm_camcorder_commit(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_commit = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean record_and_cancel_video_file() -{ - int err; - - /* Start recording */ - err = mm_camcorder_record(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_record = %x\n", err); - return FALSE; - } - - sleep(5); - - /* Cancel recording */ - err = mm_camcorder_cancel(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_cancel = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean record_pause_and_resume_recording() -{ - int err; - - /* Start recording */ - err = mm_camcorder_record(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_record = %x\n", err); - return FALSE; - } - - sleep(5); - - /* Pause */ - err = mm_camcorder_pause(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_pause = %x\n", err); - return FALSE; - } - - sleep(3); - - /* Resume */ - err = mm_camcorder_record(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_record = %x\n", err); - return FALSE; - } - - sleep(3); - - /* Save file */ - err = mm_camcorder_commit(hcam); - if (err < 0) - { - printf("Fail to call mm_camcorder_commit = %x\n", err); - return FALSE; - } - - return TRUE; -} - - -static gboolean get_state_of_camcorder() -{ - MMCamcorderStateType state; - - mm_camcorder_get_state(hcam, &state); - printf("Current status is %d\n", state); - - return TRUE; -} - - -static gboolean start_autofocus() -{ - int err; - char * err_attr_name = NULL; - - /* Set focus mode to 'AUTO' and scan range to 'AF Normal' */ - err = mm_camcorder_set_attributes((MMHandleType)hcam, &err_attr_name, - MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_AUTO, - MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL, - NULL); - - if (err < 0) - { - printf("Set attrs fail. (%s:%x)\n", err_attr_name, err); - if (err_attr_name) { - free(err_attr_name); - err_attr_name = NULL; - return FALSE; - } - } - - mm_camcorder_start_focusing(hcam); - printf("Waiting for adjusting focus\n"); - - /*Waiting for 'MM_MESSAGE_CAMCORDER_FOCUS_CHANGED' */ - sleep(3); - - return TRUE; -} - -static gboolean filename_setting() -{ - int err; - char * new_filename = "new_name.mp4"; - - /* camcorder attribute setting */ - err = mm_camcorder_set_attributes((MMHandleType)hcam, NULL, - MMCAM_TARGET_FILENAME, new_filename, strlen(new_filename), - NULL); - - printf("New file name (%s)\n", new_filename); - - sleep(3); - - return TRUE; -} - - -static gboolean set_video_stream_callback() -{ - mm_camcorder_set_video_stream_callback(hcam, (mm_camcorder_video_stream_callback)camcordertest_video_stream_cb, (void*)hcam); - - sleep(10); - - return TRUE; -} - - -/*--------------------------------------------------------------------------- -| APPFWK Functions: | ----------------------------------------------------------------------------*/ -int app_init(void *data) -{ - struct appdata *ad = data; - - printf("Function : %s", __func__); - - appcore_measure_start("app_init"); - - ad->win_main = appcore_efl_get_main_window(); - if(ad->win_main == NULL) { - printf("ad->win_main(%p)", ad->win_main); - return (-1); - } - - ad->evas = evas_object_evas_get(ad->win_main); - - ad->layout_main = appcore_efl_load_edj(ad->win_main, "/usr/share/edje/cam_testsuite.edj", "main"); - if(ad->layout_main == NULL) { - printf("ad->layout_main(%p)", ad->layout_main); - return (-1); - } - -// appcore_set_font_name(_("vera")); - - - evas_object_layer_set(ad->win_main, 0); - - evas_object_move(ad->win_main, 0, 0); - evas_object_resize(ad->win_main, 800, 480); - - elm_win_rotation_set(ad->win_main, 270); - elm_win_fullscreen_set(ad->win_main, 1); - - evas_object_color_set(ad->win_main, 0,0,0,0); - elm_win_transparent_set(ad->win_main, 1); - - if(!(ad->xid)) - { - if(ad->win_main ) - ad->xid = elm_win_xwindow_get(ad->win_main); - } - - evas_object_show(ad->win_main); - - // - { - int bret; - bret = mode_change(); - - if(!bret) - { - printf("\t mode_change() fail. Exit from the application.\n"); - } - menu(); - } - appcore_measure_time("app_init"); - - return 0; -} - - -int app_exit(void *data) -{ - printf("Function : %s", __func__); - - return 0; -} - - -int app_start(void *data) -{ - printf("Function : %s", __func__); - - appcore_measure_start("app_start"); - - appcore_measure_time("app_start"); - - return 0; -} - - -int app_stop(void *data) -{ - printf("Function : %s", __func__); - - appcore_measure_start("app_stop"); - - appcore_measure_time("app_stop"); - - return 0; -} - - -static int app_procedure(int event, void *event_param, void *user_param) { - switch (event) { - case APPCORE_EVENT_CREATE: // initialize and create first view - { - app_init(user_param); - return 1; - } - - case APPCORE_EVENT_START: // if necessary to speed up launching time, add deferred initialization which is not relevant to first view's drawing - { - app_start(user_param); - return 1; - } - - case APPCORE_EVENT_STOP: // add necessary code when a multi-tasking supported application enters from the FG (on the TOP of screen) to the BG (on the LOW of screen) - { - app_stop(user_param); // // this event is received when a multi-tasking supported application enters from top screen to background if user clicks "HOME" key - return 1; - } - - case APPCORE_EVENT_RESUME: // add necessary code when a multi-tasking supported application enters from the BG (on the LOW of screen) to the FG (on the TOP of screen) - { -// app_resume(user_param); - return 1; - } - case APPCORE_EVENT_TERMINATE: // free allocated resources before application exits - { - app_exit(user_param); - return 1; - } - case APPCORE_EVENT_LOW_BATTERY: // free allocated resources before application exits - { - return 1; /* 1 means this event is processed in user, 0 or -1 means this event is processed with system default behavior(application terminate) */ - } - case APPCORE_EVENT_LANG_CHANGE: // update internalization according to language change - { - return 1; - } - default: - break; - } - return 0; - -} - - -int idler_exit_cb(void *data) -{ -// ecore_x_window_hide(ad->xid); - elm_exit(); - - return 0; -} - - -static inline void flush_stdin() -{ - int ch; - while((ch=getchar()) != EOF && ch != '\n'); -} - - -static void menu() -{ - int mode = 0; - int err = 0; - //Get mode of camcorder - err = mm_camcorder_get_attributes(hcam, NULL, - MMCAM_MODE, &mode, - NULL); - - if (mode == MM_CAMCORDER_MODE_IMAGE) - { - printf("\nmm-camcorder Sample Application\n"); - printf("\t=======================================\n"); - printf("\t '1' Capture image \n"); - printf("\t '5' Get state \n"); - printf("\t '6' Start Auto-focus \n"); - printf("\t '8' Set video stream callback \n"); - printf("\t 'b' back.\n"); - printf("\t=======================================\n"); - } - else if (mode == MM_CAMCORDER_MODE_VIDEO) - { - printf("\nmm-camcorder Sample Application\n"); - printf("\t=======================================\n"); - printf("\t '2' Record and Save video file \n"); - printf("\t '3' Record and Cancel video file \n"); - printf("\t '4' Record, Pause and Resume recording \n"); - printf("\t '5' Get state \n"); - printf("\t '6' Start Auto-focus \n"); - printf("\t '7' Filename setting(only for recording) \n"); - printf("\t 'b' back.\n"); - printf("\t=======================================\n"); - } - else - { - printf("\nmm-camcorder Sample Application\n"); - printf("\t=======================================\n"); - printf("\t '2' Record and Save video file \n"); - printf("\t '3' Record and Cancel video file \n"); - printf("\t '4' Record, Pause and Resume recording \n"); - printf("\t '5' Get state \n"); - printf("\t '7' Filename setting(only for recording) \n"); - printf("\t 'b' back.\n"); - printf("\t=======================================\n"); - } - - return; -} - - -static gboolean mode_change() -{ - char media_type = '\0'; - bool check= FALSE; - - while(!check) - { - printf("\t=============================\n"); - printf("\t 'i' Image.\n"); - printf("\t 'v' Video.\n"); - printf("\t 'a' Audio.\n"); - printf("\t 'q' Exit.\n"); - printf("\t=============================\n"); - printf("\t Enter the media type:\n\t"); - - while ((media_type=getchar()) == '\n'); - - switch(media_type) - { - case 'i': - printf("\t=============image================\n"); - - if (!initialize_image_capture()) - { - printf("Fail to call initialize_image_capture\n"); - goto _EXIT; - } - check = TRUE; - break; - case 'v': - printf("\t=============video================\n"); - - if (!initialize_video_capture()) - { - printf("Fail to call initialize_video_capture\n"); - goto _EXIT; - } - check = TRUE; - break; - case 'a': - printf("\t==============audio===============\n"); - - if (!initialize_audio_capture()) - { - printf("Fail to call initialize_audio_capture\n"); - goto _EXIT; - } - - check = TRUE; - break; - case 'q': - printf("\t Quit Camcorder Sample Code!!\n"); - goto _EXIT; - default: - printf("\t Invalid media type(%d)\n", media_type); - continue; - } - } - - ecore_x_sync(); - - return TRUE; - -_EXIT: - ecore_timer_add(0.1, idler_exit_cb, NULL); - return FALSE; -} - - -static void command(gchar buf) -{ - switch(buf) - { - case '1' : // Capture image - { - capturing_picture(); - } - break; - case '2' : // Record and Save video file - { - record_and_save_video_file(); - } - break; - case '3' : // Record and Cancel video file - { - record_and_cancel_video_file(); - } - break; - case '4' : // Record, Pause and Resume recording - { - record_pause_and_resume_recording(); - } - break; - case '5' : // Get state - { - get_state_of_camcorder(); - } - break; - case '6' : // Start Auto-focus - { - start_autofocus(); - } - break; - case '7' : // Filename setting(only for recording) - { - filename_setting(); - } - break; - case '8' : // Set video stream callback - { - set_video_stream_callback(); - } - break; - case 'b' : // back - if (!uninitialize_camcorder()) - { - printf("Fail to call uninitialize_camcorder\n"); - return; - } - - mode_change(); - break; - default: - printf("\t Invalid input \n"); - break; - } - -} - - -static gboolean cmd_input(GIOChannel *channel) -{ - gchar buf[256]; - gsize read; - - g_io_channel_read(channel, buf, MAX_STRING_LEN, &read); - buf[read] = '\0'; - g_strstrip(buf); - - command(buf[0]); - - menu(); - return TRUE; -} - - -int main(int argc, char **argv) -{ - int bret = 0; - if (!g_thread_supported ()) - g_thread_init (NULL); - - stdin_channel = g_io_channel_unix_new (0);/* read from stdin */ - g_io_add_watch (stdin_channel, G_IO_IN, (GIOFunc)cmd_input, NULL); - - appcore_measure_link_load_time("camera", NULL); - - memset(&ad, 0x0, sizeof(struct appdata)); - - bret = appcore_efl_main("camera", argc, argv, app_procedure, 0, &ad /* user_param, if needed */ ); - - printf("Main loop quit\n"); - - printf("\t Exit from the application.\n"); - - return 0; -} - - -/*EOF*/ |