Skip to contentSkip to conversation

Change the frameperiod

DISCUSSION Malsoaz James 1 participant 1 message Jul 25, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hello,

I have some problems to change the framerate of my device. Maybe I don't use the right function. Can someone have a look ?

struct v4l2_standard st;
struct v4l2_fract fram;
struct v4l2_captureparm ca;

fram.numerator=1000;
fram.denominator=30000;
ca.timeperframe=fram;
if (-1 == xioctl (fd, VIDIOC_S_PARM, &ca))

        errno_exit ("VIDIOC_S_PARM");

//-------------------
//Here I got this error : "VIDIOC_S_PARM error 22, Invalid argument", but I don't know why //-------------

//This is to have the current frameperiod, and that works, I got 60 fps. //----------
if (-1 == xioctl (fd, VIDIOC_ENUMSTD, &st))

         errno_exit ("VIDIOC_ENUM_FMT");

fram=st.frameperiod;
framerate=fram.denominator/fram.numerator;
printf("framerate = %d fps\n",framerate);

Thanks a lot for your help.
James

      _____________________________________________________________________________ 

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list