diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2018-08-28 02:15:22 -0400 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2019-02-06 01:49:28 -0500 |
commit | 28c16c6dc72f4c41307f1a317860791c595cdcd6 (patch) | |
tree | a355be21b50780f9d308f7c3807b09ab543e59d9 | |
parent | 014dad23a3b71c040a9b3a3e93aea102c56d8cba (diff) |
v4l2-source: implement set_frame_rate op
Implement the video source op set_frame_rate for v4l2-source video
source.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | lib/v4l2-source.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/v4l2-source.c b/lib/v4l2-source.c index 7eced6a..8cb9aef 100644 --- a/lib/v4l2-source.c +++ b/lib/v4l2-source.c @@ -54,6 +54,13 @@ static int v4l2_source_set_format(struct video_source *s, return v4l2_set_format(src->vdev, fmt); } +static int v4l2_source_set_frame_rate(struct video_source *s, unsigned int fps) +{ + struct v4l2_source *src = to_v4l2_source(s); + + return v4l2_set_frame_rate(src->vdev, fps); +} + static int v4l2_source_alloc_buffers(struct video_source *s, unsigned int nbufs) { struct v4l2_source *src = to_v4l2_source(s); @@ -144,6 +151,7 @@ static int v4l2_source_queue_buffer(struct video_source *s, static const struct video_source_ops v4l2_source_ops = { .destroy = v4l2_source_destroy, .set_format = v4l2_source_set_format, + .set_frame_rate = v4l2_source_set_frame_rate, .alloc_buffers = v4l2_source_alloc_buffers, .export_buffers = v4l2_source_export_buffers, .free_buffers = v4l2_source_free_buffers, |