*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
input.index = n;
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMINPUT, &input) < 0) {
- if (errno == EINVAL)
+ if (errno == EINVAL || errno == ENOTTY)
break; /* end of enumeration */
else {
GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS,
GST_LOG_OBJECT (e, " name: '%s'", input.name);
GST_LOG_OBJECT (e, " type: %08x", input.type);
GST_LOG_OBJECT (e, " audioset: %08x", input.audioset);
- GST_LOG_OBJECT (e, " std: %016x", (guint) input.std);
+ GST_LOG_OBJECT (e, " std: %016" G_GINT64_MODIFIER "x", input.std);
GST_LOG_OBJECT (e, " status: %08x", input.status);
v4l2channel = g_object_new (GST_TYPE_V4L2_TUNER_CHANNEL, NULL);
control.id = n;
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_QUERYCTRL, &control) < 0) {
- if (errno == EINVAL) {
+ if (errno == EINVAL || errno == ENOTTY || errno == EIO || errno == ENOENT) {
if (n < V4L2_CID_PRIVATE_BASE) {
GST_DEBUG_OBJECT (e, "skipping control %08x", n);
/* continue so that we also check private controls */
break;
}
} else {
- GST_ELEMENT_ERROR (e, RESOURCE, SETTINGS,
- (_("Failed getting controls attributes on device '%s'."),
- v4l2object->videodev),
- ("Failed querying control %d on device '%s'. (%d - %s)",
- n, v4l2object->videodev, errno, strerror (errno)));
- return FALSE;
+ GST_WARNING_OBJECT (e, "Failed querying control %d on device '%s'. "
+ "(%d - %s)", n, v4l2object->videodev, errno, strerror (errno));
+ continue;
}
}
if (control.flags & V4L2_CTRL_FLAG_DISABLED) {