From f69ce9912b08dbba82044b4337dec2ec498cc36f Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sun, 26 Dec 2010 19:22:19 +0000 Subject: add variable pause for camera capture depending upon hardware --- (limited to 'TurtleArt/tacamera.py') diff --git a/TurtleArt/tacamera.py b/TurtleArt/tacamera.py index f7e08ff..a4227ed 100644 --- a/TurtleArt/tacamera.py +++ b/TurtleArt/tacamera.py @@ -22,7 +22,7 @@ import gst, time -def save_camera_input_to_file(imagepath): +def save_camera_input_to_file(imagepath, pause=2.0): """ Grab a frame from the video camera and save to a temporary file """ pipeline = gst.parse_launch( @@ -30,6 +30,6 @@ def save_camera_input_to_file(imagepath): pipeline.set_state(gst.STATE_PLAYING) # Need to pause for pipeline to stablize - time.sleep(2) + time.sleep(pause) pipeline.set_state(gst.STATE_NULL) -- cgit v0.9.1