+ void queue_frame(uint16_t format, uint16_t timecode, FrameAllocator::Frame frame, std::deque<QueuedFrame> *q);
+ void dequeue_thread();
+
+ void usb_thread_func();
+ static void cb_xfr(struct libusb_transfer *xfr);
+
+ FrameAllocator::Frame current_video_frame;
+ FrameAllocator::Frame current_audio_frame;
+
+ std::mutex queue_lock;
+ std::condition_variable queues_not_empty;
+ std::deque<QueuedFrame> pending_video_frames;
+ std::deque<QueuedFrame> pending_audio_frames;
+
+ std::thread usb_thread;
+ std::atomic<bool> should_quit;
+
+ FrameAllocator *video_frame_allocator = nullptr;
+ FrameAllocator *audio_frame_allocator = nullptr;
+ frame_callback_t frame_callback = nullptr;
+
+ int current_register = 0;
+
+ static constexpr int NUM_BMUSB_REGISTERS = 60;
+ uint8_t register_file[NUM_BMUSB_REGISTERS];
+};