[AG-TECH] AG2.2 replacement for setupvideo.py
Eric Olson
eolson at mcs.anl.gov
Fri Jul 23 12:54:29 CDT 2004
Thanks for the patch David! -- it was checked in.
Eric
On Fri, 18 Jun 2004 dgolden at cp.dias.ie wrote:
> >
> > That makes sense, clearly the discovery of devices in that code is
> > platform
> > specific.
> >
> > If you can write a python function that enumerates them we can integrate
> > that as a patch.
> >
>
> Not the most general fix ever, but the below works:
>
> --- Config.py.orig 2004-06-18 16:03:28.000000000 +0100
> +++ Config.py 2004-06-18 17:35:31.000000000 +0100
> @@ -641,11 +641,15 @@
> deviceList = dict()
>
> videodevpath = '/proc/video/dev'
> +
> + if os.path.exists('/sys/class/video4linux'):
> + videodevpath = '/sys/class/video4linux'
> +
> v4lctlexe = '/usr/bin/v4lctl'
>
> if os.path.exists(videodevpath):
> # Get list of devices
> - cmd = "ls /proc/video/dev | grep video"
> + cmd = "ls " + videodevpath + "/" + " | grep video"
> fh = os.popen(cmd,'r')
> for line in fh.readlines():
> device = os.path.join('/dev',line.strip())
>
>
>
More information about the ag-tech
mailing list