Date: Wed, 25 Aug 2010 23:50:05 +0200 From: Hans Petter Selasky <hselasky@freebsd.org> To: freebsd-multimedia@freebsd.org Cc: me@janh.de, kde@freebsd.org, Joe Marcus Clarke <marcus@freebsd.org>, Juergen Lock <nox@jelal.kn-bremen.de>, gnome@freebsd.org Subject: Re: kaffeine-1.0 and webcamd based DVB-T? Message-ID: <201008252350.05592.hselasky@freebsd.org> In-Reply-To: <20100825214141.GA8685@triton8.kn-bremen.de> References: <4C66C4BC.4040504@janh.de> <4C7435AA.50805@freebsd.org> <20100825214141.GA8685@triton8.kn-bremen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 25 August 2010 23:41:41 Juergen Lock wrote:
> On Tue, Aug 24, 2010 at 05:12:10PM -0400, Joe Marcus Clarke wrote:
> > On 8/24/10 5:04 PM, Hans Petter Selasky wrote:
> > > On Tuesday 24 August 2010 22:21:18 Juergen Lock wrote:
> > >> #! /bin/sh
> > >> # add PCTV 452e Sat HDTV Pro USB to hal as /dev/dvb/adapter0
> > >> hal-device --add usb_device_2304_21f_noserial_dvb_0 <<EOF
> > >> dvb.device = '/dev/dvb/adapter0/demux0' (string)
> > >> info.capabilities = {'dvb'} (string list)
> > >> info.category = 'dvb' (string)
> > >> info.parent =
> > >> '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
> > >> info.product = 'DVB Device' (string)
> > >> info.subsystem = 'dvb' (string)
> > >> EOF
> > >> hal-device --add usb_device_2304_21f_noserial_dvb_1 <<EOF
> > >> dvb.device = '/dev/dvb/adapter0/dvr0' (string)
> > >> info.capabilities = {'dvb'} (string list)
> > >> info.category = 'dvb' (string)
> > >> info.parent =
> > >> '/org/freedesktop/Hal/devices/usb_device_2304_21f_noserial' (string)
> > >> info.product = 'DVB Device' (string)
> > >> info.subsystem = 'dvb' (string)
> > >> EOF
> > >> hal-device --add usb_device_2304_21f_noserial_dvb_2 <<EOF
> > >
> > > Hi,
> > >
> > > Could you have changed this into "execve()" calls (man execve) and add
> > > these to webcamd.c whenever cuse_dev_create() is called? Also for
> > > /dev/videoX entries. Then we don't need to patch HAL?
> >
> > Yeah, if webcamd can notify hal that new dvb and v4l devices are
> > available (and what those devices' capabilities are) then we can remove
> > the patches from hal.
>
> Ok I now made that an extra process (so it can open() /dev/videoX
> normally and also that way webcamd itself doesn't have to link
> libhal and possible problems with fork() and threads are avoided),
> webcamd then just feeds it the device nodes on stdin.
>
> Untested with v4l devices since I don't have one here, and
> I also built the helper manually for now and put it into PATH.
> And the code can still be cleaned up...
>
> helper built as:
>
> cc -o webcamd-hal-helper -Wall webcamd-hal-helper.c $(pkg-config --cflags
> hal) $(pkg-config --libs hal) -I/usr/local/include
>
> Patch also at:
>
> http://people.freebsd.org/~nox/tmp/webcamd-hal.patch
>
> HTH, :)
> Juergen
Looks good.
Could you also register an atexit() function, that cleans up the HAL registry
when webcamd exits?
--HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008252350.05592.hselasky>
