From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 2 13:19:06 2010 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D3DF106566C; Tue, 2 Mar 2010 13:19:06 +0000 (UTC) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from mailhost.frm2.tum.de (mailhost.frm2.tum.de [129.187.179.12]) by mx1.freebsd.org (Postfix) with ESMTP id 66FA58FC12; Tue, 2 Mar 2010 13:19:04 +0000 (UTC) Received: from mailhost.frm2.tum.de (localhost [127.0.0.1]) by mailhost.frm2.tum.de (8.14.3/8.14.3) with ESMTP id o22DJ3vq012216; Tue, 2 Mar 2010 14:19:03 +0100 (CET) (envelope-from jpulz@frm2.tum.de) X-Virus-Scanned: at mailhost.frm2.tum.de Received: from hades.admin.frm2 (hades.admin.frm2 [172.25.1.10]) by mailhost.frm2.tum.de (8.14.3/8.14.3) with ESMTP id o22DIw5m012213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 2 Mar 2010 14:18:58 +0100 (CET) (envelope-from jpulz@frm2.tum.de) Received: from hades.admin.frm2 (localhost [127.0.0.1]) by hades.admin.frm2 (8.14.3/8.14.3) with ESMTP id o22DIwiG023750; Tue, 2 Mar 2010 14:18:58 +0100 (CET) (envelope-from jpulz@frm2.tum.de) Received: (from jpulz@localhost) by hades.admin.frm2 (8.14.3/8.14.3/Submit) id o22DIwDw023627; Tue, 2 Mar 2010 14:18:58 +0100 (CET) (envelope-from jpulz) Date: Tue, 2 Mar 2010 14:18:55 +0100 (CET) From: Joerg Pulz To: Hans Petter Selasky In-Reply-To: <201003021123.52292.hselasky@freebsd.org> Message-ID: References: <201003021123.52292.hselasky@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (mailhost.frm2.tum.de [129.187.179.12]); Tue, 02 Mar 2010 14:18:58 +0100 (CET) Cc: multimedia@freebsd.org Subject: Re: Cuse4BSD + Webcamd + FE_GET_EVENT ioctl 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: Tue, 02 Mar 2010 13:19:06 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 2 Mar 2010, Hans Petter Selasky wrote: > On Tuesday 02 March 2010 10:35:36 Joerg Pulz wrote: >> v4l-dvb/linux/drivers/media/dvb/dvb-core/dvb_frontend.c >> > > Can you check if the video application you are using is setting the non- > blocking flag on the file-handle? > > flag = 1; > ret = fcntl(f, O_NONBLOCK, &flag); > > That will make the FE_GET_EVENT return immediately. Hello Hans, i verified this and i'm pretty sure O_NONBLOCK is set. I've added this piece of code right before the FE_GET_EVENT ioctl: - ----- int flags = fcntl(fd_frontend, F_GETFL, 0); if (flags && O_NONBLOCK) esyslog("INFO: fd_frontend O_NONBLOCK"); - ----- and the message was displayed in the log. Here are the relevant code parts where the fd is opened: - ----- int cDvbDevice::DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError) { cString FileName = DvbName(Name, Adapter, Frontend); int fd = open(FileName, Mode); if (fd < 0 && ReportError) LOG_ERROR_STR(*FileName); return fd; } int fd_frontend = DvbOpen(DEV_DVB_FRONTEND, adapter, frontend, O_RDWR | O_NONBLOCK); - ----- So for me it looks like O_NONBLOCK is set and used but it still hangs at the ioctl. Any other ideas? Kind regards Joerg - -- The beginning is the most important part of the work. -Plato -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iD8DBQFLjRBCSPOsGF+KA+MRAv4ZAJ4x2UHbmjfZ2JskBo5zPGW070NLUQCgnJVz mJtN1UM3KTCinW2da2oHgMc= =37rk -----END PGP SIGNATURE-----