sub check_varargs_functions();
sub check_debugging();
sub check_old_typefind();
+sub check_bad_casts();
+sub check_old_plugin();
sub m_check_plugindir();
check_config_h();
check_varargs_functions();
check_debugging();
- check_bad_includes();
check_old_typefind();
+ check_bad_casts();
+ check_old_plugin();
}
open FIND, "find . -name \"Makefile.am\" -print|";
if (grep { /GstEventFlags/; } @lines) {
print "W: who uses GstEventFlags\n";
}
+ if (grep { /gst_type_class_ref/; } @lines) {
+ print "W: gst_type_class_ref should be changed to gst_type_class_peek_parent\n";
+ }
}
}
}
+#
+# check for casts that we've deemed incorrect (fix the prototype)
+#
+sub check_bad_casts()
+{
+ if (grep { /GBaseInitFunc/ || /GBaseFinalizeFunc/ ||
+ /GClassInitFunc/ || /GClassFinalizeFunc/ ||
+ /GInstanceInitFunc/ || /GInterfaceInitFunc/ ||
+ /GInterfaceFinalizeFunc/ } @lines) {
+ print "W: bad casts (fix prototype)\n"
+ }
+}
+
+#
+# check for old plugin code
+#
+sub check_old_plugin()
+{
+ if (grep { /plugin_init.*GModule.*GstPlugin/ } @lines) {
+ print "E: old plugin interface detected\n"
+ }
+ if (grep { /GstPluginDesc.*plugin_desc/ } @lines) {
+ print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n"
+ }
+}
+
sub check_varargs_functions();
sub check_debugging();
sub check_old_typefind();
+sub check_bad_casts();
+sub check_old_plugin();
sub m_check_plugindir();
check_config_h();
check_varargs_functions();
check_debugging();
- check_bad_includes();
check_old_typefind();
+ check_bad_casts();
+ check_old_plugin();
}
open FIND, "find . -name \"Makefile.am\" -print|";
if (grep { /GstEventFlags/; } @lines) {
print "W: who uses GstEventFlags\n";
}
+ if (grep { /gst_type_class_ref/; } @lines) {
+ print "W: gst_type_class_ref should be changed to gst_type_class_peek_parent\n";
+ }
}
}
}
+#
+# check for casts that we've deemed incorrect (fix the prototype)
+#
+sub check_bad_casts()
+{
+ if (grep { /GBaseInitFunc/ || /GBaseFinalizeFunc/ ||
+ /GClassInitFunc/ || /GClassFinalizeFunc/ ||
+ /GInstanceInitFunc/ || /GInterfaceInitFunc/ ||
+ /GInterfaceFinalizeFunc/ } @lines) {
+ print "W: bad casts (fix prototype)\n"
+ }
+}
+
+#
+# check for old plugin code
+#
+sub check_old_plugin()
+{
+ if (grep { /plugin_init.*GModule.*GstPlugin/ } @lines) {
+ print "E: old plugin interface detected\n"
+ }
+ if (grep { /GstPluginDesc.*plugin_desc/ } @lines) {
+ print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n"
+ }
+}
+