]> git.sesse.net Git - vlc/blobdiff - modules/video_output/caca.c
Update THANKS for ivoire and me
[vlc] / modules / video_output / caca.c
index 67a6743a63e64a63053437ee839eb45aa602608c..2f8f24a6f0d8ce5cf07491f7ed15fdb99a12fa6e 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>
 #include <vlc_interface.h>
@@ -76,14 +76,14 @@ static void Display   ( vout_thread_t *, picture_t * );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_shortname( "Caca" );
-    set_category( CAT_VIDEO );
-    set_subcategory( SUBCAT_VIDEO_VOUT );
-    set_description( N_("Color ASCII art video output") );
-    set_capability( "video output", 12 );
-    set_callbacks( Create, Destroy );
-vlc_module_end();
+vlc_module_begin ()
+    set_shortname( "Caca" )
+    set_category( CAT_VIDEO )
+    set_subcategory( SUBCAT_VIDEO_VOUT )
+    set_description( N_("Color ASCII art video output") )
+    set_capability( "video output", 12 )
+    set_callbacks( Create, Destroy )
+vlc_module_end ()
 
 /*****************************************************************************
  * vout_sys_t: libcaca video output method descriptor
@@ -163,10 +163,7 @@ static int Create( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     p_vout->p_sys->p_cv = cucul_create_canvas(0, 0);
     if( !p_vout->p_sys->p_cv )
@@ -369,19 +366,17 @@ static int Manage( vout_thread_t *p_vout )
             var_Set( p_vout, "mouse-moved", val );
             break;
         case CACA_EVENT_MOUSE_RELEASE:
-            val.b_bool = true;
-            var_Set( p_vout, "mouse-clicked", val );
+            var_SetBool( p_vout, "mouse-clicked", true );
             break;
         case CACA_EVENT_QUIT:
         {
-            p_playlist = vlc_object_find( p_vout,
-                                          VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+            p_playlist = pl_Hold( p_vout );
             if( p_playlist )
             {
                 playlist_Stop( p_playlist );
-                vlc_object_release( p_playlist );
+                pl_Release( p_vout );
             }
-            vlc_object_kill( p_vout->p_libvlc );
+            libvlc_Quit( p_vout->p_libvlc );
             break;
         }
 #endif
@@ -398,7 +393,7 @@ static int Manage( vout_thread_t *p_vout )
  *****************************************************************************/
 static void Render( vout_thread_t *p_vout, picture_t *p_pic )
 {
-    cucul_set_color( p_vout->p_sys->p_cv,
+    cucul_set_color_ansi( p_vout->p_sys->p_cv,
                      CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK );
     cucul_clear_canvas( p_vout->p_sys->p_cv );
     cucul_dither_bitmap( p_vout->p_sys->p_cv, 0, 0,