From d2a814f84c5d4c28a1d4bd4e97d96ba1b21beab1 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 9 Aug 2004 09:22:12 +0000 Subject: [PATCH] fix add debugging Original commit message from CVS: fix add debugging --- ext/lame/gstlame.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c index 4427a6a..e54122e 100644 --- a/ext/lame/gstlame.c +++ b/ext/lame/gstlame.c @@ -807,13 +807,15 @@ gst_lame_chain (GstPad * pad, GstData * _data) lame = GST_LAME (gst_pad_get_parent (pad)); - GST_DEBUG ("entered chain"); + GST_LOG_OBJECT (lame, "entered chain"); if (GST_IS_EVENT (buf)) { switch (GST_EVENT_TYPE (buf)) { case GST_EVENT_EOS: + GST_DEBUG_OBJECT (lame, "handling EOS event"); eos = TRUE; case GST_EVENT_FLUSH: + GST_DEBUG_OBJECT (lame, "handling FLUSH event"); mp3_buffer_size = 7200; mp3_data = g_malloc (mp3_buffer_size); @@ -821,6 +823,7 @@ gst_lame_chain (GstPad * pad, GstData * _data) gst_event_unref (GST_EVENT (buf)); break; case GST_EVENT_TAG: + GST_DEBUG_OBJECT (lame, "handling TAG event"); if (lame->tags) { gst_tag_list_insert (lame->tags, gst_event_tag_get_list (GST_EVENT (buf)), @@ -862,7 +865,7 @@ gst_lame_chain (GstPad * pad, GstData * _data) mp3_data, mp3_buffer_size); } - GST_DEBUG ("encoded %d bytes of audio to %d bytes of mp3", + GST_LOG_OBJECT (lame, "encoded %d bytes of audio to %d bytes of mp3", GST_BUFFER_SIZE (buf), mp3_size); duration = (GST_SECOND * GST_BUFFER_SIZE (buf) / @@ -870,9 +873,10 @@ gst_lame_chain (GstPad * pad, GstData * _data) if (GST_BUFFER_DURATION (buf) != GST_CLOCK_TIME_NONE && GST_BUFFER_DURATION (buf) != duration) - GST_DEBUG ("mad: incoming buffer had incorrect duration %lld, " - "outgoing buffer will have correct duration %lld", - GST_BUFFER_DURATION (buf), duration); + GST_DEBUG_OBJECT (lame, "incoming buffer had incorrect duration " + GST_TIME_FORMAT "outgoing buffer will have correct duration " + GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_TIME_ARGS (duration)); if (lame->last_ts == GST_CLOCK_TIME_NONE) { lame->last_ts = GST_BUFFER_TIMESTAMP (buf); -- 2.7.4