From 75da519525848c219470d4a394a2410401ab3057 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 22 Jan 2004 03:25:16 +0000 Subject: [PATCH] ext/swfdec/gstswfdec.*: Fix negotiation. Original commit message from CVS: * ext/swfdec/gstswfdec.c: (gst_swfdec_video_getcaps), (gst_swfdec_video_link), (copy_image), (gst_swfdec_loop), (gst_swfdec_init), (gst_swfdec_change_state): * ext/swfdec/gstswfdec.h: Fix negotiation. * gst/adder/gstadder.c: (gst_adder_link), (gst_adder_init), (gst_adder_request_new_pad): Fix negotiation. * gst/goom/gstgoom.c: (gst_goom_init), (gst_goom_src_fixate): Add a fixate function. * gst/intfloat/gstfloat2int.c: * gst/intfloat/gstfloat2int.h: * gst/intfloat/gstint2float.c: * gst/intfloat/gstint2float.h: Completely rewrite the negotiation. Doesn't quite work yet, due to some buffer-frames problem. --- ChangeLog | 18 ++++++++++++++++++ gst/adder/gstadder.c | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3605fb6d40..6b91401e6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-01-21 David Schleef + + * ext/swfdec/gstswfdec.c: (gst_swfdec_video_getcaps), + (gst_swfdec_video_link), (copy_image), (gst_swfdec_loop), + (gst_swfdec_init), (gst_swfdec_change_state): + * ext/swfdec/gstswfdec.h: + Fix negotiation. + * gst/adder/gstadder.c: (gst_adder_link), (gst_adder_init), + (gst_adder_request_new_pad): Fix negotiation. + * gst/goom/gstgoom.c: (gst_goom_init), (gst_goom_src_fixate): + Add a fixate function. + * gst/intfloat/gstfloat2int.c: + * gst/intfloat/gstfloat2int.h: + * gst/intfloat/gstint2float.c: + * gst/intfloat/gstint2float.h: + Completely rewrite the negotiation. Doesn't quite work yet, + due to some buffer-frames problem. + 2004-01-21 Thomas Vander Stichele * ext/gnomevfs/gstgnomevfssrc.c: diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 65d6029e2a..cbfa84b548 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -213,12 +213,27 @@ gst_adder_link (GstPad *pad, const GstCaps *caps) GList *remove = NULL; GSList *channels; GstPad *p; + const GList *pads; g_return_val_if_fail (caps != NULL, GST_PAD_LINK_REFUSED); g_return_val_if_fail (pad != NULL, GST_PAD_LINK_REFUSED); adder = GST_ADDER (GST_PAD_PARENT (pad)); + pads = gst_element_get_pad_list (element); + while (pads) { + GstPad *otherpad = GST_PADD (pads->data); + + if (otherpad != pad) { + ret = gst_pad_try_set_caps (otherpad, caps); + if (GST_PAD_LINK_FAILED (ret)) { + return ret; + } + } + pads = g_list_next (pads); + } + + if (!gst_adder_parse_caps (adder, gst_caps_get_structure (caps, 0))) return GST_PAD_LINK_REFUSED; @@ -297,6 +312,7 @@ gst_adder_init (GstAdder *adder) gst_static_pad_template_get (&gst_adder_src_template), "src"); gst_element_add_pad (GST_ELEMENT (adder), adder->srcpad); gst_element_set_loop_function (GST_ELEMENT (adder), gst_adder_loop); + gst_pad_set_getcaps_function (adder->srcpad, gst_pad_proxy_getcaps); gst_pad_set_link_function (adder->srcpad, gst_adder_link); adder->format = GST_ADDER_FORMAT_UNSET; @@ -339,6 +355,7 @@ gst_adder_request_new_pad (GstElement *element, GstPadTemplate *templ, input->bytestream = gst_bytestream_new (input->sinkpad); gst_element_add_pad (GST_ELEMENT (adder), input->sinkpad); + gst_pad_set_getcaps_function (input->sinkpad, gst_pad_proxy_getcaps); gst_pad_set_link_function(input->sinkpad, gst_adder_link); /* add the input_channel to the list of input channels */