atom feed5 messages in org.freebsd.freebsd-multimediaRe: Cuse4BSD + Webcamd + FE_GET_EVENT...
FromSent OnAttachments
Joerg PulzMar 2, 2010 1:35 am 
Hans Petter SelaskyMar 2, 2010 2:23 am 
Joerg PulzMar 2, 2010 5:18 am 
Hans Petter SelaskyMar 2, 2010 5:34 am 
Joerg PulzMar 2, 2010 6:40 am 
Subject:Re: Cuse4BSD + Webcamd + FE_GET_EVENT ioctl
From:Joerg Pulz (Joer@frm2.tum.de)
Date:Mar 2, 2010 5:18:31 am
List:org.freebsd.freebsd-multimedia

-----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-----