Seemingly creating a context etc. can take 70+ ms, and letting the
capture cards insert stuff freely for that time confuses ResamplingQueue
(plus probably our video queue length policy). Delay it until we are
actually ready to process output frames.
BMUSBCapture::set_card_connected_callback(bind(&Mixer::bm_hotplug_add, this, _1));
BMUSBCapture::start_bm_thread();
BMUSBCapture::set_card_connected_callback(bind(&Mixer::bm_hotplug_add, this, _1));
BMUSBCapture::start_bm_thread();
- for (card_index = 0; card_index < num_cards; ++card_index) {
+ for (unsigned card_index = 0; card_index < num_cards; ++card_index) {
cards[card_index].queue_length_policy.reset(card_index);
cards[card_index].queue_length_policy.reset(card_index);
- cards[card_index].capture->start_bm_capture();
}
// Set up stuff for NV12 conversion.
}
// Set up stuff for NV12 conversion.
+ // Start the actual capture. (We don't want to do it before we're actually ready
+ // to process output frames.)
+ for (unsigned card_index = 0; card_index < num_cards; ++card_index) {
+ cards[card_index].capture->start_bm_capture();
+ }
+
steady_clock::time_point start, now;
start = steady_clock::now();
steady_clock::time_point start, now;
start = steady_clock::now();