mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
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)
This commit is contained in:
parent
ee7ae65e60
commit
e89f87b6b4
3 changed files with 9 additions and 2 deletions
|
@ -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]);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue