gst/base/gstbasetransform.*: Remove broken delay_configure (fixes renegotiation of software scaling pipelines); remov...

Original commit message from CVS:
* 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.
This commit is contained in:
Ronald S. Bultje 2005-07-28 11:49:56 +00:00
parent 7c7a4b68a1
commit cd76217ce5
5 changed files with 18 additions and 48 deletions

View file

@ -1,3 +1,11 @@
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):

View file

@ -299,7 +299,6 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
return ret;
}
#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
@ -322,10 +321,7 @@ 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;
@ -365,11 +361,6 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
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;
@ -413,12 +404,10 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
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)
@ -577,18 +566,11 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf,
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;

View file

@ -54,7 +54,6 @@ struct _GstBaseTransform {
gboolean in_place;
guint out_size;
gboolean delay_configure;
};
struct _GstBaseTransformClass {

View file

@ -299,7 +299,6 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
return ret;
}
#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
@ -322,10 +321,7 @@ 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;
@ -365,11 +361,6 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
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;
@ -413,12 +404,10 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
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)
@ -577,18 +566,11 @@ gst_base_transform_handle_buffer (GstBaseTransform * trans, GstBuffer * inbuf,
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;

View file

@ -54,7 +54,6 @@ struct _GstBaseTransform {
gboolean in_place;
guint out_size;
gboolean delay_configure;
};
struct _GstBaseTransformClass {