From 45f6a1c5f08827592a51f2832fd515c890c220d9 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 17 Sep 2002 17:45:19 +0000 Subject: [PATCH] This fixes the video4linux/video4linux2 debug output, which had one \n too much Original commit message from CVS: This fixes the video4linux/video4linux2 debug output, which had one \n too much --- sys/v4l/v4l-overlay_calls.c | 28 +++++++++------------------- sys/v4l/v4l_calls.c | 2 +- sys/v4l/v4lmjpegsink_calls.c | 2 +- sys/v4l/v4lmjpegsrc_calls.c | 2 +- sys/v4l/v4lsrc_calls.c | 2 +- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/sys/v4l/v4l-overlay_calls.c b/sys/v4l/v4l-overlay_calls.c index 847aa50b8..8fdbb36dd 100644 --- a/sys/v4l/v4l-overlay_calls.c +++ b/sys/v4l/v4l-overlay_calls.c @@ -17,8 +17,6 @@ * Boston, MA 02111-1307, USA. */ -/*#define DEBUG */ - #include #include #include @@ -29,6 +27,11 @@ #include #include "v4l_calls.h" +#define DEBUG(format, args...) \ + GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ + GST_ELEMENT(v4lelement), \ + "V4L-overlay: " format, ##args) + /****************************************************** * gst_v4l_set_overlay(): @@ -42,10 +45,7 @@ gst_v4l_set_overlay (GstV4lElement *v4lelement, { gchar *buff; -#ifdef DEBUG - fprintf(stderr, "V4L: gst_v4l_set_overlay(), display = \'%s\'\n", display); -#endif - + DEBUG("setting display to '%s'", display); GST_V4L_CHECK_NOT_OPEN(v4lelement); /* start v4l-conf */ @@ -104,11 +104,8 @@ gst_v4l_set_window (GstV4lElement *v4lelement, gint x, gint y, gint w, gint h) { -#ifdef DEBUG - fprintf(stderr, "V4L: gst_v4l_set_window(), position (x,y/wxh) = %d,%d/%dx%d\n", + DEBUG("setting video window to position (x,y/wxh) = %d,%d/%dx%d", x, y, w, h); -#endif - GST_V4L_CHECK_OVERLAY(v4lelement); v4lelement->vwin.clipcount = 0; @@ -133,10 +130,7 @@ gst_v4l_set_clips (GstV4lElement *v4lelement, struct video_clip *clips, gint num_clips) { -#ifdef DEBUG - fprintf(stderr, "V4L: gst_v4l_set_clips()\n"); -#endif - + DEBUG("setting video window clips"); GST_V4L_CHECK_OPEN(v4lelement); GST_V4L_CHECK_OVERLAY(v4lelement); @@ -167,11 +161,7 @@ gst_v4l_enable_overlay (GstV4lElement *v4lelement, { gint doit = enable?1:0; -#ifdef DEBUG - fprintf(stderr, "V4L: gst_v4l_enable_overlay(), enable = %s\n", - enable?"true":"false"); -#endif - + DEBUG("%s overlay", enable?"enabling":"disabling"); GST_V4L_CHECK_OPEN(v4lelement); GST_V4L_CHECK_OVERLAY(v4lelement); diff --git a/sys/v4l/v4l_calls.c b/sys/v4l/v4l_calls.c index 43431ddfb..aba0e152a 100644 --- a/sys/v4l/v4l_calls.c +++ b/sys/v4l/v4l_calls.c @@ -29,7 +29,7 @@ #define DEBUG(format, args...) \ GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_ELEMENT(v4lelement), \ - "V4L: " format "\n", ##args) + "V4L: " format, ##args) char *picture_name[] = { "Hue", "Brightness", "Contrast", "Saturation", NULL }; diff --git a/sys/v4l/v4lmjpegsink_calls.c b/sys/v4l/v4lmjpegsink_calls.c index 280f8fdc2..76e939c24 100644 --- a/sys/v4l/v4lmjpegsink_calls.c +++ b/sys/v4l/v4lmjpegsink_calls.c @@ -35,7 +35,7 @@ #define DEBUG(format, args...) \ GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_ELEMENT(v4lmjpegsink), \ - "V4LMJPEGSINK: " format "\n", ##args) + "V4LMJPEGSINK: " format, ##args) /****************************************************** diff --git a/sys/v4l/v4lmjpegsrc_calls.c b/sys/v4l/v4lmjpegsrc_calls.c index ffe4b757b..460f42b40 100644 --- a/sys/v4l/v4lmjpegsrc_calls.c +++ b/sys/v4l/v4lmjpegsrc_calls.c @@ -34,7 +34,7 @@ #define DEBUG(format, args...) \ GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_ELEMENT(v4lmjpegsrc), \ - "V4LMJPEGSRC: " format "\n", ##args) + "V4LMJPEGSRC: " format, ##args) char *input_name[] = { "Composite", "S-Video", "TV-Tuner", "Autodetect" }; diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index ca6c1316a..960fc77ce 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -39,7 +39,7 @@ #define DEBUG(format, args...) \ GST_DEBUG_ELEMENT(GST_CAT_PLUGIN_INFO, \ GST_ELEMENT(v4lsrc), \ - "V4LSRC: " format "\n", ##args) + "V4LSRC: " format, ##args) /* palette names */ char *palette_name[] = { -- 2.34.1