#include "http.h"
#include "vlc_url.h"
#include "vlc_meta.h"
+#include "vlc_strings.h"
static vlc_object_t *GetVLCObject( intf_thread_t *p_intf,
const char *psz_object,
vlc_object_t *p_object = NULL;
*pb_need_release = VLC_FALSE;
- if( !strcmp( psz_object, "VLC_OBJECT_ROOT" ) )
- i_object_type = VLC_OBJECT_ROOT;
- else if( !strcmp( psz_object, "VLC_OBJECT_VLC" ) )
- p_object = VLC_OBJECT(p_intf->p_vlc);
+ if( !strcmp( psz_object, "VLC_OBJECT_LIBVLC" ) )
+ p_object = VLC_OBJECT(p_intf->p_libvlc);
else if( !strcmp( psz_object, "VLC_OBJECT_INTF" ) )
p_object = VLC_OBJECT(p_intf);
else if( !strcmp( psz_object, "VLC_OBJECT_PLAYLIST" ) )
int i_id = E_(SSPopN)( st, vars );
int i_ret;
- i_ret = playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY,
+ i_ret = playlist_Control( p_sys->p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE,
NULL,
playlist_ItemGetById( p_sys->p_playlist,
- i_id ) );
+ i_id, VLC_TRUE ) );
msg_Dbg( p_intf, "requested playlist item: %i", i_id );
E_(SSPushN)( st, i_ret );
}
else if( !strcmp( s, "vlc_stop" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_STOP );
+ playlist_Control( p_sys->p_playlist, VLC_TRUE, PLAYLIST_STOP );
msg_Dbg( p_intf, "requested playlist stop" );
}
else if( !strcmp( s, "vlc_pause" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_PAUSE );
+ playlist_Control( p_sys->p_playlist, VLC_TRUE, PLAYLIST_PAUSE );
msg_Dbg( p_intf, "requested playlist pause" );
}
else if( !strcmp( s, "vlc_next" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, 1 );
+ playlist_Control( p_sys->p_playlist, VLC_TRUE, PLAYLIST_SKIP, 1 );
msg_Dbg( p_intf, "requested playlist next" );
}
else if( !strcmp( s, "vlc_previous" ) )
{
- playlist_Control( p_sys->p_playlist, PLAYLIST_SKIP, -1 );
+ playlist_Control( p_sys->p_playlist, VLC_TRUE, PLAYLIST_SKIP, -1 );
msg_Dbg( p_intf, "requested playlist previous" );
}
else if( !strcmp( s, "vlc_seek" ) )
{
char psz_value[20];
lldiv_t value = lldiv( val.f_float * 1000000, 1000000 );
- snprintf( psz_value, sizeof(psz_value), I64Fd".%06u",
+ snprintf( psz_value, sizeof(psz_value), "%lld.%06u",
value.quot, (unsigned int)value.rem );
E_(SSPush)( st, psz_value );
break;
char psz_string[20];
lldiv_t value = lldiv( config_GetFloat( p_intf, psz_variable )
* 1000000, 1000000 );
- snprintf( psz_string, sizeof(psz_string), I64Fd".%06u",
+ snprintf( psz_string, sizeof(psz_string), "%lld.%06u",
value.quot, (unsigned int)value.rem );
E_(SSPush)( st, psz_string );
break;
free( mrl );
mrl = tmp;
- if( !*psz_name )
- {
- p_input = E_(MRLParse)( p_intf, mrl, mrl );
- }
- else
- {
- p_input = E_(MRLParse)( p_intf, mrl, psz_name );
- }
+ p_input = E_(MRLParse)( p_intf, mrl, psz_name );
if( !p_input || !p_input->psz_uri || !*p_input->psz_uri )
{
}
else
{
- i_id = playlist_PlaylistAddInput( p_sys->p_playlist, p_input,
- PLAYLIST_APPEND, PLAYLIST_END );
+ i_id = playlist_AddInput( p_sys->p_playlist, p_input,
+ PLAYLIST_APPEND, PLAYLIST_END, VLC_TRUE,
+ VLC_FALSE);
msg_Dbg( p_intf, "requested mrl add: %s", mrl );
}
E_(SSPushN)( st, i_id );
}
else if( !strcmp( s, "playlist_empty" ) )
{
- playlist_LockClear( p_sys->p_playlist );
+ playlist_Clear( p_sys->p_playlist, VLC_FALSE );
msg_Dbg( p_intf, "requested playlist empty" );
}
else if( !strcmp( s, "playlist_delete" ) )
{
int i_id = E_(SSPopN)( st, vars );
- playlist_LockDelete( p_sys->p_playlist, i_id );
+ playlist_DeleteFromInput( p_sys->p_playlist, i_id, VLC_FALSE );
msg_Dbg( p_intf, "requested playlist delete: %d", i_id );
}
else if( !strcmp( s, "playlist_move" ) )
{
char *psz_meta = E_(SSPop)( st );
char *psz_val = NULL;
- if( p_sys->p_input && p_sys->p_input->input.p_item )
+ if( p_sys->p_input && input_GetItem(p_sys->p_input) )
{
-#define p_item p_sys->p_input->input.p_item
+#define p_item input_GetItem( p_sys->p_input )
if( !strcmp( psz_meta, "ARTIST" ) )
{
- psz_val = vlc_input_item_GetInfo( p_item,
+ psz_val = input_ItemGetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_ARTIST) );
}
else if( !strcmp( psz_meta, "TITLE" ) )
{
- psz_val = vlc_input_item_GetInfo( p_item,
+ psz_val = input_ItemGetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_TITLE) );
if( psz_val == NULL )
- psz_val == strdup( p_item->psz_name );
+ psz_val = strdup( p_item->psz_name );
}
else if( !strcmp( psz_meta, "ALBUM" ) )
{
- psz_val = vlc_input_item_GetInfo( p_item,
+ psz_val = input_ItemGetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_COLLECTION) );
}
else if( !strcmp( psz_meta, "GENRE" ) )
{
- psz_val = vlc_input_item_GetInfo( p_item,
+ psz_val = input_ItemGetInfo( p_item,
_(VLC_META_INFO_CAT), _(VLC_META_GENRE) );
}
else
{
- psz_val = vlc_input_item_GetInfo( p_item,
+ psz_val = input_ItemGetInfo( p_item,
_(VLC_META_INFO_CAT), psz_meta );
}
#undef p_item