Commit 857b51f9 authored by Clément Stenac's avatar Clément Stenac

Rename vlc_input_item_* functions to input_Item* for consistency

Add input_ItemAddOptionNoDup (unused at the moment)
+ free warning fix
parent 353ece46
......@@ -90,7 +90,7 @@ struct input_item_t
#define ITEM_TYPE_NODE 9
#define ITEM_TYPE_NUMBER 10
static inline void vlc_input_item_Init( vlc_object_t *p_o, input_item_t *p_i )
static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
{
memset( p_i, 0, sizeof(input_item_t) );
p_i->psz_name = 0;
......@@ -111,8 +111,8 @@ static inline void vlc_input_item_Init( vlc_object_t *p_o, input_item_t *p_i )
vlc_mutex_init( p_o, &p_i->lock );
}
static inline void vlc_input_item_CopyOptions( input_item_t *p_parent,
input_item_t *p_child )
static inline void input_ItemCopyOptions( input_item_t *p_parent,
input_item_t *p_child )
{
int i;
for( i = 0 ; i< p_parent->i_options; i++ )
......@@ -126,9 +126,10 @@ static inline void vlc_input_item_CopyOptions( input_item_t *p_parent,
}
}
VLC_EXPORT( void, vlc_input_item_AddOption, ( input_item_t *p_input, const char *psz_option ) );
VLC_EXPORT( void, input_ItemAddOption,( input_item_t *, const char * ) );
VLC_EXPORT( void, input_ItemAddOptionNoDup,( input_item_t *, const char * ) );
static inline void vlc_input_item_Clean( input_item_t *p_i )
static inline void input_ItemClean( input_item_t *p_i )
{
if( p_i->psz_name ) free( p_i->psz_name );
if( p_i->psz_uri ) free( p_i->psz_uri );
......@@ -180,8 +181,8 @@ static inline void vlc_input_item_Clean( input_item_t *p_i )
vlc_mutex_destroy( &p_i->lock );
}
VLC_EXPORT( char *, vlc_input_item_GetInfo, ( input_item_t *p_i, const char *psz_cat,const char *psz_name ) );
VLC_EXPORT(int, vlc_input_item_AddInfo, ( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) );
VLC_EXPORT( char *, input_ItemGetInfo, ( input_item_t *p_i, const char *psz_cat,const char *psz_name ) );
VLC_EXPORT(int, input_ItemAddInfo, ( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) );
#define input_ItemNew( a,b,c ) input_ItemNewExt( a, b, c, 0, NULL, -1 )
#define input_ItemNewExt(a,b,c,d,e,f) __input_ItemNewExt( VLC_OBJECT(a),b,c,d,e,f)
......
......@@ -223,8 +223,8 @@ struct module_symbols_t
void (*tls_ClientDelete_inner) (tls_session_t *);
image_handler_t * (*__image_HandlerCreate_inner) (vlc_object_t *);
void (*image_HandlerDelete_inner) (image_handler_t *);
char * (*vlc_input_item_GetInfo_inner) (input_item_t *p_i, const char *psz_cat,const char *psz_name);
int (*vlc_input_item_AddInfo_inner) (input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ...);
void *vlc_input_item_GetInfo_deprecated;
void *vlc_input_item_AddInfo_deprecated;
input_thread_t * (*__input_CreateThread_inner) (vlc_object_t *, input_item_t *);
int (*__input_Preparse_inner) (vlc_object_t *, input_item_t *);
void (*input_StopThread_inner) (input_thread_t *);
......@@ -502,7 +502,7 @@ struct module_symbols_t
playlist_item_t * (*__playlist_ItemNewFromInput_inner) (vlc_object_t *p_obj,input_item_t *p_input);
input_item_t * (*input_ItemGetById_inner) (playlist_t *, int);
int (*playlist_LiveSearchUpdate_inner) (playlist_t *, playlist_item_t *, const char *);
void (*vlc_input_item_AddOption_inner) (input_item_t *p_input, const char *psz_option);
void *vlc_input_item_AddOption_deprecated;
int (*playlist_DeleteFromInput_inner) (playlist_t *, int, playlist_item_t *, vlc_bool_t);
int (*playlist_DeleteAllFromInput_inner) (playlist_t *, int);
int (*playlist_LockDeleteAllFromInput_inner) (playlist_t *, int);
......@@ -539,6 +539,10 @@ struct module_symbols_t
void (*playlist_NodesPairCreate_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **, vlc_bool_t);
char * (*aout_VisualChange_inner) (vlc_object_t *, int);
int (*__input_SecondaryPreparse_inner) (vlc_object_t *, input_item_t *);
void (*input_ItemAddOption_inner) (input_item_t *, const char *);
char * (*input_ItemGetInfo_inner) (input_item_t *p_i, const char *psz_cat,const char *psz_name);
int (*input_ItemAddInfo_inner) (input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ...);
void (*input_ItemAddOptionNoDup_inner) (input_item_t *, const char *);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
......@@ -744,8 +748,6 @@ struct module_symbols_t
# define tls_ClientDelete (p_symbols)->tls_ClientDelete_inner
# define __image_HandlerCreate (p_symbols)->__image_HandlerCreate_inner
# define image_HandlerDelete (p_symbols)->image_HandlerDelete_inner
# define vlc_input_item_GetInfo (p_symbols)->vlc_input_item_GetInfo_inner
# define vlc_input_item_AddInfo (p_symbols)->vlc_input_item_AddInfo_inner
# define __input_CreateThread (p_symbols)->__input_CreateThread_inner
# define __input_Preparse (p_symbols)->__input_Preparse_inner
# define input_StopThread (p_symbols)->input_StopThread_inner
......@@ -982,7 +984,6 @@ struct module_symbols_t
# define __playlist_ItemNewFromInput (p_symbols)->__playlist_ItemNewFromInput_inner
# define input_ItemGetById (p_symbols)->input_ItemGetById_inner
# define playlist_LiveSearchUpdate (p_symbols)->playlist_LiveSearchUpdate_inner
# define vlc_input_item_AddOption (p_symbols)->vlc_input_item_AddOption_inner
# define playlist_DeleteFromInput (p_symbols)->playlist_DeleteFromInput_inner
# define playlist_DeleteAllFromInput (p_symbols)->playlist_DeleteAllFromInput_inner
# define playlist_LockDeleteAllFromInput (p_symbols)->playlist_LockDeleteAllFromInput_inner
......@@ -1012,6 +1013,10 @@ struct module_symbols_t
# define playlist_NodesPairCreate (p_symbols)->playlist_NodesPairCreate_inner
# define aout_VisualChange (p_symbols)->aout_VisualChange_inner
# define __input_SecondaryPreparse (p_symbols)->__input_SecondaryPreparse_inner
# define input_ItemAddOption (p_symbols)->input_ItemAddOption_inner
# define input_ItemGetInfo (p_symbols)->input_ItemGetInfo_inner
# define input_ItemAddInfo (p_symbols)->input_ItemAddInfo_inner
# define input_ItemAddOptionNoDup (p_symbols)->input_ItemAddOptionNoDup_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
......@@ -1220,8 +1225,6 @@ struct module_symbols_t
((p_symbols)->tls_ClientDelete_inner) = tls_ClientDelete; \
((p_symbols)->__image_HandlerCreate_inner) = __image_HandlerCreate; \
((p_symbols)->image_HandlerDelete_inner) = image_HandlerDelete; \
((p_symbols)->vlc_input_item_GetInfo_inner) = vlc_input_item_GetInfo; \
((p_symbols)->vlc_input_item_AddInfo_inner) = vlc_input_item_AddInfo; \
((p_symbols)->__input_CreateThread_inner) = __input_CreateThread; \
((p_symbols)->__input_Preparse_inner) = __input_Preparse; \
((p_symbols)->input_StopThread_inner) = input_StopThread; \
......@@ -1458,7 +1461,6 @@ struct module_symbols_t
((p_symbols)->__playlist_ItemNewFromInput_inner) = __playlist_ItemNewFromInput; \
((p_symbols)->input_ItemGetById_inner) = input_ItemGetById; \
((p_symbols)->playlist_LiveSearchUpdate_inner) = playlist_LiveSearchUpdate; \
((p_symbols)->vlc_input_item_AddOption_inner) = vlc_input_item_AddOption; \
((p_symbols)->playlist_DeleteFromInput_inner) = playlist_DeleteFromInput; \
((p_symbols)->playlist_DeleteAllFromInput_inner) = playlist_DeleteAllFromInput; \
((p_symbols)->playlist_LockDeleteAllFromInput_inner) = playlist_LockDeleteAllFromInput; \
......@@ -1488,7 +1490,13 @@ struct module_symbols_t
((p_symbols)->playlist_NodesPairCreate_inner) = playlist_NodesPairCreate; \
((p_symbols)->aout_VisualChange_inner) = aout_VisualChange; \
((p_symbols)->__input_SecondaryPreparse_inner) = __input_SecondaryPreparse; \
((p_symbols)->input_ItemAddOption_inner) = input_ItemAddOption; \
((p_symbols)->input_ItemGetInfo_inner) = input_ItemGetInfo; \
((p_symbols)->input_ItemAddInfo_inner) = input_ItemAddInfo; \
((p_symbols)->input_ItemAddOptionNoDup_inner) = input_ItemAddOptionNoDup; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->vlc_input_item_GetInfo_deprecated = NULL; \
(p_symbols)->vlc_input_item_AddInfo_deprecated = NULL; \
(p_symbols)->__playlist_ItemNew_deprecated = NULL; \
(p_symbols)->__playlist_ItemCopy_deprecated = NULL; \
(p_symbols)->playlist_ItemAddParent_deprecated = NULL; \
......@@ -1530,6 +1538,7 @@ struct module_symbols_t
(p_symbols)->playlist_PlaylistAdd_deprecated = NULL; \
(p_symbols)->playlist_PlaylistAddExt_deprecated = NULL; \
(p_symbols)->playlist_PlaylistAddInput_deprecated = NULL; \
(p_symbols)->vlc_input_item_AddOption_deprecated = NULL; \
(p_symbols)->__intf_UserOkayCancel_deprecated = NULL; \
(p_symbols)->playlist_NodesCreateForSD_deprecated = NULL; \
(p_symbols)->stats_TimerClean_deprecated = NULL; \
......
......@@ -469,9 +469,9 @@ static int GetTracks( access_t *p_access,
p_input_item = input_ItemNewWithType( VLC_OBJECT( p_playlist ),
psz_uri, psz_name, 0, NULL, -1,
ITEM_TYPE_DISC );
vlc_input_item_AddOption( p_input_item, psz_first );
vlc_input_item_AddOption( p_input_item, psz_last );
vlc_input_item_AddOption( p_input_item, psz_opt );
input_ItemAddOption( p_input_item, psz_first );
input_ItemAddOption( p_input_item, psz_last );
input_ItemAddOption( p_input_item, psz_opt );
#ifdef HAVE_LIBCDDB
/* If we have CDDB info, change the name */
......@@ -483,7 +483,7 @@ static int GetTracks( access_t *p_access,
{
if( cddb_track_get_title( t ) != NULL )
{
vlc_input_item_AddInfo( p_input_item, _(VLC_META_INFO_CAT),
input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT),
_(VLC_META_TITLE),
cddb_track_get_title( t ) );
if( p_input_item->psz_name )
......@@ -494,7 +494,7 @@ static int GetTracks( access_t *p_access,
psz_result = cddb_track_get_artist( t );
if( psz_result )
{
vlc_input_item_AddInfo( p_input_item, _(VLC_META_INFO_CAT),
input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT),
_(VLC_META_ARTIST), psz_result );
}
}
......
......@@ -812,7 +812,7 @@ CDDAFormatTitle( const access_t *p_access, track_t i_track )
#define add_playlist_track_info_str(TITLE, FIELD) \
if (FIELD && strlen(FIELD)) \
{ \
vlc_input_item_AddInfo( &p_item->input, _("Track"), _(TITLE), \
input_ItemAddInfo( &p_item->input, _("Track"), _(TITLE), \
"%s", FIELD); \
}
......@@ -859,7 +859,7 @@ int CDDAAddMetaToItem( access_t *p_access, cdda_data_t *p_cdda,
{
#if 0
add_playlist_track_info_str("Source", p_cdda->psz_source);
vlc_input_item_AddInfo( &p_item->input, _("Track"), _("Track Number"),
input_ItemAddInfo( &p_item->input, _("Track"), _("Track Number"),
"%d", i_track );
if (p_cdda->p_cdtext[i_track])
......
......@@ -619,7 +619,7 @@ static void ParseVorbisComments( decoder_t *p_dec )
{
vlc_meta_SetArtist( p_input->input.p_item->p_meta,
psz_value );
vlc_input_item_AddInfo( p_input->input.p_item,
input_ItemAddInfo( p_input->input.p_item,
_(VLC_META_INFO_CAT), _(VLC_META_ARTIST),
"%s", psz_value );
}
......
......@@ -981,29 +981,29 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
#define p_item p_sys->p_input->input.p_item
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 );
}
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
......
......@@ -902,7 +902,7 @@ input_item_t *E_(MRLParse)( intf_thread_t *p_intf, char *_psz,
{
s_temp = s_mrl + strlen( s_mrl );
}
vlc_input_item_AddOption( p_input, s_mrl );
input_ItemAddOption( p_input, s_mrl );
s_mrl = s_temp;
}
......
......@@ -2367,7 +2367,7 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
p_item = input_ItemNew( p_intf, psz_item_mrl, psz_item_mrl );
for( i = 0; i < i_options; i++ )
{
vlc_input_item_AddOption( p_item, ppsz_options[i] );
input_ItemAddOption( p_item, ppsz_options[i] );
}
}
......
......@@ -414,7 +414,7 @@ static int Open( vlc_object_t * p_this )
msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
p_input = input_ItemNewExt( p_playlist, psz_ref, NULL,
0, NULL, -1 );
vlc_input_item_CopyOptions( p_current->p_input, p_input );
input_ItemCopyOptions( p_current->p_input, p_input );
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category, VLC_FALSE, PLAYLIST_APPEND );
}
......
......@@ -353,7 +353,7 @@ static int Demux( demux_t *p_demux )
memcpy( psz_string, psz_backup, i_strlen );
psz_string[i_strlen] = '\0';
p_input = input_ItemNew( p_playlist, psz_string, psz_title_asx );
vlc_input_item_CopyOptions( p_current->p_input, p_input );
input_ItemCopyOptions( p_current->p_input, p_input );
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category, (i_parent_id > 0 )? VLC_TRUE : VLC_FALSE,
PLAYLIST_APPEND );
......@@ -426,7 +426,7 @@ static int Demux( demux_t *p_demux )
p_entry = input_ItemNew( p_playlist, psz_string, psz_name );
FREENULL( psz_name );
vlc_input_item_CopyOptions( p_current->p_input, p_entry );
input_ItemCopyOptions( p_current->p_input, p_entry );
p_entry->p_meta = vlc_meta_New();
if( psz_title_entry ) vlc_meta_SetTitle( p_entry->p_meta, psz_title_entry );
if( psz_author_entry ) vlc_meta_SetAuthor( p_entry->p_meta, psz_author_entry );
......
......@@ -115,7 +115,7 @@ static int Demux( demux_t *p_demux )
for( i = 0; i< i_options; i++ )
{
EnsureUTF8( ppsz_options[i] );
vlc_input_item_AddOption( p_input, ppsz_options[i] );
input_ItemAddOption( p_input, ppsz_options[i] );
}
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category,
......
......@@ -189,7 +189,7 @@ static int Demux( demux_t *p_demux )
{
p_input = input_ItemNewExt( p_sys->p_playlist,
psz_url, psz_title, 0, NULL, -1 );
#define SADD_INFO( type, field ) if( field ) { vlc_input_item_AddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
p_input, _("Google Video"), _(type), "%s", field ) ; }
SADD_INFO( "gvp_version", psz_version );
SADD_INFO( "docid", psz_docid );
......
......@@ -170,7 +170,7 @@ static int Demux( demux_t *p_demux )
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
i_options, ppsz_options, i_duration );
if ( psz_artist && *psz_artist )
vlc_input_item_AddInfo( p_input, _(VLC_META_INFO_CAT),
input_ItemAddInfo( p_input, _(VLC_META_INFO_CAT),
_(VLC_META_ARTIST), "%s", psz_artist );
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category, (i_parent_id > 0 )? VLC_TRUE : VLC_FALSE,
......
......@@ -185,7 +185,7 @@ void E_(AddToPlaylist)( demux_t *p_demux, playlist_t *p_playlist,
playlist_BothAddInput( p_playlist, p_input, p_item,
PLAYLIST_APPEND, PLAYLIST_END );
}
vlc_input_item_CopyOptions( p_item->p_input, p_input );
input_ItemCopyOptions( p_item->p_input, p_input );
}
......
......@@ -154,7 +154,7 @@ static int Demux( demux_t *p_demux )
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
0, NULL, -1 );
vlc_input_item_CopyOptions( p_current->p_input, p_input );
input_ItemCopyOptions( p_current->p_input, p_input );
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category, (i_parent_id > 0 ) ?
VLC_TRUE: VLC_FALSE, PLAYLIST_APPEND );
......@@ -211,7 +211,7 @@ static int Demux( demux_t *p_demux )
if( psz_mrl )
{
p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,0, NULL, -1 );
vlc_input_item_CopyOptions( p_current->p_input, p_input );
input_ItemCopyOptions( p_current->p_input, p_input );
playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
p_item_in_category, (i_parent_id > 0 ) ?
VLC_TRUE: VLC_FALSE, PLAYLIST_APPEND );
......
......@@ -234,7 +234,7 @@ static int Demux( demux_t *p_demux )
#define ADD_GINFO( info, name ) \
else if( !b_item && !b_image && !strcmp( psz_elname, name ) ) \
{ \
vlc_input_item_AddInfo( p_current->p_input, _("Podcast Info"), \
input_ItemAddInfo( p_current->p_input, _("Podcast Info"), \
_( info ), "%s", psz_text ); \
}
ADD_GINFO( "Podcast Link", "link" )
......@@ -247,7 +247,7 @@ static int Demux( demux_t *p_demux )
&& ( !strcmp( psz_elname, "itunes:summary" )
||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */
vlc_input_item_AddInfo( p_current->p_input,
input_ItemAddInfo( p_current->p_input,
_( "Podcast Info" ), _( "Podcast Summary" ),
"%s", psz_text );
}
......@@ -272,7 +272,7 @@ static int Demux( demux_t *p_demux )
psz_item_name, 0, NULL, -1 );
if( p_input == NULL ) break;
#define ADD_INFO( info, field ) \
if( field ) { vlc_input_item_AddInfo( p_input, \
if( field ) { input_ItemAddInfo( p_input, \
_( "Podcast Info" ), _( info ), "%s", field ); }
ADD_INFO( "Podcast Publication Date", psz_item_date );
ADD_INFO( "Podcast Author", psz_item_author );
......@@ -284,7 +284,7 @@ static int Demux( demux_t *p_demux )
ADD_INFO( "Podcast Type", psz_item_type );
if( psz_item_size )
{
vlc_input_item_AddInfo( p_input,
input_ItemAddInfo( p_input,
_( "Podcast Info" ),
_( "Podcast Size" ),
"%s bytes",
......
......@@ -357,7 +357,7 @@ static int Demux( demux_t *p_demux )
{
p_input = input_ItemNewExt( p_sys->p_playlist,
psz_src, psz_moviename, 0, NULL, -1 );
#define SADD_INFO( type, field ) if( field ) { vlc_input_item_AddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
p_input, "QuickTime Media Link", _(type), "%s", field ) ; }
SADD_INFO( "href", psz_href );
SADD_INFO( "mime type", psz_mimetype );
......
......@@ -381,27 +381,27 @@ static int Demux ( demux_t *p_demux )
return VLC_EGENERIC;
}
vlc_input_item_CopyOptions( p_current->p_input, p_child );
input_ItemCopyOptions( p_current->p_input, p_child );
if( p_sys->i_packet_size && p_sys->psz_mcast_ip )
{
char *psz_option;
p_sys->i_packet_size += 1000;
asprintf( &psz_option, "mtu=%i", p_sys->i_packet_size );
vlc_input_item_AddOption( p_child, psz_option );
input_ItemAddOption( p_child, psz_option );
free( psz_option );
}
if( !p_sys->psz_mcast_ip )
{
char *psz_option;
asprintf( &psz_option, "rtsp-caching=5000" );
vlc_input_item_AddOption( p_child, psz_option );
input_ItemAddOption( p_child, psz_option );
free( psz_option );
}
if( !p_sys->psz_mcast_ip && p_sys->b_rtsp_kasenna )
{
char *psz_option;
asprintf( &psz_option, "rtsp-kasenna" );
vlc_input_item_AddOption( p_child, psz_option );
input_ItemAddOption( p_child, psz_option );
free( psz_option );
}
......
......@@ -239,7 +239,7 @@ static int DemuxGenre( demux_t *p_demux )
psz_name );
p_input = input_ItemNewExt( p_sys->p_playlist, psz_mrl,
psz_name, 0, NULL, -1 );
vlc_input_item_CopyOptions( p_sys->p_current->p_input,
input_ItemCopyOptions( p_sys->p_current->p_input,
p_input );
free( psz_mrl );
playlist_AddWhereverNeeded( p_sys->p_playlist, p_input,
......@@ -417,10 +417,10 @@ static int DemuxStation( demux_t *p_demux )
psz_name , 0, NULL, -1 );
free( psz_mrl );
vlc_input_item_CopyOptions( p_sys->p_current->p_input,
input_ItemCopyOptions( p_sys->p_current->p_input,
p_input );
#define SADD_INFO( type, field ) if( field ) { vlc_input_item_AddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
p_input, _("Shoutcast"), _(type), "%s", field ) ; }
SADD_INFO( "Mime type", psz_mt );
SADD_INFO( "Bitrate", psz_br );
......
......@@ -524,7 +524,7 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
NULL, 0, NULL, -1 );
p_new_input->p_meta = vlc_meta_New();
free( psz_uri );
vlc_input_item_CopyOptions( p_item->p_input, p_new_input );
input_ItemCopyOptions( p_item->p_input, p_new_input );
psz_uri = NULL;
FREE_ATT();
p_handler = NULL;
......
......@@ -971,7 +971,7 @@ NSLog( @"expandable" );
{
for( i = 0; i < (int)[o_options count]; i++ )
{
vlc_input_item_AddOption( p_input, strdup( [[o_options objectAtIndex:i] UTF8String] ) );
input_ItemAddOption( p_input, strdup( [[o_options objectAtIndex:i] UTF8String] ) );
}
}
......@@ -1089,7 +1089,7 @@ NSLog( @"expandable" );
vlc_mutex_lock( &p_playlist->object_lock );
o_current_name = [NSString stringWithUTF8String:
p_item->pp_children[i_current]->p_input->psz_name];
psz_temp = vlc_input_item_GetInfo( p_item->p_input ,
psz_temp = input_ItemGetInfo( p_item->p_input ,
_("Meta-information"),_("Artist") );
o_current_author = [NSString stringWithUTF8String: psz_temp];
free( psz_temp);
......
......@@ -1291,13 +1291,13 @@ static VLCWizard *_o_sharedInstance = nil;
[[[o_userSelections objectForKey:@"pathToStrm"] \
objectAtIndex:x] UTF8String], \
[tempString UTF8String] );
vlc_input_item_AddOption( p_input, [[[o_userSelections \
input_ItemAddOption( p_input, [[[o_userSelections \
objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
if(! [[o_userSelections objectForKey:@"partExtractFrom"] \
isEqualToString:@""] )
{
vlc_input_item_AddOption( p_input, [[NSString \
input_ItemAddOption( p_input, [[NSString \
stringWithFormat: @"start-time=%@", [o_userSelections \
objectForKey: @"partExtractFrom"]] UTF8String] );
}
......@@ -1305,12 +1305,12 @@ static VLCWizard *_o_sharedInstance = nil;
if(! [[o_userSelections objectForKey:@"partExtractTo"] \
isEqualToString:@""] )
{
vlc_input_item_AddOption( p_input, [[NSString \
input_ItemAddOption( p_input, [[NSString \
stringWithFormat: @"stop-time=%@", [o_userSelections \
objectForKey: @"partExtractTo"]] UTF8String] );
}
vlc_input_item_AddOption( p_input, [[NSString stringWithFormat: \
input_ItemAddOption( p_input, [[NSString stringWithFormat: \
@"ttl=%@", [o_userSelections objectForKey:@"ttl"]] \
UTF8String] );
......
......@@ -670,7 +670,7 @@ void Playlist::UpdateItem( int i )
ListView_SetItemText( hListView, i, 0, _FROMMB(p_item->input.psz_name) );
ListView_SetItemText( hListView, i, 1,
_FROMMB( vlc_input_item_GetInfo( &p_item->input,
_FROMMB( input_ItemGetInfo( &p_item->input,
_("General") , _("Author") ) ) );
char psz_duration[MSTRTIME_MAX_SIZE];
......
......@@ -1177,7 +1177,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
((const char *)mrl[i + 1].mb_str())[0] == ':' )
{
psz_utf8 = wxFromLocale( mrl[i + 1] );
vlc_input_item_AddOption( p_input, psz_utf8 );
input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
i++;
}
......@@ -1188,7 +1188,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
for( int j = 0; j < (int)subsfile_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( subsfile_mrl[j] );
vlc_input_item_AddOption( p_input, psz_utf8 );
input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
}
}
......@@ -1199,7 +1199,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
for( int j = 0; j < (int)sout_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( sout_mrl[j] );
vlc_input_item_AddOption( p_input, psz_utf8 );
input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
}
}
......
......@@ -1635,23 +1635,23 @@ void WizardDialog::Run()
{
input_item_t *p_input = input_ItemNew( p_playlist, mrl,
ITEM_NAME );
vlc_input_item_AddOption( p_input, psz_opt );
input_ItemAddOption( p_input, psz_opt );
if( i_from != 0)
{
char psz_from[20];
snprintf( psz_from, 20, "start-time=%i", i_from);
vlc_input_item_AddOption( p_input, psz_from );
input_ItemAddOption( p_input, psz_from );
}
if( i_to != 0)
{
char psz_to[20];
snprintf( psz_to, 20, "stop-time=%i", i_to);
vlc_input_item_AddOption( p_input, psz_to );
input_ItemAddOption( p_input, psz_to );
}
char psz_ttl[20];
snprintf( psz_ttl, 20, "ttl=%i",i_ttl );
vlc_input_item_AddOption( p_input, psz_ttl );
input_ItemAddOption( p_input, psz_ttl );
playlist_PlaylistAddInput( p_playlist, p_input,
PLAYLIST_GO, PLAYLIST_END );
......
......@@ -611,9 +611,9 @@ static void ProcessHost( services_discovery_t *p_sd, dhost_t *p_host )
p_host->p_songs[i].id );
p_item = playlist_ItemNew( p_sd, psz_buff,
p_host->p_songs[i].itemname );
vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
input_ItemAddInfo( &p_item->input, _(VLC_META_INFO_CAT),
_(VLC_META_ARTIST), p_host->p_songs[i].songartist );
vlc_input_item_AddInfo( &p_item->input, _(VLC_META_INFO_CAT),
input_ItemAddInfo( &p_item->input, _(VLC_META_INFO_CAT),
_(VLC_META_COLLECTION), p_host->p_songs[i].songalbum );
playlist_NodeAddItem( p_playlist, p_item, VIEW_CATEGORY,
......
......@@ -167,7 +167,7 @@ static int Open( vlc_object_t *p_this )
asprintf( &psz_buf, "%s", p_sys->ppsz_urls[i] );
p_input = input_ItemNewExt( p_playlist, psz_buf,
p_sys->ppsz_urls[i], 0, NULL, -1 );
vlc_input_item_AddOption( p_input, "demux=podcast" );
input_ItemAddOption( p_input, "demux=podcast" );
p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_cat,
PLAYLIST_APPEND, PLAYLIST_END );
p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_one,
......
......@@ -817,16 +817,16 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
}
if( p_sys->b_timeshift )
vlc_input_item_AddOption( p_input, ":access-filter=timeshift" );
input_ItemAddOption( p_input, ":access-filter=timeshift" );
psz_value = GetAttribute( p_sap->p_sdp, "tool" );
if( psz_value != NULL )
{
vlc_input_item_AddInfo( p_input, _("Session"),_("Tool"), psz_value );
input_ItemAddInfo( p_input, _("Session"),_("Tool"), psz_value );
}
if( strcmp( p_sdp->psz_username, "-" ) )
{
vlc_input_item_AddInfo( p_input, _("Session"),
input_ItemAddInfo( p_input, _("Session"),
_("User"), p_sdp->psz_username );
}
......
......@@ -141,7 +141,7 @@ static int Open( vlc_object_t *p_this, int i_type )
0, NULL, -1 );
break;
}
vlc_input_item_AddOption( p_sys->p_input, "no-playlist-autostart" );
input_ItemAddOption( p_sys->p_input, "no-playlist-autostart" );
p_sys->p_input->b_prefers_tree = VLC_TRUE;
p_sys->p_node_cat = playlist_NodeAddInput( p_playlist, p_sys->p_input,
p_playlist->p_root_category,
......
......@@ -249,7 +249,7 @@ mediacontrol_start( mediacontrol_Instance *self,
/* Set start time */
snprintf( psz_from, 20, "start-time=%i", i_from );
vlc_input_item_AddOption( p_playlist->status.p_item->p_input, psz_from );
input_ItemAddOption( p_playlist->status.p_item->p_input, psz_from );