effectv: Make the optv threshold property an uint
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 12 Jul 2009 09:26:57 +0000 (11:26 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 16 Jul 2009 10:04:06 +0000 (12:04 +0200)
gst/effectv/gstop.c
gst/effectv/gstop.h

index 0b0c27b..192d935 100644 (file)
@@ -327,7 +327,7 @@ gst_optv_set_property (GObject * object, guint prop_id, const GValue * value,
       filter->speed = g_value_get_int (value);
       break;
     case PROP_THRESHOLD:
-      filter->threshold = g_value_get_int (value);
+      filter->threshold = g_value_get_uint (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -349,7 +349,7 @@ gst_optv_get_property (GObject * object, guint prop_id, GValue * value,
       g_value_set_int (value, filter->speed);
       break;
     case PROP_THRESHOLD:
-      g_value_set_int (value, filter->threshold);
+      g_value_set_uint (value, filter->threshold);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -396,8 +396,8 @@ gst_optv_class_init (GstOpTVClass * klass)
           GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (gobject_class, PROP_THRESHOLD,
-      g_param_spec_int ("threshold", "Threshold",
-          "Luma threshold", G_MININT, G_MAXINT, DEFAULT_THRESHOLD,
+      g_param_spec_uint ("threshold", "Threshold",
+          "Luma threshold", 0, G_MAXINT, DEFAULT_THRESHOLD,
           GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_optv_set_caps);
index 72f5573..e794603 100644 (file)
@@ -56,7 +56,7 @@ struct _GstOpTV
 
   gint mode;
   gint speed;
-  gint threshold;
+  guint threshold;
 
   gint8 *opmap[4];
   guint8 *diff;