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),
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++) {
NULL);
}
- GST_DEBUG_CAPS ("returning caps", caps);
+ GST_DEBUG ("returning caps: " GST_PTR_FORMAT, caps);
return caps;
}
if (formats)
XFree (formats);
- GST_DEBUG_CAPS ("Generated the following caps", caps);
+ GST_DEBUG ("Generated the following caps: " GST_PTR_FORMAT, caps);
return caps;
}
sub check_caps();
sub check_lib_deprecated();
sub check_typo();
+sub check_explicit_caps();
sub m_check_plugindir();
sub m_check_interfaces();
check_caps();
check_lib_deprecated();
check_typo();
+ check_glibisms();
+ check_explicit_caps();
# less important stuff
check_buffer_alloc();
check_c99_comments();
check_carriage_returns();
- check_glibisms();
#check_indentation();
check_varargs_functions();
check_debugging();
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"
+ }
}
#
}
}
+#
+# 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++;
+ }
+}
+
sub check_caps();
sub check_lib_deprecated();
sub check_typo();
+sub check_explicit_caps();
sub m_check_plugindir();
sub m_check_interfaces();
check_caps();
check_lib_deprecated();
check_typo();
+ check_glibisms();
+ check_explicit_caps();
# less important stuff
check_buffer_alloc();
check_c99_comments();
check_carriage_returns();
- check_glibisms();
#check_indentation();
check_varargs_functions();
check_debugging();
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"
+ }
}
#
}
}
+#
+# 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++;
+ }
+}
+