* <listitem>
* <para>default locations (if GST_PLUGIN_SYSTEM_PATH is not set). Those
* default locations are:
- * <filename>~/.gstreamer-$GST_API_VERSION/plugins/</filename>
+ * <filename>$XDG_DATA_HOME/gstreamer-$GST_API_VERSION/plugins/</filename>
* and <filename>$prefix/libs/gstreamer-$GST_API_VERSION/</filename>.
+ * <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">
+ * <filename>$XDG_DATA_HOME</filename></ulink> defaults to
+ * <filename>$HOME/.local/share</filename>.
* </para>
* </listitem>
* </itemizedlist>
* The registry cache file is loaded from
- * <filename>~/.gstreamer-$GST_API_VERSION/registry-$ARCH.bin</filename> or the
- * file listed in the GST_REGISTRY env var. One reason to change the registry
- * location is for testing.
+ * <filename>$XDG_CACHE_HOME/gstreamer-$GST_API_VERSION/registry-$ARCH.bin</filename>
+ * (where
+ * <ulink url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">
+ * <filename>$XDG_CACHE_HOME</filename></ulink> defaults to
+ * <filename>$HOME/.cache</filename>) or the file listed in the GST_REGISTRY
+ * env var. One reason to change the registry location is for testing.
*
* For each plugin that is found in the plugin search path, there could be 3
* possibilities for cached information:
* stored in the default registry, and plugins not relevant to the current
* process are marked with the %GST_PLUGIN_FLAG_CACHED bit. These plugins are
* removed at the end of initialization.
- *
- * Last reviewed on 2012-03-29 (0.11.3)
*/
#ifdef HAVE_CONFIG_H
#include "gstinfo.h"
#include "gsterror.h"
#include "gstregistry.h"
+#include "gstdevicemonitorfactory.h"
#include "gstpluginloader.h"
guint32 efl_cookie;
GList *typefind_factory_list;
guint32 tfl_cookie;
+ GList *device_monitor_factory_list;
+ guint32 dmfl_cookie;
};
/* the one instance of the default registry and the mutex protecting the
gst_plugin_feature_list_free (registry->priv->typefind_factory_list);
}
+ if (registry->priv->device_monitor_factory_list) {
+ GST_DEBUG_OBJECT (registry,
+ "Cleaning up cached device monitor factory list");
+ gst_plugin_feature_list_free (registry->priv->device_monitor_factory_list);
+ }
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
* Add the plugin to the registry. The plugin-added signal will be emitted.
* This function will sink @plugin.
*
- * Returns: TRUE on success.
+ * Returns: %TRUE on success.
*
* MT safe.
*/
* Add the feature to the registry. The feature-added signal will be emitted.
* This function sinks @feature.
*
- * Returns: TRUE on success.
+ * Returns: %TRUE on success.
*
* MT safe.
*/
return list;
}
+
+static GList *
+gst_registry_get_device_monitor_factory_list (GstRegistry * registry)
+{
+ GList *list;
+
+ GST_OBJECT_LOCK (registry);
+
+ gst_registry_get_feature_list_or_create (registry,
+ ®istry->priv->device_monitor_factory_list,
+ ®istry->priv->dmfl_cookie, GST_TYPE_DEVICE_MONITOR_FACTORY);
+
+ /* Return reffed copy */
+ list =
+ gst_plugin_feature_list_copy (registry->
+ priv->device_monitor_factory_list);
+
+ GST_OBJECT_UNLOCK (registry);
+
+ return list;
+}
+
/**
* gst_registry_feature_filter:
* @registry: registry to query
* Find the plugin with the given name in the registry.
* The plugin will be reffed; caller is responsible for unreffing.
*
- * Returns: (transfer full): the plugin with the given name or NULL if the
+ * Returns: (transfer full): the plugin with the given name or %NULL if the
* plugin was not found. gst_object_unref() after usage.
*
* MT safe.
* Find the pluginfeature with the given name and type in the registry.
*
* Returns: (transfer full): the pluginfeature with the given name and type
- * or NULL if the plugin was not found. gst_object_unref() after usage.
+ * or %NULL if the plugin was not found. gst_object_unref() after usage.
*
* MT safe.
*/
return gst_registry_get_element_factory_list (registry);
else if (type == GST_TYPE_TYPE_FIND_FACTORY)
return gst_registry_get_typefind_factory_list (registry);
+ else if (type == GST_TYPE_DEVICE_MONITOR_FACTORY)
+ return gst_registry_get_device_monitor_factory_list (registry);
data.type = type;
data.name = NULL;
* Look up a plugin in the given registry with the given filename.
* If found, plugin is reffed.
*
- * Returns: (transfer full): the #GstPlugin if found, or NULL if not.
+ * Returns: (transfer full): the #GstPlugin if found, or %NULL if not.
* gst_object_unref() after usage.
*/
GstPlugin *
* @registry and whether its version is at least the
* version required.
*
- * Returns: #TRUE if the feature could be found and the version is
- * the same as the required version or newer, and #FALSE otherwise.
+ * Returns: %TRUE if the feature could be found and the version is
+ * the same as the required version or newer, and %FALSE otherwise.
*/
gboolean
gst_registry_check_feature_version (GstRegistry * registry,
#ifndef GST_DISABLE_REGISTRY
/* Unref all plugins marked 'cached', to clear old plugins that no
- * longer exist. Returns TRUE if any plugins were removed */
+ * longer exist. Returns %TRUE if any plugins were removed */
static gboolean
gst_registry_remove_cache_plugins (GstRegistry * registry)
{
g_free (home_plugins);
/* add the main (installed) library path */
- GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
- changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
#ifdef G_OS_WIN32
{
g_win32_get_package_installation_directory_of_module
(_priv_gst_dll_handle);
- dir =
- g_build_filename (base_dir, "lib", "gstreamer-" GST_API_VERSION,
- NULL);
+ dir = g_build_filename (base_dir,
+#ifdef _DEBUG
+ "debug"
+#endif
+ "lib", "gstreamer-" GST_API_VERSION, NULL);
GST_DEBUG ("scanning DLL dir %s", dir);
changed |= gst_registry_scan_path_internal (&context, dir);
g_free (dir);
g_free (base_dir);
}
+#else
+ GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
+ changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
#endif
} else {
gchar **list;
* gst_registry_get_feature_list_cookie:
* @registry: the registry
*
- * Returns the registrys feature list cookie. This changes
+ * Returns the registry's feature list cookie. This changes
* every time a feature is added or removed from the registry.
*
* Returns: the feature list cookie.