According to [1] EINTR is a possible errno for fsync(),
so handle it as all other EINTR (do/while(errno == EINTR)).
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
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
https://bugzilla.gnome.org/show_bug.cgi?id=788152
Use g_object_new() instead which nowadays has a shortcut for the
no-properties check. It still does an extra GType check in the
function guard, but there's a pending patch to remove that
and it's hardly going to be a performance issue in practice,
even less so on a system that's compiled without run-time checks.
Alternative would be to move to the new g_object_new_properties()
with a fallback define for older glib versions, but it makes the
code look more unwieldy and doesn't seem worth it.
Fixes deprecation warnings when building against newer GLib versions.
https://bugzilla.gnome.org/show_bug.cgi?id=780903
Use the technique that is now done in GTK+ so that the plugins do not have
to be installed in c:\gstreamer\lib\<debug>\gstreamer-$(GSTApiVersion),
but can be installed in
<parent_folder_of_gstreamer_main_dll>\lib\<debug>\gstreamer-$(GSTApiVersion),
or as per g_win32_get_package_installation_directory_of_module() allows.
https://bugzilla.gnome.org/show_bug.cgi?id=679115
Improve parallel installability in setups like jhbuild by
providing versioned variants of some environment variables:
GST_REGISTRY_1_0
GST_PLUGIN_PATH_1_0
GST_PLUGIN_SYSTEM_PATH_1_0
GST_PLUGIN_SCANNER_1_0
will now be checked before checking the unversioned ones.
https://bugzilla.gnome.org/show_bug.cgi?id=679407
Based on patch by: Daniel Macks <dmacks@netspace.org>
Earlier versions of OSX don't support proper multiarch and
trying to use /usr/bin/arch -foo with those versions would
just break things.
https://bugzilla.gnome.org/show_bug.cgi?id=615357
On OSX, GStreamer might be built as a 'fat/universal' binary containing
both 32-bit and 64-bit code. We must take care that gst-plugin-scanner
is executed with the same architecture as the GStreamer core, otherwise
bad things may happen and core/scanner will not be able to communicate
properly.
Should fix issues with (32-bit) firefox using a 32-bit GStreamer core
which then spawns a 'universal' gst-plugin-scanner binary which gets
run in 64-bit mode, causing 100% cpu usage / busy loops or just hanging
firefox until killed.
https://bugzilla.gnome.org/show_bug.cgi?id=615357
The description string was changed to an inlined string a while back.
(But: no need to intern the const strings here, we just use the interning
to avoid allocating duplicates and make memory management easier,
since the strings will be around for the life-time of the app anyway).
https://bugzilla.gnome.org/show_bug.cgi?id=640071
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.
Also adds -Wwrite-strings as a warning flag in configure.ac.
https://bugzilla.gnome.org/show_bug.cgi?id=611692
If the GST_PLUGIN_SCANNER environment variable is set, we should try
the scanner specified there first, to make sure the right scanner binary
is used for uninstalled setups and builds from source when there's
already an installed version.
For the reason outlined at the beginning of gst_private.h (inline
functions in glib may need the g_log_domain variable). Also include
gst_private.h before using any G_OS_* defines, esp. in plugin loader.
and install into a different directory $(libexecdir/gstreamer-0.10) so that
everything is versioned properly.
NOTE: run 'make clean' after updating; if you are running an uninstalled setup,
you will need to update your gst-uninstalled script (unless it's symlinked
to gstreamer core master) and exit/enter your uninstalled environment to get
the updated environment. If you are running an installed setup, you should
run 'make uninstall' before merging this change or remove the old
plugin-scanner binary manually.
Fixes#601698.
The logic to handle short reads/writes was incorrect, causing the
packet handler to attempt to handle incomplete packets.
Grow the packet transmit buffer in proportion to observed usage,
causing fewer reallocs.
Add some more debug in the registry chunks code.
When invalid registry chunks are received from the child, and parsing
fails, don't access an invalid plugin pointer. Instead attempt to
figure out which plugin caused the problem and blacklist it.
This avoids:
* triple-checking for the GType when type-checking is enabled (see #597260)
* Avoids going through an expensive no-argument checking which landed in
glib-2.22
* Avoids going through 2 extrac functions (g_object_new -> g_object_new_valist)
This allows the macosx versions to properly error out when fds are closed.
This is only a temporary fix until the pluginloader is switched to not
use GstPoll but GIOChannels.
In the plugin loader subprocess, move stdin and stdout to new fd's
so that plugins printing things during plugin init or (*gasp*)
possibly reading from stdin don't interfere with the data sent to
and from the parent.
Guard against a hostile child process that sends bogus data
due to memory corruption by adding a magic number to each packet,
and limit the maximum size of any message to 32MB
When trying to find a function plugin-scanner, include a check on the
version of the binary registry chunks it sends, to make sure it's
what we understand.
Add a simple version check when starting the plugin-scanner so we can
verify we're talking to one that talks the same language.
First try a plugin-scanner in the installed path, then try one via the
GST_PLUGIN_SCANNER env var if that doesn't work.
Update the uninstalled script.
Install the plugin-scanner to the libexec dir
phase 2 - make the plugin loader receive the list of plugins to load and
send back the results asynchronously, so we don't context switch back
and forth so much.