mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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 https://bugzilla.gnome.org/show_bug.cgi?id=745740
This commit is contained in:
parent
160df421ea
commit
d49dbefd6c
1 changed files with 8 additions and 0 deletions
|
@ -1338,10 +1338,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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue