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>");
}
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));
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
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
#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;
-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;
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;
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;
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;
}
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;
}
PROP_ANGLE
};
-#define DEFAULT_ANGLE 0
+#define DEFAULT_ANGLE (G_PI)
GST_BOILERPLATE (GstTwirl, gst_twirl, GstCircleGeometricTransform,
GST_TYPE_CIRCLE_GEOMETRIC_TRANSFORM);
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>");
}
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));
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;
}
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>");
}
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;