diff options
author | Andy Wingo <wingo@pobox.com> | 2002-02-19 05:59:06 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2002-02-19 05:59:06 +0000 |
commit | e730de0bce435716cd48d79d21eeaf21e6838461 (patch) | |
tree | 52e422d1fa3e0a8ad232ed220fc0d3a4d271989d /gst | |
parent | f1e09f94aa320d8c8902ef6b230d175345803cb0 (diff) | |
download | gst-plugins-bad-e730de0bce435716cd48d79d21eeaf21e6838461.tar.gz gst-plugins-bad-e730de0bce435716cd48d79d21eeaf21e6838461.tar.bz2 gst-plugins-bad-e730de0bce435716cd48d79d21eeaf21e6838461.zip |
changes to spider: add padtemplates so the connect functions can connect two request-pad elements add a hack in gstel...
Original commit message from CVS:
* changes to spider:
* add padtemplates so the connect functions can connect two request-pad
elements
* add a hack in gstelement.c. please look at this, Company, and see how
we can get around this
* add backwards caps-propagation support in identity, int2float, float2int,
adder, speed, volume
Diffstat (limited to 'gst')
-rw-r--r-- | gst/speed/gstspeed.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index bbbe7fd8..e91604df 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -110,16 +110,18 @@ static GstElementClass *parent_class = NULL; //static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; static GstPadConnectReturn -speed_connect_sink (GstPad *pad, GstCaps *caps) +speed_connect (GstPad *pad, GstCaps *caps) { GstSpeed *filter; + GstPad *otherpad; filter = GST_SPEED (gst_pad_get_parent (pad)); g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED); g_return_val_if_fail (GST_IS_SPEED (filter), GST_PAD_CONNECT_REFUSED); - + otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad); + if (GST_CAPS_IS_FIXED (caps)) { - if (!speed_parse_caps (filter, caps) || !gst_pad_try_set_caps (filter->srcpad, caps)) + if (!speed_parse_caps (filter, caps) || !gst_pad_try_set_caps (otherpad, caps)) return GST_PAD_CONNECT_REFUSED; return GST_PAD_CONNECT_OK; @@ -219,9 +221,10 @@ static void speed_init (GstSpeed *filter) { filter->sinkpad = gst_pad_new_from_template(speed_sink_factory (),"sink"); - gst_pad_set_connect_function(filter->sinkpad,speed_connect_sink); + gst_pad_set_connect_function(filter->sinkpad,speed_connect); gst_pad_set_bufferpool_function (filter->sinkpad, speed_sink_get_bufferpool); filter->srcpad = gst_pad_new_from_template(speed_src_factory (),"src"); + gst_pad_set_connect_function(filter->srcpad,speed_connect); gst_element_add_pad(GST_ELEMENT(filter),filter->sinkpad); gst_element_add_pad(GST_ELEMENT(filter),filter->srcpad); |