-// Intensity Shuttle USB3 prototype capture driver, v0.3
+// Intensity Shuttle USB3 capture driver, v0.4
// Can download 8-bit and 10-bit UYVY/v210 frames from HDMI, quite stable
// (can do captures for hours at a time with no drops), except during startup
// 576p60/720p60/1080i60 works, 1080p60 does not work (firmware limitation)
#if HAS_MULTIVERSIONING
#include <immintrin.h>
#endif
-#include "bmusb.h"
+#include "bmusb/bmusb.h"
#include <algorithm>
#include <atomic>
namespace bmusb {
card_connected_callback_t BMUSBCapture::card_connected_callback = nullptr;
+bool BMUSBCapture::hotplug_existing_devices = false;
namespace {
// coming back with errors, so only care about devices joining.
if (card_connected_callback != nullptr) {
if (libusb_hotplug_register_callback(
- nullptr, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, LIBUSB_HOTPLUG_NO_FLAGS,
+ nullptr, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, hotplug_existing_devices ? LIBUSB_HOTPLUG_ENUMERATE : LIBUSB_HOTPLUG_NO_FLAGS,
USB_VENDOR_BLACKMAGIC, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
&BMUSBCapture::cb_hotplug, nullptr, nullptr) < 0) {
fprintf(stderr, "libusb_hotplug_register_callback() failed\n");