Stefan Kost
bd302bb63d
pluginfeature: avoid duplicating feature->name
...
The feature name is not supposed to change over time anyway. In order to enforce
this parentize features to the registry and make the feature->name pointing to
GstObject:name. In 0.11 we could consider of removing the feature->name variable
(FIXME comment added).
Fixes : #459466
2011-05-18 09:55:57 +03:00
Tim-Philipp Müller
f9625dbe55
registry: when removing a cached-but-no-longer-existing plugin, only remove features that belong to it
...
When a plugin file no longer exists, e.g. because it's been removed or
renamed, don't remove all features in the registry based on the *name*
of the plugin they belong to, but only remove those who actually belong
to that particular plugin (object/pointer).
This fixes issues of plugin features disappearing when a plugin .so file
is renamed.
https://bugzilla.gnome.org/show_bug.cgi?id=604094
2011-04-24 11:27:56 +01:00
Tim-Philipp Müller
d3d5b98c2f
registry: use TRACE log level to log files that don't look like plugins
...
Cuts down the noise in uninstalled setups.
2011-04-24 11:05:58 +01:00
Sebastian Dröge
bf6c3ea6df
gst: Add some more gobject-introspection annotations
2011-04-14 16:14:01 +02:00
Edward Hervey
8edee55a3a
registry: Don't replace valid existing plugins by blacklisted ones
...
Only replace existing plugins by blacklisted ones if they correspond
to the exact same plugin. If they're not the same, keep the existing
valid one.
Fixes #638941
2011-01-10 11:38:19 +01:00
Tim-Philipp Müller
6e2db6374e
registry: ignore old libgstvalve.so and libgstselector.so plugins to minimize upgrade pain
...
Ignore plugins which have been moved into coreelements, so it's
still possible to just upgrade GStreamer core without having to
upgrade the whole stack.
2011-01-06 19:40:27 +00:00
Tim-Philipp Müller
8a7fc1d8c9
Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
...
This reverts commit 6aa8ca37ee
.
See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
Tim-Philipp Müller
3256c708be
docs: gst: more gobject introspection annotations
...
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Edward Hervey
6aa8ca37ee
micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers
2010-12-03 12:03:42 +01:00
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