ext/swfdec/gstswfdec.*: Fix negotiation.
authorDavid Schleef <ds@schleef.org>
Thu, 22 Jan 2004 03:25:16 +0000 (03:25 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 22 Jan 2004 03:25:16 +0000 (03:25 +0000)
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
gst/adder/gstadder.c

index 3605fb6d405b9620d82fa40ad30a4d039ab97c24..6b91401e6c9b636e3208ba62acf4f9cfd9c3d08a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2004-01-21  David Schleef  <ds@schleef.org>
+
+       * 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  <thomas at apestaart dot org>
 
        * ext/gnomevfs/gstgnomevfssrc.c:
index 65d6029e2ad9f6e8e1f766e766c9e8f68f8eace4..cbfa84b5483e48ee075241aa13af72c142bcf0fe 100644 (file)
@@ -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 */