GNOME Bugzilla – Bug 348918
application should decide whether or not to use fork() to read registry cache
Last modified: 2006-08-11 10:21:05 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.
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.
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.