[gst-devel] Re: [gst-cvs] thomasvs gstreamer: gstreamer/gst/ gstreamer/gst/registries/

Andy Wingo wingo at pobox.com
Sun Aug 11 20:47:02 CEST 2002


Hi Thomas,

On Sun, 11 Aug 2002, Thomas Vander Stichele wrote:

> CVS Root:       /cvsroot/gstreamer
> Module:         gstreamer
> Changes by:     thomasvs
> Date:           Sun Aug 11 2002  14:50:49 PDT
> 
> Log message:
> small cleanups
> clarifications
> don't try reloading xml reg when it isn't writable
> 
> Modified files:
>     gst             : gst.c
>     gst/registries  : gstxmlregistry.c
> 
> Links:
> http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.75&r2=1.76
> http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/registries/gstxmlregistry.c.diff?r1=1.15&r2=1.16
> 
> ====Begin Diffs====
> Index: gst.c
[...]
> @@ -297,6 +298,22 @@
>    user_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
>    _user_registry = gst_xml_registry_new ("user_registry", user_reg);
>  
> +#ifndef GST_DISABLE_REGISTRY
> +  /* this test is a hack; gst-register sets this to false
> +   * so this is a test for the current instance being gst-register */
> +  if (_gst_registry_auto_load == TRUE)
> +  {
> +    /* do a sanity check here; either one of the two registries should exist */
> +    if (!g_file_test (user_reg, G_FILE_TEST_IS_REGULAR))
> +      if (!g_file_test (GLOBAL_REGISTRY_FILE, G_FILE_TEST_IS_REGULAR))
> +      {
> +        g_print ("Couldn't find user registry %s or global registry %s\n",
> +	         user_reg, GLOBAL_REGISTRY_FILE);
> +        g_error ("Please run gst-register either as root or user");
> +      }
> +  }
> +#endif
> +	  

Would you mind, the next time you go into this code, documenting your
changes a little more fully? I'm just wondering because I mucked about
in here a lot a while back, and thought I had got out all the bugs. A
report of the problem would be nice.

It would be nice, I mean, because one of the points of the registry
changes that Wim did a couple months ago was to remove the global
variable from the startup code. The need for your reintroduction of this
hack should be documented.

Thanks, yo. Just so I'm not only complaining, I do think you're doing a
nice polish job :) -- these are longstanding issues that need to be
corrected. It would be better, in this case, to propose a formal API
solution to this problem, so we can return code to Wim in the clean
state that we received it ;)

cheers,

wingo.




More information about the gstreamer-devel mailing list