mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
gst: API: gst_get_main_executable_path()
This is useful for plugins that need to inspect the folder of the main executable in order to determine the set of features they will expose, for example: https://github.com/centricular/gstreamer-vst3 https://bugzilla.gnome.org/show_bug.cgi?id=788214
This commit is contained in:
parent
49e230ad1a
commit
895bb7bcd6
4 changed files with 26 additions and 0 deletions
|
@ -31,6 +31,7 @@ gst_segtrap_set_enabled
|
|||
gst_registry_fork_is_enabled
|
||||
gst_registry_fork_set_enabled
|
||||
gst_update_registry
|
||||
gst_get_main_executable_path
|
||||
<SUBSECTION Private>
|
||||
GST_QUARK
|
||||
GstQuarkId
|
||||
|
|
21
gst/gst.c
21
gst/gst.c
|
@ -368,6 +368,27 @@ find_executable_path (void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gst_get_main_executable_path:
|
||||
*
|
||||
* This helper is mostly helpful for plugins that need to
|
||||
* inspect the folder of the main executable to determine
|
||||
* their set of features.
|
||||
*
|
||||
* When a plugin is initialized from the gst-plugin-scanner
|
||||
* external process, the returned path will be the same as from the
|
||||
* parent process.
|
||||
*
|
||||
* Returns: (transfer none): The path of the executable that
|
||||
* initialized GStreamer, or %NULL if it could not be determined.
|
||||
*
|
||||
* Since: 1.14
|
||||
*/
|
||||
const gchar *
|
||||
gst_get_main_executable_path (void)
|
||||
{
|
||||
return _gst_executable_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_init_check:
|
||||
|
|
|
@ -132,6 +132,9 @@ void gst_registry_fork_set_enabled (gboolean enabled);
|
|||
GST_EXPORT
|
||||
gboolean gst_update_registry (void);
|
||||
|
||||
GST_EXPORT
|
||||
const gchar * gst_get_main_executable_path (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_H__ */
|
||||
|
|
|
@ -691,6 +691,7 @@ EXPORTS
|
|||
gst_int_range_get_type
|
||||
gst_is_caps_features
|
||||
gst_is_initialized
|
||||
gst_get_main_executable_path
|
||||
gst_iterator_copy
|
||||
gst_iterator_filter
|
||||
gst_iterator_find_custom
|
||||
|
|
Loading…
Reference in a new issue