gltransformation: support negative scales
authorMatthew Waters <matthew@centricular.com>
Thu, 14 Jan 2016 08:03:04 +0000 (19:03 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:14 +0000 (19:32 +0000)
A scale of -1.0 means to flip the video.

ext/gl/gstgltransformation.c

index 4183bf0fe15a58665760648ade3800cd134575f8..5ac2b9cb0f435a12a4987392d5e38214528a05a3 100644 (file)
@@ -199,12 +199,14 @@ gst_gl_transformation_class_init (GstGLTransformationClass * klass)
   g_object_class_install_property (gobject_class, PROP_SCALE_X,
       g_param_spec_float ("scale-x", "X Scale",
           "Scale multiplier for the X-Axis.",
-          0.0, G_MAXFLOAT, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          -G_MAXFLOAT, G_MAXFLOAT, 1.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_SCALE_Y,
       g_param_spec_float ("scale-y", "Y Scale",
           "Scale multiplier for the Y-Axis.",
-          0.0, G_MAXFLOAT, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          -G_MAXFLOAT, G_MAXFLOAT, 1.0,
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   /* Pivot */
   g_object_class_install_property (gobject_class, PROP_PIVOT_X,