summaryrefslogtreecommitdiffstats
path: root/gst/deinterlace2
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-11-06 14:05:55 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-11-06 14:05:55 +0000
commit761df7a066e1bd005db8f8b2b09ce61fafe1af20 (patch)
treea872a7b0adfebcb4b522de43a2f2e50c2356b336 /gst/deinterlace2
parent39eba4bdecc5ec62baf8ed5a6c58d37101a02e67 (diff)
downloadgst-plugins-bad-761df7a066e1bd005db8f8b2b09ce61fafe1af20.tar.gz
gst-plugins-bad-761df7a066e1bd005db8f8b2b09ce61fafe1af20.tar.bz2
gst-plugins-bad-761df7a066e1bd005db8f8b2b09ce61fafe1af20.zip
gst/deinterlace2/gstdeinterlace2.c: Bring properties into this century.
Original commit message from CVS: * gst/deinterlace2/gstdeinterlace2.c: (gst_deinterlace2_class_init), (gst_deinterlace2_init), (gst_deinterlace2_set_property), (gst_deinterlace2_get_property): Bring properties into this century.
Diffstat (limited to 'gst/deinterlace2')
-rw-r--r--gst/deinterlace2/gstdeinterlace2.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/gst/deinterlace2/gstdeinterlace2.c b/gst/deinterlace2/gstdeinterlace2.c
index 0ef53813..3d724d7e 100644
--- a/gst/deinterlace2/gstdeinterlace2.c
+++ b/gst/deinterlace2/gstdeinterlace2.c
@@ -41,13 +41,19 @@ enum
LAST_SIGNAL
};
-/* Arguments */
+/* Properties */
+
+#define DEFAULT_METHOD GST_DEINTERLACE2_GREEDY_H
+#define DEFAULT_FIELDS GST_DEINTERLACE2_ALL
+#define DEFAULT_FIELD_LAYOUT GST_DEINTERLACE2_LAYOUT_AUTO
+
enum
{
- ARG_0,
- ARG_METHOD,
- ARG_FIELDS,
- ARG_FIELD_LAYOUT
+ PROP_0,
+ PROP_METHOD,
+ PROP_FIELDS,
+ PROP_FIELD_LAYOUT,
+ PROP_LAST
};
G_DEFINE_TYPE (GstDeinterlaceMethod, gst_deinterlace_method, GST_TYPE_OBJECT);
@@ -453,30 +459,28 @@ gst_deinterlace2_class_init (GstDeinterlace2Class * klass)
gobject_class->get_property = gst_deinterlace2_get_property;
gobject_class->finalize = gst_deinterlace2_finalize;
- g_object_class_install_property (gobject_class, ARG_METHOD,
+ g_object_class_install_property (gobject_class, PROP_METHOD,
g_param_spec_enum ("method",
"Method",
"Deinterlace Method",
GST_TYPE_DEINTERLACE2_METHODS,
- GST_DEINTERLACE2_TOMSMOCOMP,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
+ DEFAULT_METHOD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
- g_object_class_install_property (gobject_class, ARG_FIELDS,
+ g_object_class_install_property (gobject_class, PROP_FIELDS,
g_param_spec_enum ("fields",
"fields",
"Fields to use for deinterlacing",
GST_TYPE_DEINTERLACE2_FIELDS,
- GST_DEINTERLACE2_ALL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
+ DEFAULT_FIELDS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
- g_object_class_install_property (gobject_class, ARG_FIELD_LAYOUT,
+ g_object_class_install_property (gobject_class, PROP_FIELD_LAYOUT,
g_param_spec_enum ("tff",
"tff",
"Deinterlace top field first",
GST_TYPE_DEINTERLACE2_FIELD_LAYOUT,
- GST_DEINTERLACE2_LAYOUT_AUTO,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
+ DEFAULT_FIELD_LAYOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
element_class->change_state =
@@ -539,9 +543,9 @@ gst_deinterlace2_init (GstDeinterlace2 * self, GstDeinterlace2Class * klass)
gst_element_no_more_pads (GST_ELEMENT (self));
- gst_deinterlace2_set_method (self, GST_DEINTERLACE2_GREEDY_H);
- self->field_layout = GST_DEINTERLACE2_LAYOUT_AUTO;
- self->fields = GST_DEINTERLACE2_ALL;
+ gst_deinterlace2_set_method (self, DEFAULT_METHOD);
+ self->fields = DEFAULT_FIELDS;
+ self->field_layout = DEFAULT_FIELD_LAYOUT;
gst_deinterlace2_reset (self);
}
@@ -591,10 +595,10 @@ gst_deinterlace2_set_property (GObject * object, guint prop_id,
self = GST_DEINTERLACE2 (object);
switch (prop_id) {
- case ARG_METHOD:
+ case PROP_METHOD:
gst_deinterlace2_set_method (self, g_value_get_enum (value));
break;
- case ARG_FIELDS:{
+ case PROP_FIELDS:{
gint oldfields;
GST_OBJECT_LOCK (self);
@@ -605,7 +609,7 @@ gst_deinterlace2_set_property (GObject * object, guint prop_id,
GST_OBJECT_UNLOCK (self);
break;
}
- case ARG_FIELD_LAYOUT:
+ case PROP_FIELD_LAYOUT:
self->field_layout = g_value_get_enum (value);
break;
default:
@@ -624,13 +628,13 @@ gst_deinterlace2_get_property (GObject * object, guint prop_id,
self = GST_DEINTERLACE2 (object);
switch (prop_id) {
- case ARG_METHOD:
+ case PROP_METHOD:
g_value_set_enum (value, self->method_id);
break;
- case ARG_FIELDS:
+ case PROP_FIELDS:
g_value_set_enum (value, self->fields);
break;
- case ARG_FIELD_LAYOUT:
+ case PROP_FIELD_LAYOUT:
g_value_set_enum (value, self->field_layout);
break;
default: