Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219238
b: refs/heads/master
c: b0326b7
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Drake authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 3e5443a commit 1abb263
Show file tree
Hide file tree
Showing 2 changed files with 18 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: e99dfcf7f68d8dffccfa795d1548790cee2d7395
refs/heads/master: b0326b7f8de020d70487673123bc93138c091151
17 changes: 17 additions & 0 deletions trunk/drivers/media/video/ov7670.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,22 @@ static int ov7670_enum_frameintervals(struct v4l2_subdev *sd,
return 0;
}

/*
* Frame size enumeration
*/
static int ov7670_enum_framesizes(struct v4l2_subdev *sd,
struct v4l2_frmsizeenum *fsize)
{
__u32 index = fsize->index;
if (index >= N_WIN_SIZES)
return -EINVAL;

fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
fsize->discrete.width = ov7670_win_sizes[index].width;
fsize->discrete.height = ov7670_win_sizes[index].height;
return 0;
}

/*
* Code for dealing with controls.
*/
Expand Down Expand Up @@ -1453,6 +1469,7 @@ static const struct v4l2_subdev_video_ops ov7670_video_ops = {
.s_parm = ov7670_s_parm,
.g_parm = ov7670_g_parm,
.enum_frameintervals = ov7670_enum_frameintervals,
.enum_framesizes = ov7670_enum_framesizes,
};

static const struct v4l2_subdev_ops ov7670_ops = {
Expand Down

0 comments on commit 1abb263

Please sign in to comment.