From 675ded0d66b9fd60777d3037ded1446a3f9ef986 Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 31 Aug 2022 12:31:38 +0300 Subject: Big Bang --- src/camera.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/camera.c (limited to 'src/camera.c') diff --git a/src/camera.c b/src/camera.c new file mode 100644 index 0000000..fcd0606 --- /dev/null +++ b/src/camera.c @@ -0,0 +1,25 @@ +#include "camera.h" +#include "common_v4l2.h" + +CommonV4l2 common_v4l2; + +void camera_init(char *dev_name, unsigned int x_res, unsigned int y_res) +{ + CommonV4l2_init(&common_v4l2, dev_name, x_res, y_res); +} + +char *camera_get_image() +{ + CommonV4l2_update_image(&common_v4l2); + return CommonV4l2_get_image(&common_v4l2); +} + +void camera_deinit() +{ + CommonV4l2_deinit(&common_v4l2); +} + +int camera_get_image_size() +{ + return (int)CommonV4l2_get_image_size(&common_v4l2); +} -- cgit v1.2.3