From: Thomas V. S. <tho...@pd...> - 2004-06-26 15:44:12
|
CVS Root: /home/cvs/gstreamer Module: gst-plugins Changes by: thomasvs Date: Sun Jun 27 2004 01:44:07 EST Log message: fix debugging Modified files: . : ChangeLog gst/videorate : gstvideorate.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.817&r2=1.818 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/videorate/gstvideorate.c.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.817 retrieving revision 1.818 diff -u -d -r1.817 -r1.818 --- ChangeLog 25 Jun 2004 18:50:31 -0000 1.817 +++ ChangeLog 26 Jun 2004 15:43:55 -0000 1.818 @@ -1,3 +1,9 @@ +2004-06-26 set REAL_NAME environment variable <set EMAIL_ADDRESS environment variable> + + * gst/videorate/gstvideorate.c: (gst_videorate_chain), + (plugin_init): + fix debugging. add category. 2004-06-25 Thomas Vander Stichele <thomas at apestaart dot org> * gst/sine/gstsinesrc.c: (gst_sinesrc_get): Index: gstvideorate.c RCS file: /home/cvs/gstreamer/gst-plugins/gst/videorate/gstvideorate.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstvideorate.c 24 Jun 2004 12:45:26 -0000 1.5 +++ gstvideorate.c 26 Jun 2004 15:43:55 -0000 1.6 @@ -24,6 +24,11 @@ #include <gst/gst.h> #include <gst/video/video.h> +GST_DEBUG_CATEGORY (videorate_debug); +#define GST_CAT_DEFAULT videorate_debug #define GST_TYPE_VIDEORATE \ (gst_videorate_get_type()) #define GST_VIDEORATE(obj) \ @@ -340,16 +345,16 @@ intime = GST_BUFFER_TIMESTAMP (buf); GST_LOG_OBJECT (videorate, - "videorate: prev buf %" GST_TIME_FORMAT " new buf %" GST_TIME_FORMAT - " outgoing ts %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (prevtime), + "prev buf %" GST_TIME_FORMAT " new buf %" GST_TIME_FORMAT + " outgoing ts %" GST_TIME_FORMAT, GST_TIME_ARGS (prevtime), GST_TIME_ARGS (intime), GST_TIME_ARGS (videorate->next_ts)); videorate->in++; /* got 2 buffers, see which one is the best */ do { - diff1 = ABS (prevtime - videorate->next_ts); - diff2 = ABS (intime - videorate->next_ts); + diff1 = prevtime - videorate->next_ts; + diff2 = intime - videorate->next_ts; /* take absolute values, beware: abs and ABS don't work for gint64 */ if (diff1 < 0) @@ -358,8 +363,8 @@ diff2 = -diff2; GST_LOG_OBJECT (videorate, - "videorate: diff with prev %" GST_TIME_FORMAT " diff with new %" - GST_TIME_FORMAT " outgoing ts %" GST_TIME_FORMAT "\n", + "diff with prev %" GST_TIME_FORMAT " diff with new %" + GST_TIME_FORMAT " outgoing ts %" GST_TIME_FORMAT, GST_TIME_ARGS (diff1), GST_TIME_ARGS (diff2), GST_TIME_ARGS (videorate->next_ts)); @@ -379,7 +384,7 @@ gst_pad_push (videorate->srcpad, GST_DATA (outbuf)); GST_LOG_OBJECT (videorate, - "videorate: old is best, dup, outgoing ts %" GST_TIME_FORMAT " \n", + "old is best, dup, outgoing ts %" GST_TIME_FORMAT, GST_TIME_ARGS (videorate->next_ts)); } /* continue while the first one was the best */ @@ -398,13 +403,13 @@ if (!videorate->silent) g_object_notify (G_OBJECT (videorate), "drop"); - "videorate: new is best, old never used, drop, outgoing ts %" - GST_TIME_FORMAT " \n", GST_TIME_ARGS (videorate->next_ts)); + "new is best, old never used, drop, outgoing ts %" + GST_TIME_FORMAT, GST_TIME_ARGS (videorate->next_ts)); } - "videorate: left loop, putting new in old, diff1 %" GST_TIME_FORMAT + "left loop, putting new in old, diff1 %" GST_TIME_FORMAT ", diff2 %" GST_TIME_FORMAT - ", in %lld, out %lld, drop %lld, dup %lld\n", GST_TIME_ARGS (diff1), + ", in %lld, out %lld, drop %lld, dup %lld", GST_TIME_ARGS (diff1), GST_TIME_ARGS (diff2), videorate->in, videorate->out, videorate->drop, videorate->dup); @@ -485,6 +490,9 @@ static gboolean plugin_init (GstPlugin * plugin) { + GST_DEBUG_CATEGORY_INIT (videorate_debug, "videorate", 0, + "Videorate stream fixer"); return gst_element_register (plugin, "videorate", GST_RANK_NONE, GST_TYPE_VIDEORATE); } |