Date: Tue, 2 Mar 2010 14:18:55 +0100 (CET) From: Joerg Pulz <Joerg.Pulz@frm2.tum.de> To: Hans Petter Selasky <hselasky@freebsd.org> Cc: multimedia@freebsd.org Subject: Re: Cuse4BSD + Webcamd + FE_GET_EVENT ioctl Message-ID: <alpine.BSF.2.00.1003021412300.1647@unqrf.nqzva.sez2> In-Reply-To: <201003021123.52292.hselasky@freebsd.org> References: <alpine.BSF.2.00.1003021005510.1647@unqrf.nqzva.sez2> <201003021123.52292.hselasky@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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; } <snip> 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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1003021412300.1647>