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 348918 - application should decide whether or not to use fork() to read registry cache
application should decide whether or not to use fork() to read registry cache
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.9
Other All
: Normal enhancement
: 0.10.10
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-27 11:38 UTC by martti.mela
Modified: 2006-08-11 10:21 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description martti.mela 2006-07-27 11:38:25 UTC
Current versions of gst don't let application to initialize gst without fork() if gst is compiled with HAVE_FORK enabled. This causes a serious problem if gst is initialized in a dynamic extension (i.e. plugin), not in the main() function. Current behaviour of gst_init() (when HAVE_FORK enabled) copies the whole process and causes gst_init() to fail when called in a plugin (or extension), not in the main() of the application.

Calling application should be able to initialize gst also without fork(). In some cases it's not possible to do gst_init() in the main(); this wouls cause the main application to be dependent of gst.
Comment 1 Tim-Philipp Müller 2006-07-27 11:46:54 UTC
Since 0.10.9 you can set the environment variable GST_REGISTRY_FORK=no to avoid this, but maybe there should also be API for that.
Comment 2 Wim Taymans 2006-08-11 10:21:05 UTC
Added API and command line option.

        * docs/gst/gstreamer-sections.txt:
        * gst/gst.c: (gst_init_get_option_group), (gst_init_check),
        (ensure_current_registry_forking), (ensure_current_registry),
        (parse_one_option), (parse_goption_arg), (gst_deinit),
        (gst_registry_fork_is_enabled), (gst_registry_fork_set_enabled):
        * gst/gst.h:
        Doc updates.
        Added API and command line option to disable registry forking in
        addition to the environment variable.
        Constify some static arrays.
        Added some more debug.
        Don't deinit twice.
        API: gst_registry_fork_is_enabled()
        API: gst_registry_fork_set_enabled()
        API: --gst-disable-registry-fork command line option
        Fixes #348918.