+2005-07-28 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
+ * gst/base/gstbasetransform.c: (gst_base_transform_setcaps),
+ (gst_base_transform_handle_buffer):
+ * gst/base/gstbasetransform.h:
+ Remove broken delay_configure (fixes renegotiation of software
+ scaling pipelines); remove some leftover printf()s.
+
2005-07-28 Wim Taymans <wim@fluendo.com>
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
return ret;
}
-#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
/* see how we can transform the input caps */
othercaps = gst_base_transform_transform_caps (trans, pad, caps);
- if (!strcmp (GST_OBJECT_NAME (trans), "vconv")) {
- g_print ("%s transforms into %s\n",
- gst_caps_to_string (caps), gst_caps_to_string (othercaps));
- }
+
/* check if transform is empty */
if (!othercaps || gst_caps_is_empty (othercaps))
goto no_transform;
peercaps = gst_pad_get_caps (otherpeer);
intersect = gst_caps_intersect (peercaps, othercaps);
- if (!strcmp (GST_OBJECT_NAME (trans), "vconv")) {
- g_print ("%s -> %s = %s\n",
- gst_caps_to_string (peercaps),
- gst_caps_to_string (othercaps), gst_caps_to_string (intersect));
- }
gst_caps_unref (peercaps);
gst_caps_unref (othercaps);
othercaps = intersect;
GST_DEBUG_OBJECT (trans, "in_place: %d", trans->in_place);
/* see if we have to configure the element now */
- if (!trans->delay_configure) {
- if (pad == trans->sinkpad)
- ret = gst_base_transform_configure_caps (trans, caps, othercaps);
- else
- ret = gst_base_transform_configure_caps (trans, othercaps, caps);
- }
+ if (pad == trans->sinkpad)
+ ret = gst_base_transform_configure_caps (trans, caps, othercaps);
+ else
+ ret = gst_base_transform_configure_caps (trans, othercaps, caps);
done:
if (otherpeer)
goto no_size;
}
- /* we cannot reconfigure the element yet as we are still processing
- * the old buffer. We will therefore delay the reconfiguration of the
- * element until we have processed this last buffer. */
- trans->delay_configure = TRUE;
-
/* no in place transform, get buffer, this might renegotiate. */
ret = gst_pad_alloc_buffer (trans->srcpad,
GST_BUFFER_OFFSET (inbuf), trans->out_size,
GST_PAD_CAPS (trans->srcpad), outbuf);
- trans->delay_configure = FALSE;
-
if (ret != GST_FLOW_OK)
goto no_buffer;
gboolean in_place;
guint out_size;
- gboolean delay_configure;
};
struct _GstBaseTransformClass {
return ret;
}
-#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
/* see how we can transform the input caps */
othercaps = gst_base_transform_transform_caps (trans, pad, caps);
- if (!strcmp (GST_OBJECT_NAME (trans), "vconv")) {
- g_print ("%s transforms into %s\n",
- gst_caps_to_string (caps), gst_caps_to_string (othercaps));
- }
+
/* check if transform is empty */
if (!othercaps || gst_caps_is_empty (othercaps))
goto no_transform;
peercaps = gst_pad_get_caps (otherpeer);
intersect = gst_caps_intersect (peercaps, othercaps);
- if (!strcmp (GST_OBJECT_NAME (trans), "vconv")) {
- g_print ("%s -> %s = %s\n",
- gst_caps_to_string (peercaps),
- gst_caps_to_string (othercaps), gst_caps_to_string (intersect));
- }
gst_caps_unref (peercaps);
gst_caps_unref (othercaps);
othercaps = intersect;
GST_DEBUG_OBJECT (trans, "in_place: %d", trans->in_place);
/* see if we have to configure the element now */
- if (!trans->delay_configure) {
- if (pad == trans->sinkpad)
- ret = gst_base_transform_configure_caps (trans, caps, othercaps);
- else
- ret = gst_base_transform_configure_caps (trans, othercaps, caps);
- }
+ if (pad == trans->sinkpad)
+ ret = gst_base_transform_configure_caps (trans, caps, othercaps);
+ else
+ ret = gst_base_transform_configure_caps (trans, othercaps, caps);
done:
if (otherpeer)
goto no_size;
}
- /* we cannot reconfigure the element yet as we are still processing
- * the old buffer. We will therefore delay the reconfiguration of the
- * element until we have processed this last buffer. */
- trans->delay_configure = TRUE;
-
/* no in place transform, get buffer, this might renegotiate. */
ret = gst_pad_alloc_buffer (trans->srcpad,
GST_BUFFER_OFFSET (inbuf), trans->out_size,
GST_PAD_CAPS (trans->srcpad), outbuf);
- trans->delay_configure = FALSE;
-
if (ret != GST_FLOW_OK)
goto no_buffer;
gboolean in_place;
guint out_size;
- gboolean delay_configure;
};
struct _GstBaseTransformClass {