From e89f87b6b40bd7beb39a943c491eefce2ddd8e15 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Sun, 7 Jan 2001 15:20:49 +0000 Subject: [PATCH] gstreamer-register will now never cause the Original commit message from CVS: gstreamer-register will now never cause the ** WARNING **: gstplugin: registry needs rebuild warning to appear - sets a hidden global in gstplugin.c to turn the warning off. Fix a warning in gst/cothreads.c (function was declared extern, defined static) --- gst/cothreads.c | 2 +- gst/gstplugin.c | 7 ++++++- tools/gstreamer-register.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gst/cothreads.c b/gst/cothreads.c index 716358dbe2..82ae6205ba 100644 --- a/gst/cothreads.c +++ b/gst/cothreads.c @@ -159,7 +159,7 @@ cothread_setfunc (cothread_state *thread, * * Returns: the #cothread_state of the main (0th) thread */ -static cothread_state* +cothread_state* cothread_main(cothread_context *ctx) { GST_DEBUG (0,"returning %p, the 0th cothread\n",ctx->threads[0]); diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 7fe609e372..b445cd06f5 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -47,6 +47,10 @@ gint _gst_libraries_seqno; /* whether or not to spew library load issues */ gboolean _gst_plugin_spew = FALSE; +/* whether or not to warn if registry needs rebuild (gstreamer-register sets + * this to false.) */ +gboolean _gst_warn_old_registry = TRUE; + static gboolean plugin_times_older_than(time_t regtime); static time_t get_time(const char * path); @@ -85,7 +89,8 @@ _gst_plugin_initialize (void) if (!doc || strcmp (doc->root->name, "GST-PluginRegistry") || !plugin_times_older_than(get_time(GST_CONFIG_DIR"/reg.xml"))) { - g_warning ("gstplugin: registry needs rebuild\n"); + if (_gst_warn_old_registry) + g_warning ("gstplugin: registry needs rebuild\n"); gst_plugin_load_all (); return; } diff --git a/tools/gstreamer-register.c b/tools/gstreamer-register.c index 2000ffaaab..9487b930d2 100644 --- a/tools/gstreamer-register.c +++ b/tools/gstreamer-register.c @@ -38,6 +38,7 @@ #define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.reg.xml.tmp" extern gboolean _gst_plugin_spew; +extern gboolean _gst_warn_old_registry; static void error_perm() { g_print("\n(%s)\n" @@ -103,6 +104,7 @@ int main(int argc,char *argv[]) // Init gst _gst_plugin_spew = TRUE; + _gst_warn_old_registry = FALSE; gst_init(&argc,&argv); // Check args