Commit graph

126 commits

Author SHA1 Message Date
Tim-Philipp Müller
b987febf09 registry: use GStatBuf unconditionally and add typedef for backwards compatibility
No need to clutter the code with #if #else #endif.

See #623875.
2010-07-16 17:55:07 +01:00
David Hoyt
c53457976e registrybinary: Fix compatibility with GLib 2.25 when using MSVC
Newer GLib uses a new type for g_stat() and friends to improve
Windows compatibility. On POSIX this is a typedef to struct stat.

Fixes bug #623875.
2010-07-16 17:27:54 +02:00
Tim-Philipp Müller
fb40cafa5a registry: also skip .deps dirs when scanning for plugins
No need to descend into .deps dirs in uninstalled setups, we know
these don't contain any plugins.
2010-06-19 13:06:45 +01:00
Stefan Kost
fdbf9239b3 docs: update docs (format and search path).
Remove obsolete xml registry cache extension. Tell that content and location is
internal detail. Docuemnt the plugin search order.
2010-06-09 12:15:52 +03:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +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
Benjamin Otte
e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01: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
Stefan Kost
f43f2bf960 docs: fix more bogus xrefs 2009-11-27 14:18:38 +02:00
Stefan Kost
23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Stefan Kost
f4f4906cc5 docs: add missing parameter doc string 2009-11-25 14:23:53 +02:00
Руслан Ижбулатов
b1d57a8b05 registry: Import _priv_gst_dll_handle into gstregistry.c
Fixes bug #601668.
2009-11-12 13:00:07 +01:00
Sebastian Dröge
039ef83523 registry: API: Add gst_{default,}_registry_get_feature_list_cookie()
This returns the internal feature list cookie, which changes every
time a feature is added or removed. This can be used by elements
to check if they should update their cached feature lists.
2009-11-10 18:17:26 +01: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
Tim-Philipp Müller
daecaf0e8a Remove GST_DEBUG_FUNCPTR where they're pointless
There's not much point in using GST_DEBUG_FUNCPTR with GObject
virtual functions such as get_property, set_propery, finalize and
dispose, since they'll never be used by anyone anyway. Saves a
few bytes and possibly a tenth of a polar bear.
2009-10-28 00:44:24 +00:00
Sebastian Dröge
b04f7489bf registry: private is a C++ keyword, don't use it
...otherwise C++ compilers will complain when including gstregistry.h
2009-10-24 11:58:25 +02:00
Edward Hervey
5067664c09 typefind: Keep typefind factories sorted in the registry. Fixes #599147
This avoids having to do the sorting everytime we use typefind

The behaviour of gst_type_find_factory_get_list has subtlely changed
in the sense that the order was previously undefined, whereas now
it returns them sorted by rank and then by name.
2009-10-24 10:44:09 +02:00
Edward Hervey
c79ed99bab registry: Cache element and typefind factories. Fixes 598896
This avoids unneeded list/filtering if the registry hasn't changed
2009-10-24 10:44:04 +02:00
Edward Hervey
9e792ee5b8 gstregistry: Add a cookie for detecting feature list changes
We also create a private structure, since we will need to add more
data there in following patches.
2009-10-24 10:39:13 +02:00
Edward Hervey
4b13520b61 gstregistry: Use hash table when finding a feature. Fixes #598895 2009-10-22 11:13:47 +02:00
Wim Taymans
368b7899c0 registry: hash the plugin basename
Maintain a hashtable of the plugin basename. We can then use this
hashtable to speedup the search for an existing plugin and avoid
a whole lot of strcmp calls.
2009-10-20 23:28:54 -04:00
Wim Taymans
50b9a3ecc3 registry: name is never NULL
When looking up a feature by name, we never call this internal
function with NULL so we don't have to check for it.
2009-10-20 21:43:58 -04:00
Wim Taymans
d722d16155 registry: refactor plugin lookup
We keep lookup plugins by their basename. Avoid creating a basename
from a filename if we can.
2009-10-20 21:39:11 -04:00
Wim Taymans
1be3d5cd83 registry: do quick check for . files
Do a quick check for . files before calling the strcmp functions
2009-10-20 21:15:56 -04:00
Jan Schmidt
f514ef0efc registry: Fix error handling in the registry loader
When the plugin-scanner load fails (because the helper can't be
spawned), make sure to load the plugin that failed in-process, so
that all plugins do get loaded.
2009-10-08 10:36:56 +01:00
Tim-Philipp Müller
53c9c9d975 registry: improve plugin loader failure message for uninstalled setups
Everyone running an uninstalled git setup is going to wonder about
this failure next time they update, so let's mention the solution
in the error message.
2009-10-07 14:39:03 +01:00
Jan Schmidt
6eee943b36 Remove checking for and mentions of fork where possible.
We no longer use fork() directly, instead using glib's spawn
functionality, so don't check for it, and don't use it in the
documentation notes.
2009-10-06 19:51:44 +01:00
Jan Schmidt
82aeddbc61 Only load the registry cache once per process.
When updating the registry, we don't need to re-read the registry cache
and waste time replacing all our existing, hopefully identical, plugins
and features that we're about to re-scan anyway.
2009-10-06 19:51:43 +01:00
Jan Schmidt
c7922fb838 Add some more debug the registry.
Add the full set of debug about why it's decided that a given plugin is
stale or not, and include the plugin name when finalizing it.
2009-10-06 19:51:43 +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
Jan Schmidt
1f4e477033 registry: Rearrange some things.
Prepare to land the external plugin helper process
2009-10-06 19:51:41 +01:00
Sebastian Dröge
5f6bfb816b registry: Use g_build_filename() instead of g_strjoin() with /
This makes sure that the generated filenames use the platform
specific directory separator instead of /.

