Search
SailfishOS Open Build Service
>
Projects
>
home:plfiorini
:
maui:devel
:
armv6l
>
gst-plugins-bad-free
> _service:tar_git:0012-camerabin-limit-still-image-capture-frames-memory-us.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0012-camerabin-limit-still-image-capture-frames-memory-us.patch of Package gst-plugins-bad-free
From c9157ba3a1c6e27d78dbab3c499822799414b9cb Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen <ext-lasse.2.laukkanen@nokia.com> Date: Thu, 6 May 2010 15:17:20 +0300 Subject: [PATCH 12/23] camerabin: limit still image capture frames memory usage to 100MB --- gst/camerabin/gstcamerabin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index a7fcfb3..ecb526e 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -211,6 +211,9 @@ static guint camerabin_signals[LAST_SIGNAL]; #define DEFAULT_FLAGS GST_CAMERABIN_FLAG_IMAGE_COLOR_CONVERSION +/* limit memory usage for still image capture frames to 100MB */ +#define STILL_IMAGES_MAX_BYTES 100000000 + /* Using "bilinear" as default zoom method */ #define CAMERABIN_DEFAULT_ZOOM_METHOD 1 @@ -813,11 +816,9 @@ camerabin_create_elements (GstCameraBin * camera) goto done; } - /* To avoid deadlock, we won't restrict the image queue size */ - /* FIXME: actually we would like to have some kind of restriction here (size), - but deadlocks must be handled somehow... */ g_object_set (G_OBJECT (camera->img_queue), "max-size-buffers", 0, - "max-size-bytes", 0, "max-size-time", G_GUINT64_CONSTANT (0), NULL); + "max-size-bytes", STILL_IMAGES_MAX_BYTES, "max-size-time", + G_GUINT64_CONSTANT (0), NULL); g_object_set (camera->img_queue, "silent", TRUE, NULL); camera->pad_src_queue = gst_element_get_static_pad (camera->img_queue, "src"); -- 1.7.10.4