Open default camera of a given type
This commit is contained in:
@ -9,7 +9,13 @@
|
||||
|
||||
static int camera_configure_input_v4l2(camera_t *camera)
|
||||
{
|
||||
camera->camera = device_v4l2_open(camera->name, camera->options.path);
|
||||
const char *path = camera->options.path;
|
||||
|
||||
if (!*path) {
|
||||
path = "/dev/video0";
|
||||
}
|
||||
|
||||
camera->camera = device_v4l2_open(camera->name, path);
|
||||
if (!camera->camera) {
|
||||
LOG_INFO(camera, "Listing available v4l2 devices:");
|
||||
system("v4l2-ctl --list-devices");
|
||||
|
Reference in New Issue
Block a user