Fixes bug #587973.
2009-07-08 15:12:07 +02:00
Edward Hervey
3c21f2d86c Spread branch prediction macros.
These are based on profiling several playback scenarios using playbin2.
2009-06-30 16:29:58 +02:00
Tim-Philipp Müller
26b201273a docs: a few small API doc fixes and additions 2009-06-10 09:39:12 +01:00
Stefan Kost
612387da25 registry: fix comment formatting 2009-05-31 22:39:05 +03:00
Wim Taymans
761b0e39c1 Avoid unneeded type checks 2009-05-11 22:35:09 +02:00
Wim Taymans
ceb74fe2cf registry: avoid calling _get_name() too much
Avoid calling gst_plugin_get_name() too many times but instead cache
the value.
2009-05-11 22:35:09 +02:00
Wim Taymans
84c5db2635 Use new _ref_sink when we can 2009-05-11 22:35:09 +02:00
Tim-Philipp Müller
ea554b1d62 registry: ignore .git directory when recursively scanning plugin paths for plugins
Saves some cycles/pandas for those of us who run uninstalled setups.
2009-03-26 14:52:00 +00:00
Tim-Philipp Müller
2ae03ba72f Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
Simon Holm Thøgersen
9c15d8efec gst/gstregistry.c: Reduce the number of stat() calls for every file from three times to one time. Fixes bug #560360.
Original commit message from CVS:
Patch by: Simon Holm Thøgersen <odie at cs dot aau dot dk>
* gst/gstregistry.c: (gst_registry_scan_path_level):
Reduce the number of stat() calls for every file from three times
to one time. Fixes bug #560360.
2008-11-24 09:59:07 +00:00
Michael Smith
72e0b732f6 gst/: GstRegistryPool doesn't exist; don't refer to it in docs.
Original commit message from CVS:
* gst/gstplugin.c:
* gst/gstregistry.c:
GstRegistryPool doesn't exist; don't refer to it in docs.
Don't refer to functions that don't exist in docs, it's
unhelpful.
2008-07-15 22:53:00 +00:00
Rob Bradford
9f9422bcb3 gst/gstregistry.c: Don't recurse into .debug directories as some distros install the debugging symbols next to the pl...
Original commit message from CVS:
Patch by: Rob Bradford <rob at robster dot org dot uk>
* gst/gstregistry.c: (gst_registry_scan_path_level):
Don't recurse into .debug directories as some distros install
the debugging symbols next to the plugins in .debug directories
and dlopen() crashes on them sometimes. Fixes bug #508070.
Add FIXME for 0.11 to not recurse into directories at all because
it's very inconsistent to the behaviour of other PATH environment
variables.
2008-05-30 07:36:17 +00:00
Tim-Philipp Müller
31e43e26f0 gst/gstregistry.c: Only print one log message per non-plugin file.
Original commit message from CVS:
* gst/gstregistry.c: (gst_registry_scan_path_level):
Only print one log message per non-plugin file.
2008-05-03 19:13:47 +00:00
Tim-Philipp Müller
2d8bbf7127 gst/gstregistry.c: Run g_str_has_suffix() only on the file name, not the entire file path.
Original commit message from CVS:
* gst/gstregistry.c: (gst_registry_scan_path_level):
Run g_str_has_suffix() only on the file name, not the
entire file path.
2008-05-01 13:03:51 +00:00
Stefan Kost
31d6cc27cc gst/gstregistry.c: Tell the *truth* when improving the documentation.
Original commit message from CVS:
* gst/gstregistry.c:
Tell the *truth* when improving the documentation.
2008-04-24 06:46:54 +00:00
Stefan Kost
4b87b40779 gst/gstregistry.c: Improve the documentation.
Original commit message from CVS:
* gst/gstregistry.c:
Improve the documentation.
2008-04-23 13:55:01 +00:00
Julien Moutte
224b878ff7 Mac OS X love...
Original commit message from CVS:
2008-04-11  Julien Moutte  <julien@fluendo.com>

Mac OS X love...
* configure.ac: Merge platform specific defines, introduce a new
define on OS X to remember that forking when updating registry is
unsafe.
* docs/faq/gst-uninstalled: Updated to include gst-libs in the bad
module.
* gst/gst.c: Don't fork when updating registry if GST_HAVE_UNSAFE_FORK
is defined.
* gst/gstregistry.c: (gst_registry_scan_path_level): Fixed a bogus
condition that leads to absolutely no plugins being registered on
OS X.
2008-04-11 09:27:44 +00:00
Stefan Kost
b4c170a205 MacOS has plugins under .so or under .dylib. Add detection for MacOS and handle this case.
Original commit message from CVS:
* configure.ac:
* gst/gstregistry.c:
MacOS has plugins under .so or under .dylib. Add detection for MacOS
and handle this case.
* gst/gst.c:
Add a comment here describing, why we stat each plugin and not try to
be smart.
2008-03-31 13:47:22 +00:00