#include "bmusb.h"
using namespace std;
+
+BMUSBCapture *usb;
void check_frame_stability(uint16_t timecode,
FrameAllocator::Frame video_frame, size_t video_offset, uint16_t video_format,
last_video_bytes = video_frame.len - video_offset;
last_audio_bytes = audio_frame.len - audio_offset;
- get_video_frame_allocator()->release_frame(video_frame);
- get_audio_frame_allocator()->release_frame(audio_frame);
+ usb->get_video_frame_allocator()->release_frame(video_frame);
+ usb->get_audio_frame_allocator()->release_frame(audio_frame);
}
int main(int argc, char **argv)
{
- set_frame_callback(check_frame_stability);
- start_bm_capture();
+ usb = new BMUSBCapture;
+ usb->set_frame_callback(check_frame_stability);
+ usb->configure_card();
+ BMUSBCapture::start_bm_thread();
+ usb->start_bm_capture();
sleep(1000000);
}