# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout.h>
#define CFG_PREFIX "puzzle-"
-vlc_module_begin();
- set_description( N_("Puzzle interactive game video filter") );
- set_shortname( N_( "Puzzle" ));
- set_capability( "video filter", 0 );
- set_category( CAT_VIDEO );
- set_subcategory( SUBCAT_VIDEO_VFILTER );
+vlc_module_begin ()
+ set_description( N_("Puzzle interactive game video filter") )
+ set_shortname( N_( "Puzzle" ))
+ set_capability( "video filter", 0 )
+ set_category( CAT_VIDEO )
+ set_subcategory( SUBCAT_VIDEO_VFILTER )
add_integer_with_range( CFG_PREFIX "rows", 4, 1, 128, NULL,
- ROWS_TEXT, ROWS_LONGTEXT, false );
+ ROWS_TEXT, ROWS_LONGTEXT, false )
add_integer_with_range( CFG_PREFIX "cols", 4, 1, 128, NULL,
- COLS_TEXT, COLS_LONGTEXT, false );
+ COLS_TEXT, COLS_LONGTEXT, false )
add_bool( CFG_PREFIX "black-slot", 0, NULL,
- BLACKSLOT_TEXT, BLACKSLOT_LONGTEXT, false );
+ BLACKSLOT_TEXT, BLACKSLOT_LONGTEXT, false )
- set_callbacks( Create, Destroy );
-vlc_module_end();
+ set_callbacks( Create, Destroy )
+vlc_module_end ()
static const char *const ppsz_filter_options[] = {
"rows", "cols", "black-slot", NULL
/* 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_image = image_HandlerCreate( p_vout );
{
int i_index;
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
+ DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
var_DelCallback( p_vout->p_sys->p_vout, "mouse-x", MouseEvent, p_vout);
var_DelCallback( p_vout->p_sys->p_vout, "mouse-y", MouseEvent, p_vout);
var_DelCallback( p_vout->p_sys->p_vout, "mouse-clicked", MouseEvent, p_vout);
+
+ vout_CloseAndRelease( p_vout->p_sys->p_vout );
}
#define SHUFFLE_WIDTH 81
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- if( p_vout->p_sys->p_vout )
- {
- DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
- vlc_object_detach( p_vout->p_sys->p_vout );
- vout_Destroy( p_vout->p_sys->p_vout );
- }
-
image_HandlerDelete( p_vout->p_sys->p_image );
free( p_vout->p_sys->pi_order );
- DEL_PARENT_CALLBACKS( SendEventsToChild );
-
free( p_vout->p_sys );
}
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
return;
}
msleep( VOUT_OUTMEM_SLEEP );
}
- vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, p_pic->date );
+ p_outpic->date = p_pic->date;
for( i_plane = 0; i_plane < p_outpic->i_planes; i_plane++ )
{