Witch ioctl use GStreamer to set framerate in V4L2?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Witch ioctl use GStreamer to set framerate in V4L2?

Aldo85
Hi all,
I'm tryng to modify "vivi" module (Virtual Video Driver) of V4L2 to handle framerate.
I did the following steps:
1) load module vivi:

#insmod vivi.ko

it creates a standard video camera /dev/videoN
2)launching gstreamer pipelines to get a video stream from video camera:

# gst-launch-0.10 v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)YUY2,framerate=(fraction)15/1' ! fakesink
I got this error:
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format

launching the same pipeline without framerate options it works fine.

What happened is normal because vivi module doen't handle ioctl function to set/get framerate and use a steady framerate of 30Hz. So, what ioctls of V4L2 I need to implement in vivi module??
 I've tryed to handle VIDIOC_S_PARM,VIDIOC_G_PARM and VIDIOC_ENUMSTD ioctls but nothing change.
Thank you