geometrictransform: Descriptions and default values
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Sat, 5 Jun 2010 13:58:00 +0000 (10:58 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Sat, 5 Jun 2010 13:58:00 +0000 (10:58 -0300)
Improve some properties and element descriptions and changes
some default properties values.

gst/geometrictransform/gstcircle.c
gst/geometrictransform/gstgeometrictransform.c
gst/geometrictransform/gstgeometrictransform.h
gst/geometrictransform/gstkaleidoscope.c
gst/geometrictransform/gstpinch.c
gst/geometrictransform/gstsphere.c
gst/geometrictransform/gsttwirl.c
gst/geometrictransform/gstwaterripple.c

index 78e428ee8b80457709d9b7f075a3c0ff60739fec..5b63e30e3d0923da6d0045f847b487ffd1098444 100644 (file)
@@ -142,7 +142,7 @@ gst_circle_base_init (gpointer gclass)
   gst_element_class_set_details_simple (element_class,
       "circle",
       "Transform/Effect/Video",
-      "Applies 'circle' geometric transform to the image",
+      "Warps the picture into an arc shaped form",
       "Thiago Santos<thiago.sousa.santos@collabora.co.uk>");
 }
 
@@ -190,17 +190,17 @@ gst_circle_class_init (GstCircleClass * klass)
 
   g_object_class_install_property (gobject_class, PROP_ANGLE,
       g_param_spec_double ("angle", "angle",
-          "angle",
+          "Angle at which the arc starts in radians",
           -G_MAXDOUBLE, G_MAXDOUBLE, DEFAULT_ANGLE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gobject_class, PROP_SPREAD_ANGLE,
       g_param_spec_double ("spread-angle", "spread angle",
-          "spread angle",
+          "Length of the arc in radians",
           -G_MAXDOUBLE, G_MAXDOUBLE, DEFAULT_SPREAD_ANGLE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gobject_class, PROP_HEIGHT,
       g_param_spec_int ("height", "height",
-          "height",
+          "Height of the arc",
           0, G_MAXINT, DEFAULT_HEIGHT,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
index 0795e34627e68fe1214a37bba9e5ea4fe1b3d523..29bd31acedcd41ebdca219ee21ed90a8b4a6b4ec 100644 (file)
@@ -50,13 +50,6 @@ enum
   PROP_OFF_EDGE_PIXELS
 };
 
-enum
-{
-  GST_GT_OFF_EDGES_PIXELS_IGNORE = 0,
-  GST_GT_OFF_EDGES_PIXELS_CLAMP,
-  GST_GT_OFF_EDGES_PIXELS_WRAP
-};
-
 #define GST_GT_OFF_EDGES_PIXELS_METHOD_TYPE ( \
     gst_geometric_transform_off_edges_pixels_method_get_type())
 static GType
@@ -308,12 +301,15 @@ gst_geometric_transform_class_init (gpointer klass, gpointer class_data)
       g_param_spec_enum ("off-edge-pixels", "Off edge pixels",
           "What to do with off edge pixels",
           GST_GT_OFF_EDGES_PIXELS_METHOD_TYPE, DEFAULT_OFF_EDGE_PIXELS,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT));
+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void
 gst_geometric_transform_init (GTypeInstance * instance, gpointer g_class)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (instance);
+
+  gt->off_edge_pixels = DEFAULT_OFF_EDGE_PIXELS;
 }
 
 GType
index 066799f4f28ebb2b409f7e9b4bb47db3ba770517..1f9b582e27d68a04500a956334384782748d0b13 100644 (file)
@@ -38,6 +38,13 @@ G_BEGIN_DECLS
 #define GST_GEOMETRIC_TRANSFORM_GET_CLASS(obj) \
   (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_GEOMETRIC_TRANSFORM,GstGeometricTransformClass))
 
+enum
+{
+  GST_GT_OFF_EDGES_PIXELS_IGNORE = 0,
+  GST_GT_OFF_EDGES_PIXELS_CLAMP,
+  GST_GT_OFF_EDGES_PIXELS_WRAP
+};
+
 typedef struct _GstGeometricTransform GstGeometricTransform;
 typedef struct _GstGeometricTransformClass GstGeometricTransformClass;
 
index 92699fcb5c5081c4a3c961405af388dbdbeee29e..15c8eb1800103fc8a6c01a02384317d33beb82e2 100644 (file)
@@ -207,8 +207,8 @@ gst_kaleidoscope_class_init (GstKaleidoscopeClass * klass)
           -G_MAXDOUBLE, G_MAXDOUBLE, DEFAULT_ANGLE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gobject_class, PROP_SIDES,
