mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
v4l2: use GST_RESOURCE_ERROR_BUSY if v4l2_ioctl fails with EBUSY
https://bugzilla.gnome.org/show_bug.cgi?id=658543
This commit is contained in:
parent
ed3adece77
commit
06c65418d7
1 changed files with 14 additions and 5 deletions
|
@ -2175,11 +2175,20 @@ get_fmt_failed:
|
|||
}
|
||||
set_fmt_failed:
|
||||
{
|
||||
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
|
||||
(_("Device '%s' cannot capture at %dx%d"),
|
||||
v4l2object->videodev, width, height),
|
||||
("Call to S_FMT failed for %" GST_FOURCC_FORMAT " @ %dx%d: %s",
|
||||
GST_FOURCC_ARGS (pixelformat), width, height, g_strerror (errno)));
|
||||
if (errno == EBUSY) {
|
||||
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, BUSY,
|
||||
(_("Device '%s' is busy"), v4l2object->videodev),
|
||||
("Call to S_FMT failed for %" GST_FOURCC_FORMAT " @ %dx%d: %s",
|
||||
GST_FOURCC_ARGS (pixelformat), width, height,
|
||||
g_strerror (errno)));
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
|
||||
(_("Device '%s' cannot capture at %dx%d"),
|
||||
v4l2object->videodev, width, height),
|
||||
("Call to S_FMT failed for %" GST_FOURCC_FORMAT " @ %dx%d: %s",
|
||||
GST_FOURCC_ARGS (pixelformat), width, height,
|
||||
g_strerror (errno)));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
invalid_dimensions:
|
||||
|
|
Loading…
Reference in a new issue