After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608841 - [DEPRECATE] unused custom path api in registry
[DEPRECATE] unused custom path api in registry
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal normal
: NONE
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-02 22:32 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2012-08-13 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
deprecate useless path api (5.44 KB, patch)
2010-02-02 22:35 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-02 22:32:53 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.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-02 22:35:37 UTC
Created attachment 152888 [details] [review]
deprecate useless path api
Comment 2 Tim-Philipp Müller 2010-02-03 00:09:15 UTC
> 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?
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-03 09:43:57 UTC
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).
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2010-02-15 21:32:56 UTC
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).
Comment 5 Tobias Mueller 2010-10-14 18:19:33 UTC
Reopening as I don't see any open non-developer question.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-07 12:28:05 UTC
ping.
Comment 7 Tim-Philipp Müller 2012-08-13 23:42:14 UTC
"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