]> git.sesse.net Git - vlc/blobdiff - modules/visualization/goom.c
PF_* -> AF_*
[vlc] / modules / visualization / goom.c
index e0c20a3f01e1ecdd956d98625f6951c30010d655..1ec0f33aaecfbb328016d046391102cad5266545 100644 (file)
 #include "aout_internal.h"
 
 #ifdef USE_GOOM_TREE
-#   include "goom.h"
+#   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
@@ -59,8 +67,11 @@ static void Close        ( vlc_object_t * );
 #define MAX_SPEED 10
 
 vlc_module_begin();
+    set_shortname( _("Goom"));
     set_description( _("Goom effect") );
-    set_capability( "audio filter", 0 );
+    set_category( CAT_AUDIO );
+    set_subcategory( SUBCAT_AUDIO_VISUAL );
+    set_capability( "visualization", 0 );
     add_integer( "goom-width", 320, NULL,
                  WIDTH_TEXT, RES_LONGTEXT, VLC_FALSE );
     add_integer( "goom-height", 240, NULL,
@@ -74,7 +85,7 @@ vlc_module_end();
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-#define MAX_BLOCKS 10
+#define MAX_BLOCKS 100
 #define GOOM_DELAY 400000
 
 typedef struct
@@ -120,6 +131,7 @@ static int Open( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys;
     goom_thread_t     *p_thread;
     vlc_value_t       width, height;
+    video_format_t    fmt = {0};
 
     if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' )
          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
@@ -149,10 +161,13 @@ static int Open( vlc_object_t *p_this )
     var_Create( p_thread, "goom-height", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
     var_Get( p_thread, "goom-height", &height );
 
-    p_thread->p_vout =
-        vout_Request( p_filter, NULL, width.i_int, height.i_int,
-                      VLC_FOURCC('R','V','3','2'),
-                      VOUT_ASPECT_FACTOR * width.i_int/height.i_int );
+    fmt.i_width = fmt.i_visible_width = width.i_int;
+    fmt.i_height = fmt.i_visible_height = height.i_int;
+    fmt.i_chroma = VLC_FOURCC('R','V','3','2');
+    fmt.i_aspect = VOUT_ASPECT_FACTOR * width.i_int/height.i_int;
+    fmt.i_sar_num = fmt.i_sar_den = 1;
+
+    p_thread->p_vout = vout_Request( p_filter, NULL, &fmt );
     if( p_thread->p_vout == NULL )
     {
         msg_Err( p_filter, "no suitable vout module" );
@@ -375,7 +390,7 @@ static void Close( vlc_object_t *p_this )
     vlc_thread_join( p_sys->p_thread );
 
     /* Free data */
-    vout_Request( p_filter, p_sys->p_thread->p_vout, 0, 0, 0, 0 );
+    vout_Request( p_filter, p_sys->p_thread->p_vout, 0 );
     vlc_mutex_destroy( &p_sys->p_thread->lock );
     vlc_cond_destroy( &p_sys->p_thread->wait );
     vlc_object_detach( p_sys->p_thread );
@@ -398,7 +413,7 @@ static char *TitleGet( vlc_object_t *p_this )
 
     if( p_input )
     {
-        char *psz = strrchr( p_input->psz_source, '/' );
+        char *psz = strrchr( p_input->input.p_item->psz_uri, '/' );
 
         if( psz )
         {
@@ -406,7 +421,7 @@ static char *TitleGet( vlc_object_t *p_this )
         }
         else
         {
-            psz = p_input->psz_source;
+            psz = p_input->input.p_item->psz_uri;
         }
         if( psz && *psz )
         {