]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Make shutdown faster for the case where we have zero real USB cards.
[bmusb] / bmusb.cpp
index e9f89e251452ed3bccf88b0dd7f5a2697a8b8d34..4a5f8a3c4b588336aa67ad3448f6e78d17e9bfb8 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1,4 +1,4 @@
-// Intensity Shuttle USB3 capture driver, v0.6.0
+// Intensity Shuttle USB3 capture driver, v0.7.1
 // Can download 8-bit and 10-bit UYVY/v210-ish 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)
@@ -199,6 +199,7 @@ bool decode_video_format(uint16_t video_format, VideoFormat *decoded_video_forma
        constexpr VideoFormatEntry entries[] = {
                { 0x01f1,  720,  480,   0, 40,  5, 60000, 1001, false },  // 480p59.94 (believed).
                { 0x0131,  720,  576,   0, 44,  5,    50,    1, false },  // 576p50.
+               { 0x0151,  720,  576,   0, 44,  5,    50,    1, false },  // 576p50.
                { 0x0011,  720,  576,   0, 44,  5,    50,    1, false },  // 576p50 (5:4).
                { 0x0143, 1280,  720,   0, 25,  5,    50,    1, false },  // 720p50.
                { 0x0103, 1280,  720,   0, 25,  5,    60,    1, false },  // 720p60.
@@ -413,6 +414,7 @@ void BMUSBCapture::dequeue_thread_func()
                                               video_frame.frame, HEADER_SIZE, video_format,
                                               audio_frame.frame, AUDIO_HEADER_SIZE, audio_format);
                        } else {
+                               video_frame_allocator->release_frame(video_frame.frame);
                                audio_format.sample_rate = last_sample_rate;
                                frame_callback(video_timecode,
                                               FrameAllocator::Frame(), 0, video_format,
@@ -1477,6 +1479,7 @@ void BMUSBCapture::start_bm_thread()
 void BMUSBCapture::stop_bm_thread()
 {
        should_quit = true;
+       libusb_interrupt_event_handler(nullptr);
        usb_thread.join();
 }