#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <linux/videodev2.h>
+#if defined(HAVE_LINUX_VIDEODEV2_H)
+# include <linux/videodev2.h>
+#elif defined(HAVE_SYS_VIDEOIO_H)
+# include <sys/videoio.h>
+#else
+# error "No Video4Linux2 headers found."
+#endif
#include <poll.h>
set_callbacks( DemuxOpen, DemuxClose )
add_submodule ()
- add_shortcut( "v4l2" )
- add_shortcut( "v4l2c" )
+ add_shortcut( "v4l2", "v4l2c" )
set_description( N_("Video4Linux2 Compressed A/V") )
set_capability( "access", 0 )
/* use these when open as access_demux fails; VLC will use another demux */
GetV4L2Params(p_sys, (vlc_object_t *) p_demux);
- ParseMRL( p_sys, p_demux->psz_path, (vlc_object_t *) p_demux );
+ ParseMRL( p_sys, p_demux->psz_location, (vlc_object_t *) p_demux );
#ifdef HAVE_LIBV4L2
- if( !var_InheritInteger( p_this, CFG_PREFIX "use-libv4l2" ) )
+ if( !var_InheritBool( p_this, CFG_PREFIX "use-libv4l2" ) )
{
msg_Dbg( p_this, "Trying direct kernel v4l2" );
use_kernel_v4l2( p_sys );
ParseMRL( p_sys, p_access->psz_location, (vlc_object_t *) p_access );
#ifdef HAVE_LIBV4L2
- if( !var_InheritInteger( p_this, CFG_PREFIX "use-libv4l2" ) )
+ if( !var_InheritBool( p_this, CFG_PREFIX "use-libv4l2" ) )
{
msg_Dbg( p_this, "Trying direct kernel v4l2" );
use_kernel_v4l2( p_sys );