buffer: queue all keyed packets
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
#define CAPTURE_TIMEOUT_US (1000*1000)
|
||||
#define N_FDS 50
|
||||
|
||||
#define MAX_QUEUED_ON_KEYED MAX_BUFFER_QUEUE
|
||||
#define MAX_QUEUED_ON_NON_KEYED 1
|
||||
#define MAX_CAPTURED_ON_CAMERA 2
|
||||
#define MAX_CAPTURED_ON_M2M 2
|
||||
|
||||
@ -252,11 +254,16 @@ static int links_enqueue_from_capture_list(buffer_list_t *capture_list, link_t *
|
||||
|
||||
bool dropped = false;
|
||||
|
||||
int max_bufs_queued = buf->flags.is_keyed ? MAX_QUEUED_ON_KEYED : MAX_QUEUED_ON_NON_KEYED;
|
||||
|
||||
for (int j = 0; j < link->n_output_lists; j++) {
|
||||
if (link->output_lists[j]->dev->paused) {
|
||||
continue;
|
||||
}
|
||||
if (!buffer_list_push_to_queue(link->output_lists[j], buf)) {
|
||||
if (buf->flags.is_keyframe) {
|
||||
buffer_list_clear_queue(link->output_lists[j]);
|
||||
}
|
||||
if (!buffer_list_push_to_queue(link->output_lists[j], buf, max_bufs_queued)) {
|
||||
dropped = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user