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 788152 - plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-25 18:43 UTC by Mathieu Duponchelle
Modified: 2017-09-26 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE (8.97 KB, patch)
2017-09-25 18:43 UTC, Mathieu Duponchelle
none Details | Review
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE (9.05 KB, patch)
2017-09-25 20:11 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2017-09-25 18:43:24 UTC
When a plugin declares a dependency using this flag, all the
relative paths are considered to be relative to the path of
the main executable.

We try to determine the path of the executable portably,
with implementations provided for Linux, Windows and Mac.

If retrieval of the path fails, we will not detect changes.

In order for the main executable path to be the same when
scanning a plugin in a child process, a new variable is
exposed in gst_private.h, _gst_executable_path
Comment 1 Mathieu Duponchelle 2017-09-25 18:43:28 UTC
Created attachment 360377 [details] [review]
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
Comment 2 Sebastian Dröge (slomo) 2017-09-25 19:28:45 UTC
Review of attachment 360377 [details] [review]:

Generally looks good to me, just some cosmetics.

::: gst/gst.c
@@ +363,3 @@
+find_executable_path (void)
+{
+}

Might want to do a GST_FIXME() here.

::: gst/gstplugin.c
@@ +1726,3 @@
+      if (paths_are_relative_to_exe && !g_path_is_absolute (path)) {
+        if (!_gst_executable_path) {
+          GST_LOG_OBJECT (plugin,

GST_FIXME
Comment 3 Nicolas Dufresne (ndufresne) 2017-09-25 20:06:56 UTC
Is it a contest to make the longest symbol in Gst ? Maybe GST_PLUGIN_DEPENDENCY_FLAG_EXE_RELATIVE_PATHS ?
Comment 4 Mathieu Duponchelle 2017-09-25 20:11:14 UTC
Created attachment 360384 [details] [review]
plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE

When a plugin declares a dependency using this flag, all the
relative paths are considered to be relative to the path of
the main executable.

We try to determine the path of the executable portably,
with implementations provided for Linux, Windows and Mac.

If retrieval of the path fails, we will not detect changes.

In order for the main executable path to be the same when
scanning a plugin in a child process, a new variable is
exposed in gst_private.h, _gst_executable_path
Comment 5 Tim-Philipp Müller 2017-09-25 20:13:00 UTC
I'm sure this doesn't even come close to the longest we have ;)
Comment 6 Sebastian Dröge (slomo) 2017-09-25 20:30:38 UTC
It's not even a symbol in any of our libraries. I think the longest ones are still in the MXF plugin.

In any case, I'm fine with whatever name as long as it's descriptive.
Comment 7 Mathieu Duponchelle 2017-09-26 11:11:21 UTC
(In reply to Nicolas Dufresne (stormer) from comment #3)
> Is it a contest to make the longest symbol in Gst ? Maybe
> GST_PLUGIN_DEPENDENCY_FLAG_EXE_RELATIVE_PATHS ?

I would have done something like that were it not for consistency, ended up using this scheme as we also have GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY :)
Comment 8 Mathieu Duponchelle 2017-09-26 11:12:30 UTC
Attachment 360384 [details] pushed as 6cddce7 - plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
Comment 9 Nicolas Dufresne (ndufresne) 2017-09-26 13:30:36 UTC
(In reply to Mathieu Duponchelle from comment #7)
> (In reply to Nicolas Dufresne (stormer) from comment #3)
> > Is it a contest to make the longest symbol in Gst ? Maybe
> > GST_PLUGIN_DEPENDENCY_FLAG_EXE_RELATIVE_PATHS ?

Make sense, thanks.