#include <vlc/vout.h>
#include "aout_internal.h"
-#include "goom_core.h"
+#ifdef USE_GOOM_TREE
+# ifdef OLD_GOOM
+# include "goom_core.h"
+# define PluginInfo void
+# define goom_update(a,b,c,d,e,f) goom_update(b,c,d,e,f)
+# define goom_close(a) goom_close()
+# define goom_init(a,b) NULL; goom_init(a,b,0); goom_set_font(0,0,0)
+# else
+# include "goom.h"
+# endif
+#else
+# include <goom/goom.h>
+#endif
/*****************************************************************************
* Module descriptor
#define WIDTH_TEXT N_("Goom display width")
#define HEIGHT_TEXT N_("Goom display height")
#define RES_LONGTEXT N_("Allows you to change the resolution of the " \
- "goom display (bigger resolution will be prettier but more CPU intensive).")
+ "Goom display (bigger resolution will be prettier but more CPU intensive).")
#define SPEED_TEXT N_("Goom animation speed")
#define SPEED_LONGTEXT N_("Allows you to reduce the speed of the animation " \
- "(default 7, max 10).")
+ "(default 6, max 10).")
#define MAX_SPEED 10
WIDTH_TEXT, RES_LONGTEXT, VLC_FALSE );
add_integer( "goom-height", 240, NULL,
HEIGHT_TEXT, RES_LONGTEXT, VLC_FALSE );
- add_integer( "goom-speed", 7, NULL,
+ add_integer( "goom-speed", 6, NULL,
SPEED_TEXT, SPEED_LONGTEXT, VLC_FALSE );
set_callbacks( Open, Close );
add_shortcut( "goom" );
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-#define MAX_BLOCKS 10
+#define MAX_BLOCKS 100
#define GOOM_DELAY 400000
typedef struct
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 );
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 )
{
/* 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 )
{
vout_DisplayPicture( p_thread->p_vout, p_pic );
}
- goom_close();
+ goom_close( p_plugin_info );
}
/*****************************************************************************
if( p_input )
{
- char *psz = strrchr( p_input->psz_source, '/' );
+ char *psz = strrchr( p_input->input.p_item->psz_uri, '/' );
if( psz )
{
}
else
{
- psz = p_input->psz_source;
+ psz = p_input->input.p_item->psz_uri;
}
if( psz && *psz )
{