summaryrefslogtreecommitdiffstats
path: root/gst/effectv/gstaging.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-22 01:47:09 +0000
committerDavid Schleef <ds@schleef.org>2003-12-22 01:47:09 +0000
commitce51f6173ca1c37d90f8e2e316d90316583d7755 (patch)
tree270b121765a11455f5bf8166b526d7ac336dc56c /gst/effectv/gstaging.c
parentf43f0a9fd781bafab689e46bd936af9cb5ed2690 (diff)
Merge CAPS branch
Original commit message from CVS: Merge CAPS branch
Diffstat (limited to 'gst/effectv/gstaging.c')
-rw-r--r--gst/effectv/gstaging.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
index be7723cc..294117df 100644
--- a/gst/effectv/gstaging.c
+++ b/gst/effectv/gstaging.c
@@ -142,8 +142,10 @@ gst_agingtv_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class, gst_effectv_src_factory ());
- gst_element_class_add_pad_template (element_class, gst_effectv_sink_factory ());
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get(&gst_effectv_src_template));
+ gst_element_class_add_pad_template (element_class,
+ gst_static_pad_template_get(&gst_effectv_sink_template));
gst_element_class_set_details (element_class, &gst_agingtv_details);
}
@@ -164,34 +166,36 @@ gst_agingtv_class_init (GstAgingTVClass * klass)
}
static GstPadLinkReturn
-gst_agingtv_sinkconnect (GstPad * pad, GstCaps * caps)
+gst_agingtv_sinkconnect (GstPad * pad, const GstCaps * caps)
{
GstAgingTV *filter;
+ GstStructure *structure;
filter = GST_AGINGTV (gst_pad_get_parent (pad));
- if (!GST_CAPS_IS_FIXED (caps))
- return GST_PAD_LINK_DELAYED;
+ structure = gst_caps_get_structure (caps, 0);
- gst_caps_get_int (caps, "width", &filter->width);
- gst_caps_get_int (caps, "height", &filter->height);
+ gst_structure_get_int (structure, "width", &filter->width);
+ gst_structure_get_int (structure, "height", &filter->height);
filter->video_size = filter->width * filter->height;
filter->aging_mode = 0;
aging_mode_switch (filter);
- return gst_pad_try_set_caps (filter->srcpad, gst_caps_ref (caps));
+ return gst_pad_try_set_caps (filter->srcpad, caps);
}
static void
gst_agingtv_init (GstAgingTV * filter)
{
- filter->sinkpad = gst_pad_new_from_template (gst_effectv_sink_factory (), "sink");
+ filter->sinkpad = gst_pad_new_from_template (
+ gst_static_pad_template_get(&gst_effectv_sink_template), "sink");
gst_pad_set_chain_function (filter->sinkpad, gst_agingtv_chain);
gst_pad_set_link_function (filter->sinkpad, gst_agingtv_sinkconnect);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
- filter->srcpad = gst_pad_new_from_template (gst_effectv_src_factory (), "src");
+ filter->srcpad = gst_pad_new_from_template (
+ gst_static_pad_template_get(&gst_effectv_src_template), "src");
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
}