mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
Add tentative support for libvisual-0.4 (#336881).
Original commit message from CVS: * configure.ac: * ext/libvisual/visual.c: (gst_visual_actor_plugin_is_gl), (plugin_init): Add tentative support for libvisual-0.4 (#336881).
This commit is contained in:
parent
5fcd152dac
commit
61cf784195
3 changed files with 67 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-05-15 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* configure.ac:
|
||||||
|
* ext/libvisual/visual.c: (gst_visual_actor_plugin_is_gl),
|
||||||
|
(plugin_init):
|
||||||
|
Add tentative support for libvisual-0.4 (#336881).
|
||||||
|
|
||||||
2006-05-15 Tim-Philipp Müller <tim at centricular dot net>
|
2006-05-15 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: Young-Ho Cha <ganadist at chollian net>
|
Patch by: Young-Ho Cha <ganadist at chollian net>
|
||||||
|
|
13
configure.ac
13
configure.ac
|
@ -420,7 +420,18 @@ GST_CHECK_FEATURE(GNOME_VFS, [Gnome VFS], gnomevfssrc, [
|
||||||
dnl *** libvisual ***
|
dnl *** libvisual ***
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBVISUAL, true)
|
||||||
GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization plugins], libvisual, [
|
GST_CHECK_FEATURE(LIBVISUAL, [libvisual visualization plugins], libvisual, [
|
||||||
PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0, HAVE_LIBVISUAL="yes", HAVE_LIBVISUAL="no")
|
PKG_CHECK_MODULES(LIBVISUAL, libvisual = 0.2.0,
|
||||||
|
[
|
||||||
|
HAVE_LIBVISUAL="yes",
|
||||||
|
], [
|
||||||
|
PKG_CHECK_MODULES(LIBVISUAL, libvisual-0.4 >= 0.4.0,
|
||||||
|
[
|
||||||
|
HAVE_LIBVISUAL="yes"
|
||||||
|
], [
|
||||||
|
HAVE_LIBVISUAL="no"
|
||||||
|
])
|
||||||
|
]
|
||||||
|
)
|
||||||
AC_SUBST(LIBVISUAL_CFLAGS)
|
AC_SUBST(LIBVISUAL_CFLAGS)
|
||||||
AC_SUBST(LIBVISUAL_LIBS)
|
AC_SUBST(LIBVISUAL_LIBS)
|
||||||
])
|
])
|
||||||
|
|
|
@ -674,10 +674,40 @@ make_valid_name (char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_visual_actor_plugin_is_gl (VisObject * plugin, const gchar * name)
|
||||||
|
{
|
||||||
|
gboolean is_gl;
|
||||||
|
gint depth;
|
||||||
|
|
||||||
|
#if !defined(VISUAL_API_VERSION)
|
||||||
|
|
||||||
|
depth = VISUAL_PLUGIN_ACTOR (plugin)->depth;
|
||||||
|
is_gl = (depth == VISUAL_VIDEO_DEPTH_GL);
|
||||||
|
|
||||||
|
#elif VISUAL_API_VERSION >= 4000 && VISUAL_API_VERSION < 5000
|
||||||
|
|
||||||
|
depth = VISUAL_ACTOR_PLUGIN (plugin)->vidoptions.depth;
|
||||||
|
/* FIXME: how to figure this out correctly in 0.4? */
|
||||||
|
is_gl = (depth & VISUAL_VIDEO_DEPTH_GL) == VISUAL_VIDEO_DEPTH_GL;
|
||||||
|
|
||||||
|
#else
|
||||||
|
# error what libvisual version is this?
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (!is_gl) {
|
||||||
|
GST_DEBUG ("plugin %s is not a GL plugin (%d), registering", name, depth);
|
||||||
|
} else {
|
||||||
|
GST_DEBUG ("plugin %s is a GL plugin (%d), ignoring", name, depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
return is_gl;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i, count;
|
||||||
VisList *list;
|
VisList *list;
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (libvisual_debug, "libvisual", 0,
|
GST_DEBUG_CATEGORY_INIT (libvisual_debug, "libvisual", 0,
|
||||||
|
@ -697,11 +727,17 @@ plugin_init (GstPlugin * plugin)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
list = visual_actor_get_list ();
|
list = visual_actor_get_list ();
|
||||||
for (i = 0; i < visual_list_count (list); i++) {
|
|
||||||
|
#if !defined(VISUAL_API_VERSION)
|
||||||
|
count = visual_list_count (list);
|
||||||
|
#elif VISUAL_API_VERSION >= 4000 && VISUAL_API_VERSION < 5000
|
||||||
|
count = visual_collection_size (VISUAL_COLLECTION (list));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
VisPluginRef *ref = visual_list_get (list, i);
|
VisPluginRef *ref = visual_list_get (list, i);
|
||||||
VisActorPlugin *actplugin = NULL;
|
|
||||||
VisPluginData *visplugin = NULL;
|
VisPluginData *visplugin = NULL;
|
||||||
gboolean is_gl = FALSE;
|
gboolean skip = FALSE;
|
||||||
GType type;
|
GType type;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
GTypeInfo info = {
|
GTypeInfo info = {
|
||||||
|
@ -721,21 +757,19 @@ plugin_init (GstPlugin * plugin)
|
||||||
if (ref->info->plugname == NULL)
|
if (ref->info->plugname == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
actplugin = VISUAL_PLUGIN_ACTOR (visplugin->info->plugin);
|
/* Blacklist some plugins */
|
||||||
|
if (strcmp (ref->info->plugname, "gstreamer") == 0 ||
|
||||||
/* Ignore plugins that only support GL output for now */
|
strcmp (ref->info->plugname, "gdkpixbuf") == 0) {
|
||||||
if (actplugin->depth == VISUAL_VIDEO_DEPTH_GL) {
|
skip = TRUE;
|
||||||
GST_DEBUG ("plugin %s is a GL plugin (%d), ignoring",
|
|
||||||
ref->info->plugname, actplugin->depth);
|
|
||||||
is_gl = TRUE;
|
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG ("plugin %s is not a GL plugin (%d), registering",
|
/* Ignore plugins that only support GL output for now */
|
||||||
ref->info->plugname, actplugin->depth);
|
skip = gst_visual_actor_plugin_is_gl (visplugin->info->plugin,
|
||||||
|
visplugin->info->plugname);
|
||||||
}
|
}
|
||||||
|
|
||||||
visual_plugin_unload (visplugin);
|
visual_plugin_unload (visplugin);
|
||||||
|
|
||||||
if (!is_gl) {
|
if (!skip) {
|
||||||
name = g_strdup_printf ("GstVisual%s", ref->info->plugname);
|
name = g_strdup_printf ("GstVisual%s", ref->info->plugname);
|
||||||
make_valid_name (name);
|
make_valid_name (name);
|
||||||
type = g_type_register_static (GST_TYPE_VISUAL, name, &info, 0);
|
type = g_type_register_static (GST_TYPE_VISUAL, name, &info, 0);
|
||||||
|
|
Loading…
Reference in a new issue