blob: 61eb592d6e46cd0d685ea1d900a6c7265e232b10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "camera.h"
#include "common_v4l2.h"
void camera_init(camera_handle *handle, camera_params params)
{
*handle = malloc(sizeof(CommonV4l2));
CommonV4l2_init(*handle, params.device, params.x_res, params.y_res);
}
char *camera_get_image(camera_handle *handle)
{
CommonV4l2_update_image(*handle);
return CommonV4l2_get_image(*handle);
}
void camera_deinit(camera_handle *handle)
{
CommonV4l2_deinit(*handle);
free(*handle);
}
|