Videocapture in python

Tim Roberts timr at probo.com
Fri Jan 2 02:30:30 CET 2009


koranthala at gmail.com wrote:
>
>On using videocapture (python 2.4), I am facing the following issues
>while creating a video sort of application.
>-> Pull out the usb cable : Videocapture gets the data stored
>initially in the buffer and returns always. The images are not updated
>- but also there is no error returned.
>i.e. there is no information to the viewer that it is not working
>anymore. Especially because since the timestamp is updated everytime
>(it is done inside videocapture.py - wherein current time is
>overwritten on the received image), it gives a feeling that video is
>running.
>
>Currently I have done a workaround in that every 2 captures, i setup
>the camera again - but it takes too much time. Anyone has any
>suggestions on solving this?

The "right" way to fix this is to modify the C++ code that sets up the
DirectShow filter graph.  The graph builder has the ability to deliver
events asynchronously, like when the device goes away, but it would not be
trivial to incorporate that into the module as written.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list