From b2337469a486c3685ae6f70eecf9b51cbf8eb225 Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Mon, 14 Dec 2020 19:48:12 +0100 Subject: [PATCH] st/prober: Make video file input work with no camera connected --- src/xrt/state_trackers/prober/p_prober.c | 5 +++++ src/xrt/state_trackers/prober/p_tracking.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xrt/state_trackers/prober/p_prober.c b/src/xrt/state_trackers/prober/p_prober.c index f0e8b46b6..6b6c9b9cc 100644 --- a/src/xrt/state_trackers/prober/p_prober.c +++ b/src/xrt/state_trackers/prober/p_prober.c @@ -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]; diff --git a/src/xrt/state_trackers/prober/p_tracking.c b/src/xrt/state_trackers/prober/p_tracking.c index cae509d05..9a6d4c34a 100644 --- a/src/xrt/state_trackers/prober/p_tracking.c +++ b/src/xrt/state_trackers/prober/p_tracking.c @@ -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; }