i use TINY6410 + ov9650 cmos camera for project.
ov9650 camera's default fps is 15fps.
i must change frame rate of camera.(15fps -> 30fps)
but i dont know how change the frame rate.
i'm using provided source, the source use V4L2.
↓ is part of source.
------------------------------------------------------------------------
void TVideo::TryAnotherCamera()
{
int ret, start, found;
struct v4l2_input chan;
struct v4l2_framebuffer preview;
fd = ::open("/dev/video0", O_RDWR);
if (fd < 0) {
throw TError("cannot open video device");
}
/* Get capability */
struct v4l2_capability cap;
ret = ::ioctl(fd , VIDIOC_QUERYCAP, bitand cap);
if (ret < 0) {
throw TError("not available device");
}
/* Check the type - preview(OVERLAY) */
if (!(cap.capabilities bitand V4L2_CAP_VIDEO_OVERLAY)) {
throw TError("not available device");
}
chan.index = 0;
found = 0;
while(1) {
ret = ::ioctl(fd, VIDIOC_ENUMINPUT, bitand chan);
if (ret < 0) {
throw TError("not available device");
}
if (chan.type bitand V4L2_INPUT_TYPE_CAMERA ) {
found = 1;
break;
}
chan.index++;
}
if (!found) {
throw TError("not available device");
}
chan.type = V4L2_INPUT_TYPE_CAMERA;
ret = ::ioctl(fd, VIDIOC_S_INPUT, bitand chan);
if (ret < 0) {
throw TError("not available device");
}
memset(bitand preview, 0, sizeof preview);
preview.fmt.width = Width;
preview.fmt.height = Height;
preview.fmt.pixelformat = V4L2_PIX_FMT_RGB565;
preview.capability = 0;
preview.flags = 0;
/* Set up for preview */
ret = ioctl(fd, VIDIOC_S_FBUF, bitand preview);
if (ret< 0) {
throw TError("not available device");
}
/* Preview start */
start = 1;
ret = ioctl(fd, VIDIOC_OVERLAY, bitand start);
if (ret < 0) {
throw TError("not available device");
}
}
-----------------------------------------------------------------------
i want to change frame rate whether using another function of v4l2 or using
different method.T^T
if you know any method of changing framerate, please help
me.T^TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

