Convert GST_DEBUG_CAPS() to GST_DEBUG():
authorDavid Schleef <ds@schleef.org>
Wed, 4 Feb 2004 19:45:32 +0000 (19:45 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 4 Feb 2004 19:45:32 +0000 (19:45 +0000)
Original commit message from CVS:
Convert GST_DEBUG_CAPS() to GST_DEBUG():
* gst/mpeg1videoparse/gstmp1videoparse.c:
(mp1videoparse_parse_seq):
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):
* gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps):
* sys/xvideo/gstxwindow.c: (_gst_xwindow_new):
* sys/xvideo/xvideosink.c: (gst_xvideosink_sinkconnect),
(gst_xvideosink_getcaps):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support):
* testsuite/gst-lint: more tests

ChangeLog
gst/videoscale/gstvideoscale.c
sys/xvimage/xvimagesink.c
tests/old/testsuite/gst-lint
testsuite/gst-lint

index b351c28..87e3159 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2004-02-04  David Schleef  <ds@schleef.org>
 
+       Convert GST_DEBUG_CAPS() to GST_DEBUG():
+       * gst/mpeg1videoparse/gstmp1videoparse.c:
+       (mp1videoparse_parse_seq):
+       * gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream):
+       * gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps):
+       * sys/xvideo/gstxwindow.c: (_gst_xwindow_new):
+       * sys/xvideo/xvideosink.c: (gst_xvideosink_sinkconnect),
+       (gst_xvideosink_getcaps):
+       * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support):
+       * testsuite/gst-lint: more tests
+
+2004-02-04  David Schleef  <ds@schleef.org>
+
        Replace use of GST_PAD_FORMATS_FUNCTION() and similar macros
        with the code that they would expand to.
        * ext/flac/gstflacdec.c: (gst_flacdec_get_src_formats),
index ca55656..88df0c8 100644 (file)
@@ -176,7 +176,7 @@ gst_videoscale_getcaps (GstPad *pad)
     videoscale->srcpad;
   othercaps = gst_pad_get_allowed_caps (otherpad);
 
-  GST_DEBUG_CAPS("othercaps are", othercaps);
+  GST_DEBUG ("othercaps are: " GST_PTR_FORMAT, othercaps);
 
   caps = gst_caps_copy (othercaps);
   for(i=0;i<gst_caps_get_size(caps);i++) {
@@ -188,7 +188,7 @@ gst_videoscale_getcaps (GstPad *pad)
        NULL);
   }
 
-  GST_DEBUG_CAPS ("returning caps", caps);
+  GST_DEBUG ("returning caps: " GST_PTR_FORMAT, caps);
 
   return caps;
 }
index 1c5e5b5..3fe5cd4 100644 (file)
@@ -721,7 +721,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
       if (formats)
         XFree (formats);
       
-      GST_DEBUG_CAPS ("Generated the following caps", caps);
+      GST_DEBUG ("Generated the following caps: " GST_PTR_FORMAT, caps);
 
       return caps;
     }
index ce08751..16ac951 100755 (executable)
@@ -44,6 +44,7 @@ sub check_gnuc_const();
 sub check_caps();
 sub check_lib_deprecated();
 sub check_typo();
+sub check_explicit_caps();
 
 sub m_check_plugindir();
 sub m_check_interfaces();
@@ -69,6 +70,8 @@ foreach $filename (<FIND>) {
        check_caps();
        check_lib_deprecated();
        check_typo();
+       check_glibisms();
+       check_explicit_caps();
 
        # less important stuff
 
@@ -81,7 +84,6 @@ if (0) {
        check_buffer_alloc();
        check_c99_comments();
        check_carriage_returns();
-       check_glibisms();
        #check_indentation();
        check_varargs_functions();
        check_debugging();
@@ -226,6 +228,9 @@ sub check_glibisms()
        if (grep { /\brealloc\s*\(/; } @lines) {
                print "E: use g_realloc() instead of realloc()\n"
        }
+       if (grep { /^#include\s+<ctype.h>/; } @lines) {
+               print "E: ctype.h functions are not locale-independent and don't work in UTF-8 locales.  Use g_ascii_is*()\n"
+       }
 }
 
 #
@@ -482,3 +487,24 @@ sub check_typo()
        }
 }
 
+#
+# set_explicit_caps() should preceed pad_add()
+#
+sub check_explicit_caps()
+{
+       my $n = 0;
+       my $lineno = 1;
+
+       foreach $line (@lines){
+               if($line =~ /gst_element_add_pad/){
+                       $n=10;
+               }
+               if($n>0 && $line =~ /gst_pad_set_explicit_caps/){
+                       print "W: ($lineno) explicit caps should be set before adding pad\n";
+                       return;
+               }
+               $n--;
+               $lineno++;
+       }
+}
+
index ce08751..16ac951 100755 (executable)
@@ -44,6 +44,7 @@ sub check_gnuc_const();
 sub check_caps();
 sub check_lib_deprecated();
 sub check_typo();
+sub check_explicit_caps();
 
 sub m_check_plugindir();
 sub m_check_interfaces();
@@ -69,6 +70,8 @@ foreach $filename (<FIND>) {
        check_caps();
        check_lib_deprecated();
        check_typo();
+       check_glibisms();
+       check_explicit_caps();
 
        # less important stuff
 
@@ -81,7 +84,6 @@ if (0) {
        check_buffer_alloc();
        check_c99_comments();
        check_carriage_returns();
-       check_glibisms();
        #check_indentation();
        check_varargs_functions();
        check_debugging();
@@ -226,6 +228,9 @@ sub check_glibisms()
        if (grep { /\brealloc\s*\(/; } @lines) {
                print "E: use g_realloc() instead of realloc()\n"
        }
+       if (grep { /^#include\s+<ctype.h>/; } @lines) {
+               print "E: ctype.h functions are not locale-independent and don't work in UTF-8 locales.  Use g_ascii_is*()\n"
+       }
 }
 
 #
@@ -482,3 +487,24 @@ sub check_typo()
        }
 }
 
+#
+# set_explicit_caps() should preceed pad_add()
+#
+sub check_explicit_caps()
+{
+       my $n = 0;
+       my $lineno = 1;
+
+       foreach $line (@lines){
+               if($line =~ /gst_element_add_pad/){
+                       $n=10;
+               }
+               if($n>0 && $line =~ /gst_pad_set_explicit_caps/){
+                       print "W: ($lineno) explicit caps should be set before adding pad\n";
+                       return;
+               }
+               $n--;
+               $lineno++;
+       }
+}
+