This fixes the video4linux/video4linux2 debug output, which had one \n too much
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Tue, 17 Sep 2002 17:45:19 +0000 (17:45 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Tue, 17 Sep 2002 17:45:19 +0000 (17:45 +0000)
Original commit message from CVS:
This fixes the video4linux/video4linux2 debug output, which had one \n too much

sys/v4l/v4l-overlay_calls.c
sys/v4l/v4l_calls.c
sys/v4l/v4lmjpegsink_calls.c
sys/v4l/v4lmjpegsrc_calls.c
sys/v4l/v4lsrc_calls.c

index 847aa50..8fdbb36 100644 (file)
@@ -17,8 +17,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-/*#define DEBUG */
-
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
 #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);
 
index 43431dd..aba0e15 100644 (file)
@@ -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 };
index 280f8fd..76e939c 100644 (file)
@@ -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)
 
 
 /******************************************************
index ffe4b75..460f42b 100644 (file)
@@ -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" };
index ca6c131..960fc77 100644 (file)
@@ -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[] = {