Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124461
b: refs/heads/master
c: 126be90
h: refs/heads/master
i:
  124459: 8bea75e
v: v3
  • Loading branch information
Jaime Velasco Juan authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 6ef4e48 commit 1f15155
Show file tree
Hide file tree
Showing 2 changed files with 21 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: 71050814c21a461fb7950373f2ae2fc625412f20
refs/heads/master: 126be90f720d9b23e89c68519022fb806882f42d
20 changes: 20 additions & 0 deletions trunk/drivers/media/video/stk-webcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,25 @@ static int stk_vidioc_g_parm(struct file *filp,
return 0;
}

static int stk_vidioc_enum_framesizes(struct file *filp,
void *priv, struct v4l2_frmsizeenum *frms)
{
if (frms->index >= ARRAY_SIZE(stk_sizes))
return -EINVAL;
switch (frms->pixel_format) {
case V4L2_PIX_FMT_RGB565:
case V4L2_PIX_FMT_RGB565X:
case V4L2_PIX_FMT_UYVY:
case V4L2_PIX_FMT_YUYV:
case V4L2_PIX_FMT_SBGGR8:
frms->type = V4L2_FRMSIZE_TYPE_DISCRETE;
frms->discrete.width = stk_sizes[frms->index].w;
frms->discrete.height = stk_sizes[frms->index].h;
return 0;
default: return -EINVAL;
}
}

static struct file_operations v4l_stk_fops = {
.owner = THIS_MODULE,
.open = v4l_stk_open,
Expand Down Expand Up @@ -1296,6 +1315,7 @@ static const struct v4l2_ioctl_ops v4l_stk_ioctl_ops = {
.vidioc_g_ctrl = stk_vidioc_g_ctrl,
.vidioc_s_ctrl = stk_vidioc_s_ctrl,
.vidioc_g_parm = stk_vidioc_g_parm,
.vidioc_enum_framesizes = stk_vidioc_enum_framesizes,
};

static void stk_v4l_dev_release(struct video_device *vd)
Expand Down

0 comments on commit 1f15155

Please sign in to comment.