diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2011-08-26 09:43:14 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2011-08-26 09:43:14 -0300 |
commit | 5ae630489cbc6982c2f3c3c47ba3aa9664932c31 (patch) | |
tree | 226eb51f8fde3c541ae124890114de49452d663f | |
parent | f3cb4439cf54dfc42f5c7270ff2454778d9cc213 (diff) |
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.
-rw-r--r-- | gst/camerabin2/gstcamerabin2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index f40ef051b..8343d8850 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -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), |