GNOME Bugzilla – Bug 608841
[DEPRECATE] unused custom path api in registry
Last modified: 2012-08-13 23:42:14 UTC
These two function & two macros are quite useless: gst_registry_add_path gst_registry_get_path_list gst_default_registry_add_path gst_default_registry_get_path_list All one can do is adding the path and reading it back. The "paths" GList in GstRegistry is not used by anything else. That means added path entries are not used when reading the registry and They won't be used as one cannot set them before the registry is read. That list would need to be a static list (like _priv_gst_plugin_paths in gst.c). The attached patch markes the api as deprecated and adds FIXME-0.11 comments.
Created attachment 152888 [details] [review] deprecate useless path api
> All one can do is adding the path and reading it back. The "paths" GList in > GstRegistry is not used by anything else. That means added path entries are not > used when reading the registry and They won't be used as one cannot set them > before the registry is read. I'm not entirely sure this follows: - there's gst_registry_update(), so in principle it should be possible to do _add_path(); _update(), no? - not that I mind deprecating these functions, but I don't really see why one should just declare them as useless because they're not used. Why not just make scan_and_update_registry() use them?
Thats why I am posting the patch here (despite core is frozen). Anyway as I said gst_registry_update() is not taking those path into account. Also I think its a bit pointless to add the path and rescan. If we want to support custom path, we need api that can be called before gst_init(). Right now one would need to fake goptions for it (--gst-plugin-path).
Maybe we should first define what the api is supposed to do. I found the issue that it is useless right now, as I was expecting gst_registry_get_path_list() to return the list of path that has been checked. And the reason I was wanting to call that is the eternal problem, that people build stuff from the sources and thus install plugins to /usr/local by default. If my app is in /usr/local I wanted to check if gstreamer knows about that path and otherwise warn the user. Options: a) deprecate the api see patch b) use a static list - allow the app to add path entries before calling gst-init - same as if one uses --gst-plugin-path when starting the app c) use static list + add used dirs - add the directories that are used to the list (e.g. those from the envvars).
Reopening as I don't see any open non-developer question.
ping.
"Fixed": commit f42fb841f828780c7529d27128d028c7e7d98c97 Author: Tim-Philipp Müller <tim@centricular.net> Date: Tue Aug 14 00:39:18 2012 +0100 registry: remove some unused and in their current form pointless API Not so useful: just adds/reads stuff from an internal GList without actually doing anything with those paths, so remove for now: gst_registry_add_path gst_registry_get_path_list https://bugzilla.gnome.org/show_bug.cgi?id=608841