diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2018-08-28 02:17:15 -0400 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2019-02-06 01:49:31 -0500 |
commit | bde4deb8803026ec69e11cd380d77bf5d33ee623 (patch) | |
tree | 779af4610ffc29499b7d4b672c7a5e75c4cadeb2 /lib/stream.c | |
parent | 28c16c6dc72f4c41307f1a317860791c595cdcd6 (diff) |
stream, uvc: add uvc_stream_set_frame_rate
We would like to be able to set the frame rate of the video source of a
stream. This patch adds such a function to set the source's frame rate
from the stream. The frame rate is set right after the format is set.
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>
Diffstat (limited to 'lib/stream.c')
-rw-r--r-- | lib/stream.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stream.c b/lib/stream.c index 19f0d78..168dc71 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -156,6 +156,12 @@ int uvc_stream_set_format(struct uvc_stream *stream, return video_source_set_format(stream->src, &fmt); } +int uvc_stream_set_frame_rate(struct uvc_stream *stream, unsigned int fps) +{ + printf("=== Setting frame rate to %u fps\n", fps); + return video_source_set_frame_rate(stream->src, fps); +} + /* --------------------------------------------------------------------------- * Stream handling */ |