camerabin2: Make viewfinder's queue a thread limit only

Reduce the viewfinder queue limits to only allow it to store
one buffer, preventing the queue from holding old buffers for
too long. This also avoids showing slightly outdated frames on
the viewfinder when the source has already produced new ones
and improves the buffer recycling rate, important for sources
that use bufferpools.
This commit is contained in:
Thiago Santos 2011-08-26 09:43:14 -03:00
parent f3cb4439cf
commit 5ae630489c

View file

@ -1368,7 +1368,8 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
}
g_object_set (camera->viewfinderbin_queue, "leaky", 2, "silent", TRUE,
NULL);
"max-size-time", (guint64) 0, "max-size-bytes", (guint) 0,
"max-size-buffers", (guint) 1, NULL);
gst_bin_add_many (GST_BIN_CAST (camera),
gst_object_ref (camera->video_encodebin),