Commit graph

33 commits

Author SHA1 Message Date
Tim-Philipp Müller
666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Tim-Philipp Müller
bcec051a5f Add versioned variants of some environment variables
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
2012-07-04 18:18:02 +01:00
Tim-Philipp Müller
c7eca5ca15 plugin: use GstObject flags for plugin flags 2012-04-29 17:46:32 +01:00
Tim-Philipp Müller
ed80a5cd4b registry: rename gst_registry_get_default() to gst_registry_get()
It's not really a default if there is only one that can't be changed.

Should we return a ref like e.g. g_volume_monitor_get() does?
2012-01-02 02:22:51 +00:00
Tim-Philipp Müller
f660536eb3 pluginloader: only run gst-plugin-scanner with /usr/bin/arch wrapper on OS X >= 10.5
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
2011-04-15 21:02:35 +01:00
Tim-Philipp Müller
918a62abcf pluginloader: fix compiler warnings
Cast string constants to make compiler happy.
2011-04-11 12:52:12 +01:00
Jan Schmidt
159cf687a1 pluginloader: make sure gst-plugin-scanner is called with the right arch on OSX
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
2011-04-11 11:41:19 +01:00
Vincent Penquerc'h
6b84f4573c gstpluginloader: do not leak the description string
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
2011-01-24 16:44:04 +00:00
Edward Hervey
36d44b3e52 pluginloader: Always mark reception as complete after EXIT
Avoids waiting forever on gst_poll_wait when using the select
backend.

Fixes #637057
2011-01-04 14:45:40 +01:00
Stefan Kost
efef6e2248 pluginloader: don't leak entries for blacklisted files 2010-09-09 22:24:38 +03:00
Stefan Kost
012cf2862f comments: add a few comments to the sparsely documented plugin loader 2010-06-09 12:15:52 +03:00
Sebastian Dröge
fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Stefan Kost
575e7eb5f7 logging: remove extra newline 2010-03-15 11:17:22 +02:00
Benjamin Otte
a9d1a493a7 Fixes for -Wwrite-strings
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
2010-03-10 20:50:10 +01:00
Benjamin Otte
3234c0128b Fixes for -Wold-style-definition
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:35 +01:00
Tim-Philipp Müller
f3d579362c pluginloader: fix compiler warning on win32
Move variable that's only used on unix into the unix block so that
the compiler doesn't complain about the unused variable on win32
(see #597662).
2010-01-20 10:58:29 +00:00
Tim-Philipp Müller
8967604053 pluginloader: try scanner set via env var before using the installed one
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.
2010-01-20 09:48:27 +00:00
Andoni Morales Alastruey
9909d3312f pluginloader: disable external plugin loader on Windows until it is ported properly
See #597662.
2010-01-20 01:48:56 +00:00
Tim-Philipp Müller
087aa6ced4 gst_private.h: make sure gst_private.h is included before glib.h
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.
2010-01-20 01:48:56 +00:00
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