# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout.h>
#define OVERLAP 2350
#ifdef OVERLAP
#include <math.h>
- // OS CODE DEPENDANT to get display dimensions
+ // OS CODE DEPENDENT to get display dimensions
#ifdef SYS_MINGW32
#include <windows.h>
#else
vlc_module_begin();
set_description( N_("Panoramix: wall with overlap video filter") );
- set_shortname( _("Panoramix" ));
+ set_shortname( N_("Panoramix" ));
set_capability( "video filter", 0 );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_callbacks( Create, Destroy );
vlc_module_end();
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
"cols", "rows", "offset-x", "bz-length", "bz-height", "attenuate",
"bz-begin", "bz-middle", "bz-end", "bz-middle-pos", "bz-gamma-red",
"bz-gamma-green", "bz-gamma-blue", "bz-blackcrush-red",
/* 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->pf_init = Init;
p_vout->pf_end = End;
p_vout->p_sys->i_col = var_CreateGetInteger( p_vout, CFG_PREFIX "cols" );
p_vout->p_sys->i_row = var_CreateGetInteger( p_vout, CFG_PREFIX "rows" );
-// OS dependant code : Autodetect number of displays in wall
+// OS dependent code : Autodetect number of displays in wall
#ifdef SYS_MINGW32
if ((p_vout->p_sys->i_col < 0) || (p_vout->p_sys->i_row < 0) )
{
sizeof(struct vout_list_t) );
if( p_vout->p_sys->pp_vout == NULL )
{
- msg_Err( p_vout, "out of memory" );
free( p_vout->p_sys );
return VLC_ENOMEM;
}
double d_halfLength_calculated;
int i_offset = 0;
-// OS DEPENDANT CODE to get display dimensions
+// OS DEPENDENT CODE to get display dimensions
if (b_fullscreen)
{
#ifdef SYS_MINGW32
{
int i_index;
-#ifdef OVERLAP
- var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length);
-#endif
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
+
+ RemoveAllVout( p_vout );
+
+#ifdef OVERLAP
+ var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length);
+#endif
}
/*****************************************************************************
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
-#ifdef GLOBAL_OUTPUT
- 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 );
- DEL_PARENT_CALLBACKS( SendEventsToChild);
-#endif
-
- RemoveAllVout( p_vout );
- DEL_PARENT_CALLBACKS( SendEventsToChild );
-
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
DEL_CALLBACKS(
p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout,
SendEvents );
- vlc_object_detach(
- p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
- vout_Destroy(
- p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
+ vout_CloseAndRelease( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
}
}
}