From f5ed9a6957536b4baf31dd20457ddd6277d27cd4 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Sun, 9 May 2004 09:35:12 +0000 Subject: [PATCH] configure.ac, modules/visualization/goom.c: updated for libgoom2 (goom 2k4). You can find it here: http://www.ios-software.com/index.php3?page=projet&quoi=1 --- configure.ac | 23 ++++++++++++++--------- modules/visualization/goom.c | 15 +++++++++------ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 5e127068b7..176fdc2fc0 100644 --- a/configure.ac +++ b/configure.ac @@ -3408,27 +3408,32 @@ then dnl test for --with-goom-tree dnl if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then - AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree}) + AC_MSG_CHECKING(for libgoom2.a in ${with_goom_tree}) real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`" if test -z "${real_goom_tree}"; then dnl The given directory can't be found AC_MSG_RESULT(no) AC_MSG_ERROR([cannot cd to ${with_goom_tree}]) fi - if test -f "${real_goom_tree}/libgoom.a"; then - AC_MSG_RESULT(${real_goom_tree}/libgoom.a) + if test -f "${real_goom_tree}/src/.libs/libgoom2.a"; then + AC_MSG_RESULT(${real_goom_tree}/src/.libs/libgoom2.a) AX_ADD_BUILTINS([goom]) - AX_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom]) - AX_ADD_CPPFLAGS([goom],[-I${real_goom_tree}]) + AX_ADD_LDFLAGS([goom],[-L${real_goom_tree}/src/.libs -lgoom2]) + AX_ADD_CPPFLAGS([goom],[-I${real_goom_tree}/src -DUSE_GOOM_TREE]) else dnl The given libgoom wasn't built AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_goom_tree}/libgoom.a, make sure you compiled goom in ${with_goom_tree}]) + AC_MSG_ERROR([cannot find ${real_goom_tree}/src/.libs/libgoom2.a, make sure you compiled goom in ${with_goom_tree}]) fi else - dnl The --with-goom-tree isn't specified wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([You have to specify a tree with --with-goom-tree]) + AC_CHECK_HEADERS(goom/goom.h, [ + AC_CHECK_LIB(goom2, goom_init, [ + AX_ADD_PLUGINS([goom]) + AX_ADD_LDFLAGS([goom],[-lgoom2]) + ],[ + AC_MSG_ERROR([Could not find goom on your system: you may get it from http://www.ios-software.com/.]) + ]) + ]) fi fi diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c index 88e9cb9263..e0c20a3f01 100644 --- a/modules/visualization/goom.c +++ b/modules/visualization/goom.c @@ -35,8 +35,10 @@ #include #include "aout_internal.h" -#ifndef WIN32 -#include "goom_core.h" +#ifdef USE_GOOM_TREE +# include "goom.h" +#else +# include #endif /***************************************************************************** @@ -299,6 +301,7 @@ static void Thread( vlc_object_t *p_this ) audio_date_t i_pts; int16_t p_data[2][512]; int i_data = 0, i_count = 0; + PluginInfo *p_plugin_info; var_Get( p_this, "goom-width", &width ); var_Get( p_this, "goom-height", &height ); @@ -308,8 +311,7 @@ static void Thread( vlc_object_t *p_this ) speed.i_int = MAX_SPEED - speed.i_int; if( speed.i_int < 0 ) speed.i_int = 0; - goom_init( width.i_int, height.i_int, 0 ); - goom_set_font( NULL, NULL, NULL ); + p_plugin_info = goom_init( width.i_int, height.i_int ); while( !p_thread->b_die ) { @@ -329,7 +331,8 @@ static void Thread( vlc_object_t *p_this ) /* Frame dropping if necessary */ if( aout_DateGet( &i_pts ) + GOOM_DELAY <= mdate() ) continue; - plane = goom_update( p_data, 0, 0.0, p_thread->psz_title, NULL ); + plane = goom_update( p_plugin_info, p_data, 0, 0.0, + p_thread->psz_title, NULL ); if( p_thread->psz_title ) { @@ -351,7 +354,7 @@ static void Thread( vlc_object_t *p_this ) vout_DisplayPicture( p_thread->p_vout, p_pic ); } - goom_close(); + goom_close( p_plugin_info ); } /*****************************************************************************