[kde-freebsd] kaffeine-1.0 and webcamd based DVB-T?
Hans Petter Selasky
hselasky at freebsd.org
Wed Aug 25 23:50:05 CEST 2010
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
More information about the kde-freebsd
mailing list