summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-07-28 11:49:56 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-07-28 11:49:56 +0000
commitcd76217ce5ee048357c83ae77b5ae24cd3ea3017 (patch)
tree71b4c68b27147de2b4bec925ba78b18b8cb20923
parent7c7a4b68a1761372e41bbb85ee31178b26a3d5f7 (diff)
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.
-rw-r--r--ChangeLog8
-rw-r--r--gst/base/gstbasetransform.c28
-rw-r--r--gst/base/gstbasetransform.h1
-rw-r--r--libs/gst/base/gstbasetransform.c28
-rw-r--r--libs/gst/base/gstbasetransform.h1
5 files changed, 18 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index fee0cdc316..34bef0264b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
diff --git a/gst/base/gstbasetransform.c b/gst/base/gstbasetransform.c
index 2ab0db9fb9..e02eb335d9 100644
--- a/gst/base/gstbasetransform.c
+++ b/gst/base/gstbasetransform.c
@@ -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;
diff --git a/gst/base/gstbasetransform.h b/gst/base/gstbasetransform.h
index fcd34abbe2..68673e7e78 100644
--- a/gst/base/gstbasetransform.h
+++ b/gst/base/gstbasetransform.h
@@ -54,7 +54,6 @@ struct _GstBaseTransform {
gboolean in_place;
guint out_size;
- gboolean delay_configure;
};
struct _GstBaseTransformClass {
diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c
index 2ab0db9fb9..e02eb335d9 100644
--- a/libs/gst/base/gstbasetransform.c
+++ b/libs/gst/base/gstbasetransform.c
@@ -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;
diff --git a/libs/gst/base/gstbasetransform.h b/libs/gst/base/gstbasetransform.h
index fcd34abbe2..68673e7e78 100644
--- a/libs/gst/base/gstbasetransform.h
+++ b/libs/gst/base/gstbasetransform.h
@@ -54,7 +54,6 @@ struct _GstBaseTransform {
gboolean in_place;
guint out_size;
- gboolean delay_configure;
};
struct _GstBaseTransformClass {