From 72cae37f93f8026829b7fcc6d43033c6322bee92 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 20 Feb 2002 16:44:46 +0000 Subject: [PATCH] a warning fix a potential commenting error fix more debug output when trying to set caps so I can actually tell from ... Original commit message from CVS: * a warning fix * a potential commenting error fix * more debug output when trying to set caps so I can actually tell from it what's going on --- gst/gstinfo.c | 6 +++--- gst/gstpad.c | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 987b0e7..38742b7 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -333,8 +333,8 @@ gst_default_info_handler (gint category, gboolean incore, #else fprintf(stderr,"INFO:%s%s %s\n", location,elementname,string); - #endif /* GST_DEBUG_COLOR */ -/* + #endif // GST_DEBUG_COLOR + #endif */ @@ -480,7 +480,7 @@ gst_default_error_handler (gchar *file, gchar *function, /***** DEBUG system *****/ GHashTable *__gst_function_pointers = NULL; /* FIXME make this thread specific */ -static GSList *stack_trace = NULL; +/* static GSList *stack_trace = NULL; */ gchar *_gst_debug_nameof_funcptr (void *ptr) __attribute__ ((no_instrument_function)); diff --git a/gst/gstpad.c b/gst/gstpad.c index 1faa848..0ea2cc0 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1011,7 +1011,7 @@ gst_pad_try_set_caps_func (GstRealPad *pad, GstCaps *caps, gboolean notify) return GST_PAD_CONNECT_REFUSED; } } - /* we can only set caps on the pad if they are ficed */ + /* we can only set caps on the pad if they are fixed */ if (GST_CAPS_IS_FIXED (caps)) { GST_INFO (GST_CAT_CAPS, "setting caps on pad %s:%s", @@ -1052,7 +1052,9 @@ gst_pad_try_set_caps (GstPad *pad, GstCaps *caps) /* setting non fixed caps on a pad is not allowed */ if (!GST_CAPS_IS_FIXED (caps)) { - g_warning ("trying to set non fixed caps on pad %s:%s", + GST_INFO (GST_CAT_CAPS, "trying to set unfixed caps on pad %s:%s, not allowed", + GST_DEBUG_PAD_NAME (realpad)); + g_warning ("trying to set non fixed caps on pad %s:%s, not allowed", GST_DEBUG_PAD_NAME (realpad)); gst_caps_debug (caps); return FALSE; @@ -1060,11 +1062,22 @@ gst_pad_try_set_caps (GstPad *pad, GstCaps *caps) /* if we have a peer try to set the caps, notifying the peerpad * if it has a connect function */ if (peer && !gst_pad_try_set_caps_func (peer, caps, TRUE)) + { + GST_INFO (GST_CAT_CAPS, "tried to set caps on peerpad %s:%s but couldn't", + GST_DEBUG_PAD_NAME (peer)); return FALSE; + } /* then try to set our own caps, we don't need to be notified */ if (!gst_pad_try_set_caps_func (realpad, caps, FALSE)) + { + GST_INFO (GST_CAT_CAPS, "tried to set own caps on pad %s:%s but couldn't", + GST_DEBUG_PAD_NAME (realpad)); return FALSE; - + } + GST_INFO (GST_CAT_CAPS, "succeeded setting caps %p on pad %s:%s", + caps, GST_DEBUG_PAD_NAME (realpad)); + gst_caps_debug (caps); + return TRUE; } -- 2.7.4