-      g_param_spec_int ("sides", "sides", "number of sides",
-          0, G_MAXINT, DEFAULT_SIDES,
+      g_param_spec_int ("sides", "sides", "Number of sides of the kaleidoscope",
+          2, G_MAXINT, DEFAULT_SIDES,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gstgt_class->map_func = kaleidoscope_map;
@@ -217,6 +217,9 @@ gst_kaleidoscope_class_init (GstKaleidoscopeClass * klass)
 static void
 gst_kaleidoscope_init (GstKaleidoscope * filter, GstKaleidoscopeClass * gclass)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (filter);
+
+  gt->off_edge_pixels = GST_GT_OFF_EDGES_PIXELS_CLAMP;
   filter->angle = DEFAULT_ANGLE;
   filter->angle2 = DEFAULT_ANGLE2;
   filter->sides = DEFAULT_SIDES;
index 3c5ccb116c7a4783b50ad946a3aad1deb2b5b659..39dbf63a8260727c80d98bc72fb7c6dd34b06761 100644 (file)
@@ -188,7 +188,7 @@ gst_pinch_class_init (GstPinchClass * klass)
   g_object_class_install_property (gobject_class, PROP_INTENSITY,
       g_param_spec_double ("intensity", "intensity",
           "intensity of the pinch effect",
-          0.0, G_MAXDOUBLE, DEFAULT_INTENSITY,
+          -1.0, 1.0, DEFAULT_INTENSITY,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gstgt_class->map_func = pinch_map;
@@ -197,6 +197,9 @@ gst_pinch_class_init (GstPinchClass * klass)
 static void
 gst_pinch_init (GstPinch * filter, GstPinchClass * gclass)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (filter);
+
+  gt->off_edge_pixels = GST_GT_OFF_EDGES_PIXELS_CLAMP;
   filter->intensity = DEFAULT_INTENSITY;
 }
 
index 719416ecca9f01fffc256df08109edcec3c1f3f8..0ada5dda6a3f11aec68b9b2a417a400afe7c88ff 100644 (file)
@@ -208,6 +208,9 @@ gst_sphere_class_init (GstSphereClass * klass)
 static void
 gst_sphere_init (GstSphere * filter, GstSphereClass * gclass)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (filter);
+
+  gt->off_edge_pixels = GST_GT_OFF_EDGES_PIXELS_CLAMP;
   filter->refraction = DEFAULT_REFRACTION;
 }
 
index 209f245df272d1ab39f369e89d6ba8e8cab3e0fd..1e1b989a1c6e956673984184eaa2150aa7f946f2 100644 (file)
@@ -66,7 +66,7 @@ enum
   PROP_ANGLE
 };
 
-#define DEFAULT_ANGLE 0
+#define DEFAULT_ANGLE (G_PI)
 
 GST_BOILERPLATE (GstTwirl, gst_twirl, GstCircleGeometricTransform,
     GST_TYPE_CIRCLE_GEOMETRIC_TRANSFORM);
@@ -124,7 +124,7 @@ gst_twirl_base_init (gpointer gclass)
   gst_element_class_set_details_simple (element_class,
       "twirl",
       "Transform/Effect/Video",
-      "Applies 'twirl' geometric transform to the image",
+      "Twists the image from the center out",
       "Thiago Santos<thiago.sousa.santos@collabora.co.uk>");
 }
 
@@ -175,7 +175,8 @@ gst_twirl_class_init (GstTwirlClass * klass)
 
   g_object_class_install_property (gobject_class, PROP_ANGLE,
       g_param_spec_double ("angle", "angle",
-          "angle in radians of the twirl effect",
+          "This is the angle in radians by which pixels at the "
+          "nearest edge of the image will move",
           -G_MAXDOUBLE, G_MAXDOUBLE, DEFAULT_ANGLE,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
@@ -185,6 +186,9 @@ gst_twirl_class_init (GstTwirlClass * klass)
 static void
 gst_twirl_init (GstTwirl * filter, GstTwirlClass * gclass)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (filter);
+
+  gt->off_edge_pixels = GST_GT_OFF_EDGES_PIXELS_CLAMP;
   filter->angle = DEFAULT_ANGLE;
 }
 
index 46c42d57f9f90c8b794b10a9b99bf04cf577ff73..81eb08b4eee57973c94722ecc6221a3d4e73805a 100644 (file)
@@ -140,7 +140,7 @@ gst_water_ripple_base_init (gpointer gclass)
   gst_element_class_set_details_simple (element_class,
       "waterripple",
       "Transform/Effect/Video",
-      "Applies 'water_ripple' geometric transform to the image",
+      "Creates a water ripple effect on the image",
       "Thiago Santos<thiago.sousa.santos@collabora.co.uk>");
 }
 
@@ -216,6 +216,9 @@ gst_water_ripple_class_init (GstWaterRippleClass * klass)
 static void
 gst_water_ripple_init (GstWaterRipple * filter, GstWaterRippleClass * gclass)
 {
+  GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM (filter);
+
+  gt->off_edge_pixels = GST_GT_OFF_EDGES_PIXELS_CLAMP;
   filter->amplitude = DEFAULT_AMPLITUDE;
   filter->phase = DEFAULT_PHASE;
   filter->wavelength = DEFAULT_WAVELENGTH;