From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 6 15:50:13 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95260106567C for ; Fri, 6 Jan 2012 15:50:13 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 1E87E8FC20 for ; Fri, 6 Jan 2012 15:50:12 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 226117709; Fri, 06 Jan 2012 16:50:09 +0100 From: Hans Petter Selasky To: Matthias Apitz Date: Fri, 6 Jan 2012 16:47:46 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20120101164408.GA2389@tinyCurrent> <201201051900.01903.hselasky@c2i.net> <20120106134811.GA6168@tinyCurrent> In-Reply-To: <20120106134811.GA6168@tinyCurrent> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@ =?iso-8859-1?q?d2+AyewRX=7DmAm=3BYp=0A=09=7CU=5B?=@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y> =?iso-8859-1?q?Y=7Dk1C4TfysrsUI=0A=09-=25GU9V5=5DiUZF=26nRn9mJ=27=3F=26?=>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201201061647.46539.hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: webcamd/cuse4bsd && Skype X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 15:50:13 -0000 On Friday 06 January 2012 14:48:11 Matthias Apitz wrote: > El d=EDa Thursday, January 05, 2012 a las 07:00:01PM +0100, Hans Petter=20 Selasky escribi=F3: > > > > > I checked the source tree for 'CONFIG_VIDEO_V4L1_COMPAT' but it is > > > > > only mentioned as #undef CONFIG_VIDEO_V4L1_COMPAT in > > > > > build/config.h, no further places; so I don't know where to look > > > > > if some additional lib is compiled and linked static to webcamd > > > > > (ldd does not show any additional shared lib); I'm a bit clueless; > > > > > please help > > >=20 > > > Hi, > > >=20 > > > OK concerning HAL, but the main question is why the V4L IOCTL are not > > > translated into V4L2? where should I look? thanks > >=20 > > They are, but probably the structure size is wrong. >=20 > Hi, >=20 > Sorry for disagreeing; webcamd goes with a V4L cmd (0x40047601) into the > routines of media_tree/drivers/media/video/v4l2-ioctl.c and tries to > find a match there; the source reads: >=20 > static int check_array_args(unsigned int cmd, void *parg, size_t > *array_size, void * __user *user_ptr, void ***kernel_ptr) { > int ret =3D 0; >=20 > switch (cmd) { > case VIDIOC_QUERYBUF: > case VIDIOC_QBUF: > case VIDIOC_DQBUF: { > struct v4l2_buffer *buf =3D parg; > ... >=20 > and I have it in GDB as: >=20 > (gdb) s > check_array_args (cmd=3D1074034177, parg=3D0xbf4f9d94, > array_size=3D0xbf4f9d80, > user_ptr=3D0xbf4f9d7c, kernel_ptr=3D0xbf4f9d78) > at media_tree/drivers/media/video/v4l2-ioctl.c:2202 > 2202 int ret =3D 0; > (gdb) n > 2204 switch (cmd) { > (gdb) > 2239 return ret; > (gdb) p ret > $8 =3D 0 > (gdb) p /x cmd > $9 =3D 0x40047601 >=20 > i.e. it can not find any match with cmd=3D0x40047601 in the defines of >=20 > /usr/local/include/linux/videodev2.h >=20 > /* > * I O C T L C O D E S F O R V I D E O D E V I C E S > * > */ > #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) > #define VIDIOC_RESERVED _IO('V', 1) > #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) > #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) > #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) > #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) > ... >=20 > they are all there with capital 'V' while we have 'v' (0x76) im the cmd; > this can not work; somewhere the conversion from V4L to V4L2 is missed; > where this should be done, please point me to the source file to check > and set a breakpoint there; thanks >=20 Hi, Could you try with the latest 3.2 port of webcamd which I posted? BTW: I'm busy all weekend. Will reply on Monday. =2D-HPS