* 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_win32_get_package_installation_directory_of_module
(_priv_gst_dll_handle);
- dir =
- g_build_filename (base_dir,
+ dir = g_build_filename (base_dir,
#ifdef _DEBUG
- "debug"
+ "debug"
#endif
- "lib",
- "gstreamer-" GST_API_VERSION,
- NULL);
+ "lib", "gstreamer-" GST_API_VERSION, NULL);
GST_DEBUG ("scanning DLL dir %s", dir);
changed |= gst_registry_scan_path_internal (&context, dir);