summaryrefslogtreecommitdiffstats
path: root/gst/deinterlace
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2004-01-02 07:25:10 +0000
committerDavid Schleef <ds@schleef.org>2004-01-02 07:25:10 +0000
commit7b159d505fea1db624050187f7336bc030d19d44 (patch)
treef8a1932cbfcd983791213f3ef760ffa568303cc3 /gst/deinterlace
parentab8b69675431e3623eac1ecaee91ad80a0786048 (diff)
downloadgst-plugins-bad-7b159d505fea1db624050187f7336bc030d19d44.tar.gz
gst-plugins-bad-7b159d505fea1db624050187f7336bc030d19d44.tar.bz2
gst-plugins-bad-7b159d505fea1db624050187f7336bc030d19d44.zip
Negotiation fixes
Original commit message from CVS: Negotiation fixes
Diffstat (limited to 'gst/deinterlace')
-rw-r--r--gst/deinterlace/gstdeinterlace.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 7b2c3ee3..605eb3f6 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -145,15 +145,20 @@ gst_deinterlace_class_init (GstDeInterlaceClass *klass)
}
static GstPadLinkReturn
-gst_deinterlace_sinkconnect (GstPad *pad, const GstCaps *caps)
+gst_deinterlace_link (GstPad *pad, const GstCaps *caps)
{
GstDeInterlace *filter;
GstStructure *structure;
+ GstPadLinkReturn ret;
filter = GST_DEINTERLACE(gst_pad_get_parent (pad));
- structure = gst_caps_get_structure (caps, 0);
+ ret = gst_pad_try_set_caps (filter->srcpad, caps);
+ if (GST_PAD_LINK_FAILED (ret)) {
+ return ret;
+ }
+ structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &filter->width);
gst_structure_get_int (structure, "height", &filter->height);
@@ -163,7 +168,8 @@ gst_deinterlace_sinkconnect (GstPad *pad, const GstCaps *caps)
filter->picsize = filter->width*filter->height;
filter->src = g_malloc(filter->picsize);
}
- return gst_pad_try_set_caps (filter->srcpad, caps);
+
+ return GST_PAD_LINK_OK;
}
static void
@@ -172,11 +178,12 @@ gst_deinterlace_init (GstDeInterlace *filter)
filter->sinkpad = gst_pad_new_from_template(
gst_static_pad_template_get(&deinterlace_sink_factory),"sink");
gst_pad_set_chain_function(filter->sinkpad,gst_deinterlace_chain);
- gst_pad_set_link_function(filter->sinkpad,gst_deinterlace_sinkconnect);
+ gst_pad_set_link_function(filter->sinkpad,gst_deinterlace_link);
gst_element_add_pad(GST_ELEMENT(filter),filter->sinkpad);
filter->srcpad = gst_pad_new_from_template(
gst_static_pad_template_get(&deinterlace_src_factory),"src");
+ gst_pad_set_link_function(filter->srcpad,gst_deinterlace_link);
gst_element_add_pad(GST_ELEMENT(filter),filter->srcpad);
filter->show_deinterlaced_area_only = FALSE;