Commit 0d8ccdcd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: non-video capture devices cannot currently be used

This is not to say that devices of some other types should not be
supported. But none of them currently are really supported.
(Also I think a different MRL scheme would be preferable for some.)
parent bda8acb3
......@@ -809,6 +809,12 @@ int InitVideo( vlc_object_t *p_obj, int i_fd, demux_sys_t *p_sys,
( cap.capabilities & V4L2_CAP_STREAMING ? 'X':' ' ),
( cap.capabilities & V4L2_CAP_ASYNCIO ? 'X':' ' ) );
if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE))
{
msg_Err (p_obj, "not a video capture device");
return -1;
}
if( cap.capabilities & V4L2_CAP_STREAMING )
p_sys->io = IO_METHOD_MMAP;
else if( cap.capabilities & V4L2_CAP_READWRITE )
......@@ -822,8 +828,6 @@ int InitVideo( vlc_object_t *p_obj, int i_fd, demux_sys_t *p_sys,
/* Now, enumerate all the video inputs. This is useless at the moment
since we have no way to present that info to the user except with
debug messages */
if( cap.capabilities & V4L2_CAP_VIDEO_CAPTURE )
{
struct v4l2_input input;
unsigned index = var_InheritInteger( p_obj, CFG_PREFIX"input" );
......@@ -845,7 +849,6 @@ int InitVideo( vlc_object_t *p_obj, int i_fd, demux_sys_t *p_sys,
return -1;
}
msg_Dbg( p_obj, "input set to %u", index );
}
/* Select standard */
bool bottom_first;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment