From owner-freebsd-gnome@FreeBSD.ORG Wed Aug 25 21:54:03 2010 Return-Path: Delivered-To: gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 954C61065698; Wed, 25 Aug 2010 21:54:03 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD438FC17; Wed, 25 Aug 2010 21:54:02 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=A9i2abt5RTkKnggEwMfGtMsecE7KHeOxIgKEeBb2Lvo= c=1 sm=1 a=ivRC_LpHlL4A:10 a=8nJEP1OIZ-IA:10 a=M8b_wTzEtboA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=6I5d2MoRAAAA:8 a=8Op3mD2uhU6W424Vr4cA:9 a=zU0t65C9BywTRlbtPIIA:7 a=HC-w9wRa-t_72QU5SBF_ozPX-bwA:4 a=wPNLvfGTeEIA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:117 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 11128868; Wed, 25 Aug 2010 23:53:57 +0200 Received-SPF: softfail receiver=mailfe08.swip.net; client-ip=188.126.201.140; envelope-from=hselasky@freebsd.org From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Wed, 25 Aug 2010 23:50:05 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <4C66C4BC.4040504@janh.de> <4C7435AA.50805@freebsd.org> <20100825214141.GA8685@triton8.kn-bremen.de> In-Reply-To: <20100825214141.GA8685@triton8.kn-bremen.de> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008252350.05592.hselasky@freebsd.org> Cc: me@janh.de, kde@freebsd.org, Joe Marcus Clarke , Juergen Lock , gnome@freebsd.org Subject: Re: kaffeine-1.0 and webcamd based DVB-T? X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 21:54:03 -0000 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 < > >> 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 < > >> 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 < > > > > > 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