#include <vlc_input.h>
#include <vlc_playlist.h>
+#include <vlc_plugin.h>
/*****************************************************************************
* Module descriptor
static void Close ( vlc_object_t * );
vlc_module_begin();
- set_description( _("GaLaktos visualization plugin") );
+ set_description( N_("GaLaktos visualization plugin") );
set_capability( "visualization", 0 );
set_callbacks( Open, Close );
add_shortcut( "galaktos" );
p_thread->psz_title = TitleGet( VLC_OBJECT( p_filter ) );
if( vlc_thread_create( p_thread, "galaktos update thread", Thread,
- VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
+ VLC_THREAD_PRIORITY_LOW, false ) )
{
msg_Err( p_filter, "cannot lauch galaktos thread" );
- if( p_thread->psz_title ) free( p_thread->psz_title );
+ free( p_thread->psz_title );
vlc_object_detach( p_thread );
- vlc_object_destroy( p_thread );
+ vlc_object_release( p_thread );
free( p_sys );
return VLC_EGENERIC;
}
p_thread->p_opengl->render.i_width = p_thread->i_width;
p_thread->p_opengl->render.i_height = p_thread->i_width;
p_thread->p_opengl->render.i_aspect = VOUT_ASPECT_FACTOR;
- p_thread->p_opengl->b_scale = VLC_TRUE;
- p_thread->p_opengl->b_fullscreen = VLC_FALSE;
+ p_thread->p_opengl->b_scale = true;
+ p_thread->p_opengl->b_fullscreen = false;
p_thread->p_opengl->i_alignment = 0;
p_thread->p_opengl->fmt_in.i_sar_num = 1;
p_thread->p_opengl->fmt_in.i_sar_den = 1;
{
msg_Err( p_thread, "unable to initialize OpenGL" );
vlc_object_detach( p_thread->p_opengl );
- vlc_object_destroy( p_thread->p_opengl );
+ vlc_object_release( p_thread->p_opengl );
return;
}
timestart=mdate()/1000;
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
mspf = 1000 / 60;
if( galaktos_update( p_thread ) == 1 )
{
- p_thread->b_die = 1;
- }
- if( p_thread->psz_title )
- {
- free( p_thread->psz_title );
- p_thread->psz_title = NULL;
+ vlc_object_kill( p_thread );
}
+ free( p_thread->psz_title );
+ p_thread->psz_title = NULL;
if (++count%100==0)
{
/* Free the openGL provider */
module_Unneed( p_thread->p_opengl, p_thread->p_module );
vlc_object_detach( p_thread->p_opengl );
- vlc_object_destroy( p_thread->p_opengl );
+ vlc_object_release( p_thread->p_opengl );
}
/*****************************************************************************
aout_filter_sys_t *p_sys = p_filter->p_sys;
/* Stop galaktos Thread */
- p_sys->p_thread->b_die = VLC_TRUE;
+ vlc_object_kill( p_sys->p_thread );
galaktos_done( p_sys->p_thread );
/* Free data */
vlc_object_detach( p_sys->p_thread );
- vlc_object_destroy( p_sys->p_thread );
+ vlc_object_release( p_sys->p_thread );
free( p_sys );
}
if( p_input )
{
- char *psz = strrchr( input_GetItem(p_input)->psz_uri, '/' );
+ char *psz_orig = input_item_GetURI( input_GetItem( p_input ) );
+ char *psz = strrchr( psz_orig, '/' );
if( psz )
{
}
else
{
- psz = input_GetItem(p_input)->psz_uri;
+ psz = psz_orig;
}
if( psz && *psz )
{
psz_title = strdup( psz );
}
+ free( psz_orig );
vlc_object_release( p_input );
}