#include "camera.h" #include "common_v4l2.h" void camera_init(camera_handle *handle, camera_params params) { handle->handle = malloc(sizeof(CommonV4l2)); CommonV4l2_init(handle->handle, params.device, params.x_res, params.y_res); } char *camera_get_image(camera_handle *handle) { CommonV4l2_update_image(handle->handle); return CommonV4l2_get_image(handle->handle); } void camera_deinit(camera_handle *handle) { CommonV4l2_deinit(handle->handle); free(handle->handle); }