[FFmpeg-devel] PATCH grab.c, adding support for hardware based VIDIOSFPS

Trent Piepho xyzzy
Mon Jun 4 21:20:25 CEST 2007


On Mon, 4 Jun 2007, mmh wrote:
>  > > > #ifndef VIDIOSFPS
>  > > > #define VIDIOSFPS		_IOW('v',BASE_VIDIOCPRIVATE+20, int)			/* Set fps */
>  > > > #endif
>  > > >
>  > > yes, i really think this should be removed
>  > > and, FWIW, syntax in v4l2 is, most of the time, as follows:
>  > > VIDIOC_S_*
>  > > i don't know if it's planned to add such a feature in future videodev
>  > > version, though...
>  >
>  > This isn't a v4l2 ioctl, but a v4l1 ioctl.  V4L2 uses the ioctl range 'V',
>  > while v4l1 uses 'v'.  Notice the case difference.  Also BASE_VIDIOCPRIVATE
>  > is the base for v4l1 private ioctls and BASE_VIDIOC_PRIVATE is the base for
>  > v4l2.  It should still be VIDIOCSFPS to have correct v4l1 naming
>  > conventions.
>  >
>  > The whole ioctl name clash thing isn't solved by just removing the #define
>  > from the ffmpeg code.  What happens if someone compiles on a kernel where
>  > 'v',private+20 is SFPS and then runs on a kernel where it's something else?
>  >
>  > This is why changing ioctls once they make it into the kernel isn't
>  > allowed.
>
> Thanks for explaining this to me.
>
> Then can I for this device which support this particular behavior
> integrate this type of functionality.  The only thing which I'm clear
> on is that what I have done is not the correct thing to do... If
> someone has a suggestion for this I would like to here it.

Do you mean add support for setting framerates into the kernel driver or to
ffmpeg's capture code?

In V4L2, frame rates are set using the VIDIOC_S_PARM ioctl.  I don't think
V4L1 has support setting frame rates.




More information about the ffmpeg-devel mailing list