gst/base/gstbasetransform.c: Better debug if no transform is possible.

Original commit message from CVS:
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Better debug if no transform is possible.
This commit is contained in:
Ronald S. Bultje 2005-07-28 10:38:02 +00:00
parent 475ff86c53
commit f6195ba59a
3 changed files with 47 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-07-28 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/base/gstbasetransform.c: (gst_base_transform_setcaps):
Better debug if no transform is possible.
2005-07-27 Wim Taymans <wim@fluendo.com>
* docs/random/wtay/network-transp:

View file

@ -299,6 +299,7 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
return ret;
}
#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
@ -321,7 +322,10 @@ 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;
@ -361,6 +365,11 @@ 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;
@ -369,6 +378,9 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
}
if (gst_caps_is_empty (othercaps))
goto no_transform_possible;
if (!gst_caps_is_fixed (othercaps)) {
GstCaps *temp;
@ -426,6 +438,14 @@ no_transform:
ret = FALSE;
goto done;
}
no_transform_possible:
{
GST_DEBUG_OBJECT (trans,
"transform could not transform %" GST_PTR_FORMAT
" in anything we support", caps);
ret = FALSE;
goto done;
}
could_not_fixate:
{
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);

View file

@ -299,6 +299,7 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
return ret;
}
#include <string.h>
static gboolean
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
{
@ -321,7 +322,10 @@ 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;
@ -361,6 +365,11 @@ 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;
@ -369,6 +378,9 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
}
if (gst_caps_is_empty (othercaps))
goto no_transform_possible;
if (!gst_caps_is_fixed (othercaps)) {
GstCaps *temp;
@ -426,6 +438,14 @@ no_transform:
ret = FALSE;
goto done;
}
no_transform_possible:
{
GST_DEBUG_OBJECT (trans,
"transform could not transform %" GST_PTR_FORMAT
" in anything we support", caps);
ret = FALSE;
goto done;
}
could_not_fixate:
{
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);