#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
+#include <vlc_url.h>
#include <vlc_image.h>
-#include <vlc_osd.h>
#ifdef LoadImage
# undef LoadImage
add_shortcut( "logo" )
add_file( CFG_PREFIX "file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, false )
- add_integer( CFG_PREFIX "x", 0, NULL, POSX_TEXT, POSX_LONGTEXT, true )
- add_integer( CFG_PREFIX "y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, true )
+ add_integer( CFG_PREFIX "x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, true )
+ add_integer( CFG_PREFIX "y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, true )
/* default to 1000 ms per image, continuously cycle through them */
add_integer( CFG_PREFIX "delay", 1000, NULL, DELAY_TEXT, DELAY_LONGTEXT, true )
add_integer( CFG_PREFIX "repeat", -1, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, true )
return VLC_EGENERIC;
}
-
/* */
p_filter->p_sys = p_sys = malloc( sizeof( *p_sys ) );
if( !p_sys )
/* where to locate the logo: */
if( p_sys->i_pos < 0 )
{ /* set to an absolute xy */
- p_region->i_align = OSD_ALIGN_RIGHT | OSD_ALIGN_TOP;
+ p_region->i_align = SUBPICTURE_ALIGN_RIGHT | SUBPICTURE_ALIGN_TOP;
p_spu->b_absolute = true;
}
else
p_filter->fmt_in.video.i_width - i_logo_w );
p_sys->i_pos_y = __MIN( __MAX( p_sys->i_pos_y + i_dy, 0 ),
p_filter->fmt_in.video.i_height - i_logo_h );
+
+ /* object under mouse has moved */
+ var_SetBool( p_filter->p_parent, "mouse-object", true );
+ }
+ else if( b_over )
+ {
+ /* object under mouse stoped moving */
+ var_SetBool( p_filter->p_parent, "mouse-object", false );
}
if( p_sys->b_mouse_grab || b_over )
if( !p_image )
return NULL;
- picture_t *p_pic = image_ReadUrl( p_image, psz_filename, &fmt_in, &fmt_out );
+ char *psz_url = make_URI( psz_filename, NULL );
+ picture_t *p_pic = image_ReadUrl( p_image, psz_url, &fmt_in, &fmt_out );
+ free( psz_url );
image_HandlerDelete( p_image );
return p_pic;