var_Create( p_intf, "add", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "add", Playlist, NULL );
+ var_Create( p_intf, "repeat", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "repeat", Playlist, NULL );
+ var_Create( p_intf, "loop", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "loop", Playlist, NULL );
var_Create( p_intf, "enqueue", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "enqueue", Playlist, NULL );
var_Create( p_intf, "playlist", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-xoffset", Other, NULL );
var_Create( p_intf, "mosaic-yoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-yoffset", Other, NULL );
+ var_Create( p_intf, "mosaic-offsets", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "mosaic-offsets", Other, NULL );
var_Create( p_intf, "mosaic-align", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-align", Other, NULL );
var_Create( p_intf, "mosaic-vborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-keep-aspect-ratio", Other, NULL );
- /* time on the fly items */
- var_Create( p_intf, "time-format", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-format", Other, NULL );
- var_Create( p_intf, "time-x", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-x", Other, NULL );
- var_Create( p_intf, "time-y", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-y", Other, NULL );
- var_Create( p_intf, "time-position", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-position", Other, NULL );
- var_Create( p_intf, "time-color", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-color", Other, NULL );
- var_Create( p_intf, "time-opacity", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
- var_AddCallback( p_intf, "time-opacity", Other, NULL );
- 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-file", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "logo-file", Other, NULL );
msg_rc(_("| next . . . . . . . . . . . . next playlist item"));
msg_rc(_("| prev . . . . . . . . . . previous playlist item"));
msg_rc(_("| goto . . . . . . . . . . . . goto item at index"));
+ msg_rc(_("| repeat [on|off] . . toggle playlist item repeat"));
+ msg_rc(_("| loop [on|off] . . . . toggle playlist item loop"));
msg_rc(_("| clear . . . . . . . . . . . clear the playlist"));
msg_rc(_("| status . . . . . . . . . current playlist status"));
msg_rc(_("| title [X] . . . . set/get title in current item"));
msg_rc(_("| marq-timeout T. . . . . . . . . . timeout, in ms"));
msg_rc(_("| marq-size # . . . . . . . . font size, in pixels"));
msg_rc( "| ");
- msg_rc(_("| time-format STRING . . . overlay STRING in video"));
- msg_rc(_("| time-x X . . . . . . . . . . . .offset from left"));
- msg_rc(_("| time-y Y . . . . . . . . . . . . offset from top"));
- msg_rc(_("| time-position #. . . . . . . . relative position"));
- msg_rc(_("| time-color # . . . . . . . . . . font color, RGB"));
- msg_rc(_("| time-opacity # . . . . . . . . . . . . . opacity"));
- msg_rc(_("| time-size # . . . . . . . . font size, in pixels"));
- msg_rc( "| ");
msg_rc(_("| logo-file STRING . . .the overlay file path/name"));
msg_rc(_("| logo-x X . . . . . . . . . . . .offset from left"));
msg_rc(_("| logo-y Y . . . . . . . . . . . . offset from top"));
msg_rc(_("| mosaic-width # . . . . . . . . . . . . . . width"));
msg_rc(_("| mosaic-xoffset # . . . .top left corner position"));
msg_rc(_("| mosaic-yoffset # . . . .top left corner position"));
+ msg_rc(_("| mosaic-offsets x,y(,x,y)*. . . . list of offsets"));
msg_rc(_("| mosaic-align 0..2,4..6,8..10. . .mosaic alignment"));
msg_rc(_("| mosaic-vborder # . . . . . . . . vertical border"));
msg_rc(_("| mosaic-hborder # . . . . . . . horizontal border"));
static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
+ vlc_value_t val;
+
intf_thread_t *p_intf = (intf_thread_t*)p_this;
playlist_t *p_playlist = pl_Yield( p_this );
PL_LOCK;
if( p_playlist->p_input )
{
- vlc_value_t val;
var_Get( p_playlist->p_input, "state", &val );
if( ( val.i_int == PAUSE_S ) || ( val.i_int == PLAYLIST_PAUSED ) )
{
msg_Warn( p_playlist, "play" );
playlist_Play( p_playlist );
}
+ else if( !strcmp( psz_cmd, "repeat" ) )
+ {
+ vlc_bool_t b_update = VLC_TRUE;
+
+ var_Get( p_playlist, "repeat", &val );
+
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == VLC_TRUE ) ) ||
+ ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == VLC_FALSE ) ) )
+ {
+ b_update = VLC_FALSE;
+ }
+ }
+
+ if ( b_update )
+ {
+ val.b_bool = !val.b_bool;
+ var_Set( p_playlist, "repeat", val );
+ }
+ msg_rc( "Setting repeat to %d", val.b_bool );
+ }
+ else if( !strcmp( psz_cmd, "loop" ) )
+ {
+ vlc_bool_t b_update = VLC_TRUE;
+
+ var_Get( p_playlist, "loop", &val );
+
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ if ( ( !strncmp( newval.psz_string, "on", 2 ) && ( val.b_bool == VLC_TRUE ) ) ||
+ ( !strncmp( newval.psz_string, "off", 3 ) && ( val.b_bool == VLC_FALSE ) ) )
+ {
+ b_update = VLC_FALSE;
+ }
+ }
+
+ if ( b_update )
+ {
+ val.b_bool = !val.b_bool;
+ var_Set( p_playlist, "loop", val );
+ }
+ msg_rc( "Setting loop to %d", val.b_bool );
+ }
else if (!strcmp( psz_cmd, "goto" ) )
{
msg_rc( _("goto is deprecated" ) );
var_Set( p_input->p_libvlc_global, "mosaic-order", val );
}
}
- else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
+ else if( !strcmp( psz_cmd, "mosaic-offsets" ) )
{
if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = atoi( newval.psz_string );
- var_Set( p_input->p_libvlc_global, "mosaic-keep-aspect-ratio", val );
- }
- }
- else if( !strcmp( psz_cmd, "time-format" ) )
- {
- if( strlen( newval.psz_string ) > 0 )
{
val.psz_string = newval.psz_string;
- var_Set( p_input->p_libvlc_global, "time-format", val );
- }
- else
- {
- val.psz_string = "";
- var_Set( p_input->p_libvlc_global, "time-format", val);
- }
- }
- else if( !strcmp( psz_cmd, "time-x" ) )
- {
- if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = atoi( newval.psz_string );
- var_Set( p_input->p_libvlc_global, "time-x", val );
- }
- }
- else if( !strcmp( psz_cmd, "time-y" ) )
- {
- if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = atoi( newval.psz_string );
- var_Set( p_input->p_libvlc_global, "time-y", val );
- }
- }
- else if( !strcmp( psz_cmd, "time-position" ) )
- {
- if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = atoi( newval.psz_string );
- var_Set( p_input->p_libvlc_global, "time-position", val );
- }
- }
- else if( !strcmp( psz_cmd, "time-color" ) )
- {
- if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = strtol( newval.psz_string, NULL, 0 );
- var_Set( p_input->p_libvlc_global, "time-color", val );
+ var_Set( p_input->p_libvlc_global, "mosaic-offsets", val );
}
}
- else if( !strcmp( psz_cmd, "time-opacity" ) )
- {
- if( strlen( newval.psz_string ) > 0)
- {
- val.i_int = strtol( newval.psz_string, NULL, 0 );
- var_Set( p_input->p_libvlc_global, "time-opacity", val );
- }
- }
- else if( !strcmp( psz_cmd, "time-size" ) )
+ else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
{
if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
- var_Set( p_input->p_libvlc_global, "time-size", val );
+ var_Set( p_input->p_libvlc_global, "mosaic-keep-aspect-ratio", val );
}
}
else if( !strcmp( psz_cmd, "logo-file" ) )
/* Now create a playlist item */
if( psz_item_mrl )
{
- p_item = input_ItemNew( p_intf, psz_item_mrl, psz_item_mrl );
+ p_item = input_ItemNew( p_intf, psz_item_mrl, NULL );
for( i = 0; i < i_options; i++ )
{
input_ItemAddOption( p_item, ppsz_options[i] );