GstPluginDesc *orig_desc;
- unsigned int flags;
-
gchar * filename;
gchar * basename; /* base name (non-dir part) of plugin path */
*/
typedef enum
{
- GST_PLUGIN_FLAG_CACHED = (1<<0),
- GST_PLUGIN_FLAG_BLACKLISTED = (1<<1)
+ GST_PLUGIN_FLAG_CACHED = (GST_OBJECT_FLAG_LAST << 0),
+ GST_PLUGIN_FLAG_BLACKLISTED = (GST_OBJECT_FLAG_LAST << 1)
} GstPluginFlags;
/**
plugin->filename = g_strdup (entry->filename);
plugin->file_mtime = entry->file_mtime;
plugin->file_size = entry->file_size;
- plugin->flags |= GST_PLUGIN_FLAG_BLACKLISTED;
+ GST_OBJECT_FLAG_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED);
plugin->basename = g_path_get_basename (plugin->filename);
plugin->desc.name = g_intern_string (plugin->basename);
return FALSE;
}
- newplugin->flags &= ~GST_PLUGIN_FLAG_CACHED;
+ GST_OBJECT_FLAG_UNSET (newplugin, GST_PLUGIN_FLAG_CACHED);
GST_LOG_OBJECT (l->registry,
"marking plugin %p as registered as %s", newplugin,
newplugin->filename);
GST_STR_NULL (plugin->filename));
/* If the new plugin is blacklisted and the existing one isn't cached, do not
* accept if it's from a different location than the existing one */
- if ((plugin->flags & GST_PLUGIN_FLAG_BLACKLISTED) &&
+ if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED) &&
strcmp (plugin->filename, existing_plugin->filename)) {
GST_WARNING_OBJECT (registry,
"Not replacing plugin because new one (%s) is blacklisted but for a different location than existing one (%s)",
!(deps_changed = _priv_plugin_deps_files_changed (plugin)) &&
!strcmp (plugin->filename, filename)) {
GST_LOG_OBJECT (context->registry, "file %s cached", filename);
- plugin->flags &= ~GST_PLUGIN_FLAG_CACHED;
+ GST_OBJECT_FLAG_UNSET (plugin, GST_PLUGIN_FLAG_CACHED);
GST_LOG_OBJECT (context->registry,
"marking plugin %p as registered as %s", plugin, filename);
plugin->registered = TRUE;
while (g) {
g_next = g->next;
plugin = g->data;
- if (plugin->flags & GST_PLUGIN_FLAG_CACHED) {
+ if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_CACHED)) {
GST_DEBUG_OBJECT (registry, "removing cached plugin \"%s\"",
GST_STR_NULL (plugin->filename));
registry->priv->plugins = g_list_delete_link (registry->priv->plugins, g);
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, "lib", "gstreamer-" GST_API_VERSION,
+ NULL);
GST_DEBUG ("scanning DLL dir %s", dir);
changed |= gst_registry_scan_path_internal (&context, dir);
if (!plugin->filename)
continue;
- if (plugin->flags & GST_PLUGIN_FLAG_CACHED) {
+ if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_CACHED)) {
GStatBuf statbuf;
if (g_stat (plugin->filename, &statbuf) < 0 ||
plugin = g_object_newv (GST_TYPE_PLUGIN, 0, NULL);
/* TODO: also set GST_PLUGIN_FLAG_CONST */
- plugin->flags |= GST_PLUGIN_FLAG_CACHED;
+ GST_OBJECT_FLAG_SET (plugin, GST_PLUGIN_FLAG_CACHED);
plugin->file_mtime = pe->file_mtime;
plugin->file_size = pe->file_size;
/* If the license string is 'BLACKLIST', mark this as a blacklisted
* plugin */
if (strcmp (plugin->desc.license, "BLACKLIST") == 0)
- plugin->flags |= GST_PLUGIN_FLAG_BLACKLISTED;
+ GST_OBJECT_FLAG_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED);
plugin->basename = g_path_get_basename (plugin->filename);
#include <locale.h>
#include <glib/gprintf.h>
-/* FIXME: shouldn't have to access private API */
-#include "gst/gst_private.h"
-
static char *_name = NULL;
static int print_element_info (GstElementFactory * factory,
plugins = gst_registry_get_plugin_list (gst_registry_get ());
for (cur = plugins; cur != NULL; cur = g_list_next (cur)) {
GstPlugin *plugin = (GstPlugin *) (cur->data);
- if (plugin->flags & GST_PLUGIN_FLAG_BLACKLISTED) {
+ if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED)) {
g_print (" %s\n", gst_plugin_get_name (plugin));
count++;
}
plugins = g_list_next (plugins);
plugincount++;
- if (plugin->flags & GST_PLUGIN_FLAG_BLACKLISTED) {
+ if (GST_OBJECT_FLAG_IS_SET (plugin, GST_PLUGIN_FLAG_BLACKLISTED)) {
blacklistcount++;
continue;
}