var_Create( p_intf, "time-size", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "time-size", Other, NULL );
+ /* logo on the fly items */
+ var_Create( p_intf, "logo-x", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-x", Other, NULL );
+ var_Create( p_intf, "logo-y", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-y", Other, NULL );
+ var_Create( p_intf, "logo-position", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-position", Other, NULL );
+ var_Create( p_intf, "logo-transparency", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-transparency", Other, NULL );
+
+
var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "pause", Input, NULL );
var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
if (p_intf->p_sys->b_extend)
{
msg_rc(_("| marq-marquee STRING . . overlay STRING in video\n"));
- msg_rc(_("| marq-x X . . . . . offset of marquee, from left\n"));
- msg_rc(_("| marq-y Y . . . . . . offset of marquee, from top\n"));
+ msg_rc(_("| marq-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| marq-y Y . . . . . . . . . . . . offset from top\n"));
msg_rc(_("| marq-position #. . . .relative position control\n"));
- msg_rc(_("| marq-color # . . . . font color of marquee, RGB\n"));
- msg_rc(_("| marq-opacity # . . . . . . . .opacity of marquee\n"));
- msg_rc(_("| marq-timeout T. . . . timeout of marquee, in ms\n"));
- msg_rc(_("| marq-size # . . . font size of marquee, in pixels\n"));
+ msg_rc(_("| marq-color # . . . . . . . . . . font color, RGB\n"));
+ msg_rc(_("| marq-opacity # . . . . . . . . . . . . . opacity\n"));
+ msg_rc(_("| marq-timeout T. . . . . . . . . . timeout, in ms\n"));
+ msg_rc(_("| marq-size # . . . . . . . . font size, in pixels\n"));
msg_rc( "| \n");
msg_rc(_("| time-format STRING . . . overlay STRING in video\n"));
- msg_rc(_("| time-x X . . . . .offset of timestamp, from left\n"));
- msg_rc(_("| time-y Y . . . . . offset of timestamp, from top\n"));
- msg_rc(_("| time-position #. . . .relative position control\n"));
- msg_rc(_("| time-color # . . . font color of timestamp, RGB\n"));
- msg_rc(_("| time-opacity # . . . . . . .opacity of timestamp\n"));
- msg_rc(_("| time-size # . .font size of timestamp, in pixels\n"));
+ msg_rc(_("| time-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| time-y Y . . . . . . . . . . . . offset from top\n"));
+ msg_rc(_("| time-position #. . . . . . . . relative position\n"));
+ msg_rc(_("| time-color # . . . . . . . . . . font color, RGB\n"));
+ msg_rc(_("| time-opacity # . . . . . . . . . . . . . opacity\n"));
+ msg_rc(_("| time-size # . . . . . . . . font size, in pixels\n"));
+ msg_rc( "| \n");
+ msg_rc(_("| logo-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| logo-y Y . . . . . . . . . . . . offset from top\n"));
+ msg_rc(_("| logo-position #. . . . . . . . relative position\n"));
+ msg_rc(_("| logo-transparency #. . . . . . . . .transparency\n"));
msg_rc( "| \n");
}
msg_rc(_("| help . . . . . . . . . . . . . this help message\n"));
var_Set( p_inp->p_libvlc, "time-size", val );
}
}
+ else if( !strcmp( psz_cmd, "logo-x" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-x", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-y" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-y", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-position" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-position", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-transparency" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = strtol( newval.psz_string, NULL, 0 );
+ var_Set( p_inp->p_libvlc, "logo-transparency", val );
+ }
+ }
/*
* sanity check
#include "vlc_filter.h"
#include "filter_common.h"
#include "vlc_image.h"
+#include "osd.h"
#ifdef LoadImage
# undef LoadImage
add_file( "logo-file", NULL, NULL, FILE_TEXT, FILE_LONGTEXT, VLC_FALSE );
add_integer( "logo-x", -1, NULL, POSX_TEXT, POSX_LONGTEXT, VLC_FALSE );
- add_integer( "logo-y", -1, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_FALSE );
+ add_integer( "logo-y", 0, NULL, POSY_TEXT, POSY_LONGTEXT, VLC_FALSE );
add_integer_with_range( "logo-transparency", 255, 0, 255, NULL,
TRANS_TEXT, TRANS_LONGTEXT, VLC_FALSE );
add_integer( "logo-position", 6, NULL, POS_TEXT, POS_LONGTEXT, VLC_TRUE );
free( p_sys );
return VLC_EGENERIC;
}
-
+
p_sys->i_width = p_sys->p_pic->p[Y_PLANE].i_visible_pitch;
p_sys->i_height = p_sys->p_pic->p[Y_PLANE].i_visible_lines;
var_AddCallback( p_input->p_libvlc, "logo-transparency", LogoCallback, p_sys );
vlc_object_release( p_input );
- p_sys->b_absolute = VLC_TRUE;
- if( p_sys->posx < 0 || p_sys->posy < 0 )
- {
- p_sys->b_absolute = VLC_FALSE;
- p_sys->posx = 0; p_sys->posy = 0;
- }
-
p_sys->p_pic = LoadImage( p_this, p_sys->psz_filename );
if( !p_sys->p_pic )
{
}
vout_CopyPicture( p_filter, &p_region->picture, p_sys->p_pic );
- p_region->i_x = 0;
- p_region->i_y = 0;
- p_spu->i_x = p_sys->posx;
- p_spu->i_y = p_sys->posy;
- p_spu->i_flags = p_sys->pos;
+
+ /* where to locate the logo: */
+ if( p_sys->posx < 0 || p_sys->posy < 0 )
+ { /* set to one of the 9 relative locations */
+ p_spu->i_flags = p_sys->pos;
+ p_spu->i_x = 0;
+ p_spu->i_y = 0;
+ p_spu->b_absolute = VLC_FALSE;
+ }
+ else
+ { /* set to an absolute xy, referenced to upper left corner */
+ p_spu->i_flags = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
+ p_spu->i_x = p_sys->posx;
+ p_spu->i_y = p_sys->posy;
+ p_spu->b_absolute = VLC_TRUE;
+ }
+
p_spu->p_region = p_region;
p_spu->i_alpha = p_sys->i_trans;