[vlc-devel] [PATCH] V4L for FreeBSD userland libv4l{1, 2} wrapper library

Buganini buganini at gmail.com
Fri Nov 20 20:39:07 CET 2009


On Fri, Nov 20, 2009 at 6:06 PM, Rafaël Carré <rafael.carre at gmail.com> wrote:
> We can add the fcntl() call
> UTF-8 conversion is not needed as device nodes are always ASCII (not
> mandatory but it's always the case)
>
> AFAIU libv4l does some chroma conversion when the requested format
> can't be delivered by the card, i don't know any other use (on Linux).

like this?

#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
    if( ( i_fd = v4l2_open( psz_device, O_RDWR | O_CLOEXEC ) ) < 0 )
    {
        msg_Err( p_obj, "cannot open device (%m)" );
        goto open_failed;
    }

#ifdef HAVE_FCNTL
#ifdef FD_CLOEXEC
    if (fd != -1)
        fcntl (fd, F_SETFD, FD_CLOEXEC);
#endif
#endif


BTW, there is neither O_CLOEXEC nor FD_CLOEXEC on FreeBSD.


--Buganini



More information about the vlc-devel mailing list