Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330735
b: refs/heads/master
c: 77747f7
h: refs/heads/master
i:
  330733: 0430390
  330731: 33c07d8
  330727: e9e41fa
  330719: 9a548c6
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Aug 11, 2012
1 parent 808ed64 commit c23b354
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a3a8a36d9aae7ce08d5bd437ab670a78b327e5d
refs/heads/master: 77747f7960986e6a2210a837e6c76a68145d0bf9
22 changes: 22 additions & 0 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,27 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
return 0;
}

static int vidioc_enum_framesizes(struct file *file, void *fh,
struct v4l2_frmsizeenum *fsize)
{
static const struct v4l2_frmsize_stepwise sizes = {
48, MAX_WIDTH, 4,
32, MAX_HEIGHT, 1
};
int i;

if (fsize->index)
return -EINVAL;
for (i = 0; i < ARRAY_SIZE(formats); i++)
if (formats[i].fourcc == fsize->pixel_format)
break;
if (i == ARRAY_SIZE(formats))
return -EINVAL;
fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
fsize->stepwise = sizes;
return 0;
}

/* only one input in this sample driver */
static int vidioc_enum_input(struct file *file, void *priv,
struct v4l2_input *inp)
Expand Down Expand Up @@ -1175,6 +1196,7 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
.vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
.vidioc_enum_framesizes = vidioc_enum_framesizes,
.vidioc_reqbufs = vb2_ioctl_reqbufs,
.vidioc_create_bufs = vb2_ioctl_create_bufs,
.vidioc_prepare_buf = vb2_ioctl_prepare_buf,
Expand Down

0 comments on commit c23b354

Please sign in to comment.