mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Proper device-capabilities check when opening
Original commit message from CVS: Proper device-capabilities check when opening
This commit is contained in:
parent
8f120cdf00
commit
28a38344c6
1 changed files with 11 additions and 0 deletions
|
@ -34,6 +34,8 @@
|
||||||
#include "gstv4l2xoverlay.h"
|
#include "gstv4l2xoverlay.h"
|
||||||
#include "gstv4l2colorbalance.h"
|
#include "gstv4l2colorbalance.h"
|
||||||
|
|
||||||
|
#include "gstv4l2src.h"
|
||||||
|
|
||||||
#define DEBUG(format, args...) \
|
#define DEBUG(format, args...) \
|
||||||
GST_DEBUG_OBJECT (\
|
GST_DEBUG_OBJECT (\
|
||||||
GST_ELEMENT(v4l2element), \
|
GST_ELEMENT(v4l2element), \
|
||||||
|
@ -372,6 +374,15 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* do we need to be a capture device? */
|
||||||
|
if (GST_IS_V4L2SRC(v4l2element) &&
|
||||||
|
!(v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) {
|
||||||
|
gst_element_error(GST_ELEMENT(v4l2element),
|
||||||
|
"Not a capture device (0x%x)",
|
||||||
|
v4l2element->vcap.capabilities);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* create enumerations */
|
/* create enumerations */
|
||||||
if (!gst_v4l2_fill_lists(v4l2element))
|
if (!gst_v4l2_fill_lists(v4l2element))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue