Commit graph

14 commits

Author SHA1 Message Date
Tim-Philipp Müller
3c7c9692ac plugin-scanner: rename plugin-scanner helper binary to gst-plugin-scanner
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.
2009-11-18 09:28:08 +00:00
Jan Schmidt
f425b2711f plugin loader: Don't fail after a short read/write
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.
2009-11-04 11:36:20 +00:00
Jan Schmidt
cebbcb1cdf plugin loader: Don't crash on bogus plugin details
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.
2009-11-04 11:36:20 +00:00
Edward Hervey
27284628e4 optimisation : Use g_object_newv where possible.
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)
2009-10-28 09:31:17 +01:00
Jan Schmidt
de199b4d8d pluginloader: When a plugin is blacklisted, output a GST_ERROR line. 2009-10-19 12:30:07 +01:00
Edward Hervey
7f68d7a6f8 gstpluginloader: Don't wait forever on gst_poll_wait.
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.
2009-10-12 12:21:49 +02:00
Jan Schmidt
e3ce7d3e35 pluginloader: Fix valgrind warnings by zeroing padding bytes. 2009-10-08 23:10:40 +01:00
Jan Schmidt
63934021ab pluginloader: Move stdin and stdout out of harm's way
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.
2009-10-08 15:21:48 +01:00
Jan Schmidt
8108494a38 pluginloader: Add a magic number and maximum size limit.
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
2009-10-06 19:51:45 +01:00
Jan Schmidt
97d6c854ae registry: Also check the binary registry chunk version of the child.
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.
2009-10-06 19:51:45 +01:00
Jan Schmidt
8bf3d8cec2 registry: Support installed/uninstalled plugin-scanner helper
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
2009-10-06 19:51:44 +01:00
Jan Schmidt
ef32c11e6e Add restarting of the plugin loader and blacklisting of broken files 2009-10-06 19:51:42 +01:00
Jan Schmidt
38083fb0c8 Plugin loader phase 2
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.
2009-10-06 19:51:42 +01:00
Jan Schmidt
51675e0c2a registry: Add registry helper phase 1
Phase 1 of adding the registry scan helper
2009-10-06 19:51:42 +01:00