2 This script will test highgui's video reading functionality
3 for a given parameter RAW formats.
6 # needed for sys.exit(int) and .works file handling
12 #import the necessary things for OpenCV
14 from python.highgui import *
15 from python.cv import *
19 TESTNAME = "cvCreateFileCapture"
21 PREFIX = os.environ["top_srcdir"]+"/tests/python/testdata/videos/qcif_"
25 # this functions tries to open a videofile
26 # using the filename PREFIX+FORMAT+.EXTENSION and returns True/False
29 def video_ok( FORMAT ):
31 # check requirements and delete old .works file
32 if not works.check_files( REQUIRED, TESTNAME+FORMAT ):
35 filename = PREFIX+FORMAT+EXTENSION
36 video = cvCreateFileCapture(PREFIX+FORMAT+EXTENSION)
39 works.set_file( TESTNAME+FORMAT )