From: "Németh Márton" <nm127@freemail.hu>
To: mschimek@gmx.at, video4linux-list@redhat.com
Cc: LKML <linux-kernel@vger.kernel.org>, em28xx@mcentral.de
Subject: parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT?
Date: Tue, 16 Dec 2008 08:13:26 +0100 [thread overview]
Message-ID: <49475516.3090504@freemail.hu> (raw)
Hi,
I have a question about the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT
parameters in v4l2 specification.
The "Video for Linux Two API Specification" text says that the
parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT is ...
> [...] a pointer to an integer where the driver stores the number
> of the input, as in the struct v4l2_input index field.
>
> http://v4l2spec.bytesex.org/spec/r11217.htm
In the v4l2_input structure the index has the type of __u32.
In contrast, in <linux/videodev2.h> (as of 2.6.27) the ioctls are defined
as follows:
> #define VIDIOC_G_INPUT _IOR('V', 38, int)
> #define VIDIOC_S_INPUT _IOWR('V', 39, int)
The problem is that '__u32' is unsigned and 'int' is signed. Furthermore
one cannot be sure that sizeof(__u32) == sizeof(int) on all platforms.
I guess that the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT should be
a pointer to __u32. What do you think?
Regards,
Márton Németh
next reply other threads:[~2008-12-16 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 7:13 Németh Márton [this message]
2008-12-16 8:01 ` [Em28xx] parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT? Markus Rechberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49475516.3090504@freemail.hu \
--to=nm127@freemail.hu \
--cc=em28xx@mcentral.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mschimek@gmx.at \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox