mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
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:
parent
475ff86c53
commit
f6195ba59a
3 changed files with 47 additions and 2 deletions
|
@ -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>
|
2005-07-27 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* docs/random/wtay/network-transp:
|
* docs/random/wtay/network-transp:
|
||||||
|
|
|
@ -299,6 +299,7 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
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 */
|
/* see how we can transform the input caps */
|
||||||
othercaps = gst_base_transform_transform_caps (trans, pad, 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 */
|
/* check if transform is empty */
|
||||||
if (!othercaps || gst_caps_is_empty (othercaps))
|
if (!othercaps || gst_caps_is_empty (othercaps))
|
||||||
goto no_transform;
|
goto no_transform;
|
||||||
|
@ -361,6 +365,11 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
peercaps = gst_pad_get_caps (otherpeer);
|
peercaps = gst_pad_get_caps (otherpeer);
|
||||||
intersect = gst_caps_intersect (peercaps, othercaps);
|
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 (peercaps);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
othercaps = intersect;
|
othercaps = intersect;
|
||||||
|
@ -369,6 +378,9 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
|
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gst_caps_is_empty (othercaps))
|
||||||
|
goto no_transform_possible;
|
||||||
|
|
||||||
if (!gst_caps_is_fixed (othercaps)) {
|
if (!gst_caps_is_fixed (othercaps)) {
|
||||||
GstCaps *temp;
|
GstCaps *temp;
|
||||||
|
|
||||||
|
@ -426,6 +438,14 @@ no_transform:
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
goto done;
|
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:
|
could_not_fixate:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);
|
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);
|
||||||
|
|
|
@ -299,6 +299,7 @@ gst_base_transform_configure_caps (GstBaseTransform * trans, GstCaps * in,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
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 */
|
/* see how we can transform the input caps */
|
||||||
othercaps = gst_base_transform_transform_caps (trans, pad, 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 */
|
/* check if transform is empty */
|
||||||
if (!othercaps || gst_caps_is_empty (othercaps))
|
if (!othercaps || gst_caps_is_empty (othercaps))
|
||||||
goto no_transform;
|
goto no_transform;
|
||||||
|
@ -361,6 +365,11 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
peercaps = gst_pad_get_caps (otherpeer);
|
peercaps = gst_pad_get_caps (otherpeer);
|
||||||
intersect = gst_caps_intersect (peercaps, othercaps);
|
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 (peercaps);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
othercaps = intersect;
|
othercaps = intersect;
|
||||||
|
@ -369,6 +378,9 @@ gst_base_transform_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
|
"filtering against peer yields %" GST_PTR_FORMAT, othercaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gst_caps_is_empty (othercaps))
|
||||||
|
goto no_transform_possible;
|
||||||
|
|
||||||
if (!gst_caps_is_fixed (othercaps)) {
|
if (!gst_caps_is_fixed (othercaps)) {
|
||||||
GstCaps *temp;
|
GstCaps *temp;
|
||||||
|
|
||||||
|
@ -426,6 +438,14 @@ no_transform:
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
goto done;
|
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:
|
could_not_fixate:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);
|
GST_DEBUG_OBJECT (trans, "FAILED to fixate %" GST_PTR_FORMAT, othercaps);
|
||||||
|
|
Loading…
Reference in a new issue