When do v4l2_ioctl() with VIDIOC_ENUMINPUT fails on some devices,
kernels before 3.3.0 return EINVAL, but newer kernels return ENOTTY. This patch make those devices work well on kernel 3.3+. Related kernel commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=07d106d0a33d6063d2061305903deb02489eba20 Signed-off-by: Huacai Chen <[hidden email]> Signed-off-by: Rui Wang <[hidden email]> Signed-off-by: Jie Chen <[hidden email]> --- sys/v4l2/v4l2_calls.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index ace78df..2f79627 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -129,7 +129,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) 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, -- 1.7.7.3 _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Tue, 2012-08-21 at 19:47 +0800, Huacai Chen wrote:
Hi, > When do v4l2_ioctl() with VIDIOC_ENUMINPUT fails on some devices, > kernels before 3.3.0 return EINVAL, but newer kernels return ENOTTY. > This patch make those devices work well on kernel 3.3+. > (snip) Thanks for the patch! I've pushed this now, but it would be great if you could submit future patches via bugzilla [0] please, thanks! (There's a SubmittingPatches wiki page as well I think, but the wiki seems to be down at the moment..) Cheers -Tim [0] http://gstreamer.freedesktop.org/bugs/ _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
OK, I'll do at next time.
On Wed, Aug 22, 2012 at 6:16 AM, Tim-Philipp Müller <[hidden email]> wrote: > On Tue, 2012-08-21 at 19:47 +0800, Huacai Chen wrote: > > Hi, > >> When do v4l2_ioctl() with VIDIOC_ENUMINPUT fails on some devices, >> kernels before 3.3.0 return EINVAL, but newer kernels return ENOTTY. >> This patch make those devices work well on kernel 3.3+. >> (snip) > > Thanks for the patch! I've pushed this now, but it would be great if you > could submit future patches via bugzilla [0] please, thanks! > > (There's a SubmittingPatches wiki page as well I think, but the wiki > seems to be down at the moment..) > > Cheers > -Tim > > [0] http://gstreamer.freedesktop.org/bugs/ > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |