Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
devel:hw
:
experimental
>
gstreamer1.0-plugins-bad
> _service:tar_git:0001-camerabin-update-zoom-param-spec-if-video-source-cha.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0001-camerabin-update-zoom-param-spec-if-video-source-cha.patch of Package gstreamer1.0-plugins-bad
From be7f363cb1fbe09424773a2271304a28bc6175fd Mon Sep 17 00:00:00 2001 From: Mohammed Hassan <mohammed.hassan@jolla.com> Date: Fri, 6 Mar 2015 14:49:20 +0200 Subject: [PATCH] camerabin: update zoom param spec if video source changes its max-zoom If the video source happens to allow max-zoom to be greater than our maximum hard coded value of 10 then the user cannot set anything greater than our maximum specified in the param spec. We have to update our param spec to prevent glib from capping the value --- gst/camerabin2/gstcamerabin2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index c77585a..f8e3fec 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -1331,10 +1331,18 @@ static void gst_camera_bin_src_notify_max_zoom_cb (GObject * self, GParamSpec * pspec, gpointer user_data) { + GParamSpecFloat *zoom_pspec; GstCameraBin2 *camera = (GstCameraBin2 *) user_data; g_object_get (self, "max-zoom", &camera->max_zoom, NULL); GST_DEBUG_OBJECT (camera, "Max zoom updated to %f", camera->max_zoom); + + /* update zoom pspec */ + zoom_pspec = + G_PARAM_SPEC_FLOAT (g_object_class_find_property (G_OBJECT_GET_CLASS + (G_OBJECT (camera)), "zoom")); + zoom_pspec->maximum = camera->max_zoom; + g_object_notify (G_OBJECT (camera), "max-zoom"); } -- 2.1.4