st/prober: Make video file input work with no camera connected

This commit is contained in:
Christoph Haag 2020-12-14 19:48:12 +01:00 committed by Jakob Bornecrantz
parent 30d7001df1
commit b2337469a4
2 changed files with 7 additions and 1 deletions

View file

@ -826,6 +826,11 @@ list_video_devices(struct xrt_prober *xp,
{
struct prober *p = (struct prober *)xp;
const char *path = debug_get_option_vf_path();
if (path != NULL) {
cb(xp, NULL, "Video File", "Collabora", path, ptr);
}
// Loop over all devices and find video devices.
for (size_t i = 0; i < p->num_devices; i++) {
struct prober_device *pdev = &p->devices[i];

View file

@ -111,7 +111,8 @@ on_video_device(struct xrt_prober *xp,
return;
}
if (strcmp(product, fact->settings.camera_name) != 0) {
if (strcmp(product, fact->settings.camera_name) != 0 &&
strcmp(product, "Video File") != 0) {
return;
}