Commit d11fd0d1 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

codecleanup: Replace input_Item by input_item.

parent 7f2fcb75
......@@ -103,7 +103,7 @@ struct input_item_t
#define ITEM_TYPE_NODE 8
#define ITEM_TYPE_NUMBER 9
static inline void input_ItemCopyOptions( input_item_t *p_parent,
static inline void input_item_CopyOptions( input_item_t *p_parent,
input_item_t *p_child )
{
int i;
......@@ -137,7 +137,7 @@ static inline void input_item_SetName( input_item_t *p_item, const char *psz_nam
* Like the playlist, that there is a new sub item. With this design
* It is not the input item's responsability to keep all the ref of
* the input item children. */
static inline void input_ItemAddSubItem( input_item_t *p_parent,
static inline void input_item_AddSubItem( input_item_t *p_parent,
input_item_t *p_child )
{
vlc_event_t event;
......@@ -150,22 +150,22 @@ static inline void input_ItemAddSubItem( input_item_t *p_parent,
vlc_event_send( &p_parent->event_manager, &event );
}
/* Flags handled past input_ItemAddOpt() */
/* Flags handled past input_item_AddOpt() */
#define VLC_INPUT_OPTION_TRUSTED 0x2
/* Flags handled within input_ItemAddOpt() */
/* Flags handled within input_item_AddOpt() */
#define VLC_INPUT_OPTION_UNIQUE 0x100
VLC_EXPORT( int, input_ItemAddOpt, ( input_item_t *, const char *str, unsigned flags ) );
VLC_EXPORT( int, input_item_AddOpt, ( input_item_t *, const char *str, unsigned flags ) );
static inline
int input_ItemAddOption (input_item_t *item, const char *str)
int input_item_AddOption (input_item_t *item, const char *str)
{
return input_ItemAddOpt (item, str, VLC_INPUT_OPTION_TRUSTED);
return input_item_AddOpt (item, str, VLC_INPUT_OPTION_TRUSTED);
}
static inline
int input_ItemHasErrorWhenReading (input_item_t *item)
int input_item_HasErrorWhenReading (input_item_t *item)
{
return item->b_error_when_reading;
}
......@@ -325,16 +325,16 @@ static inline void input_item_MetaMerge( input_item_t *p_i, const vlc_meta_t * p
#define input_item_GetTrackID( item ) input_item_GetMeta( item, vlc_meta_TrackID )
#define input_item_GetSetting( item ) input_item_GetMeta( item, vlc_meta_Setting )
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, ... ) LIBVLC_FORMAT( 4, 5 ) );
VLC_EXPORT( char *, input_item_GetInfo, ( input_item_t *p_i, const char *psz_cat,const char *psz_name ) );
VLC_EXPORT(int, input_item_AddInfo, ( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) LIBVLC_FORMAT( 4, 5 ) );
#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)
VLC_EXPORT( input_item_t *, __input_ItemNewExt, (vlc_object_t *, const char *, const char*, int, const char *const *, mtime_t i_duration ) );
VLC_EXPORT( input_item_t *, input_ItemNewWithType, ( vlc_object_t *, const char *, const char *e, int, const char *const *, mtime_t i_duration, int ) );
#define input_item_New( a,b,c ) input_item_NewExt( a, b, c, 0, NULL, -1 )
#define input_item_NewExt(a,b,c,d,e,f) __input_item_NewExt( VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT( input_item_t *, __input_item_NewExt, (vlc_object_t *, const char *, const char*, int, const char *const *, mtime_t i_duration ) );
VLC_EXPORT( input_item_t *, input_item_NewWithType, ( vlc_object_t *, const char *, const char *e, int, const char *const *, mtime_t i_duration, int ) );
#define input_ItemGetById(a,b) __input_ItemGetById( VLC_OBJECT(a),b )
VLC_EXPORT( input_item_t *, __input_ItemGetById, (vlc_object_t *, int ) );
#define input_item_GetById(a,b) __input_item_GetById( VLC_OBJECT(a),b )
VLC_EXPORT( input_item_t *, __input_item_GetById, (vlc_object_t *, int ) );
/*****************************************************************************
* Meta data helpers
......
......@@ -409,7 +409,7 @@ static inline int playlist_Import( playlist_t *p_playlist, const char *psz_file)
input_item_t *p_input;
snprintf( psz_uri, 256+9, "file/://%s", psz_file );
const char *const psz_option = "meta-file";
p_input = input_ItemNewExt( p_playlist, psz_uri, psz_file,
p_input = input_item_NewExt( p_playlist, psz_uri, psz_file,
1, &psz_option, -1 );
playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END,
true, false );
......
......@@ -467,12 +467,12 @@ static int GetTracks( access_t *p_access,
psz_name = NULL;
/* Create playlist items */
p_input_item = input_ItemNewWithType( VLC_OBJECT( p_playlist ),
p_input_item = input_item_NewWithType( VLC_OBJECT( p_playlist ),
psz_uri, psz_name, 0, NULL, -1,
ITEM_TYPE_DISC );
input_ItemAddOption( p_input_item, psz_first );
input_ItemAddOption( p_input_item, psz_last );
input_ItemAddOption( p_input_item, psz_opt );
input_item_AddOption( p_input_item, psz_first );
input_item_AddOption( p_input_item, psz_last );
input_item_AddOption( p_input_item, psz_opt );
#ifdef HAVE_LIBCDDB
/* If we have CDDB info, change the name */
......
......@@ -530,13 +530,13 @@ static int ReadDir( access_t *p_access, playlist_t *p_playlist,
memmove (psz_uri + 7, psz_uri, sizeof (psz_uri) - 7);
memcpy (psz_uri, "file://", 7);
p_input = input_ItemNewWithType( p_playlist,
p_input = input_item_NewWithType( p_playlist,
psz_uri, entry, 0, NULL,
-1, ITEM_TYPE_FILE );
if (p_input != NULL)
{
if( p_current_input )
input_ItemCopyOptions( p_current_input, p_input );
input_item_CopyOptions( p_current_input, p_input );
assert( p_parent_category );
int i_ret = playlist_BothAddInput( p_playlist, p_input,
p_parent_category,
......
......@@ -188,8 +188,8 @@ int MMSHOpen( access_t *p_access )
input_thread_t * p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
input_item_t * p_new_loc;
/** \bug we do not autodelete here */
p_new_loc = input_ItemNew( p_access, psz_location, psz_location );
input_ItemAddSubItem( input_GetItem( p_input ), p_new_loc );
p_new_loc = input_item_New( p_access, psz_location, psz_location );
input_item_AddSubItem( input_GetItem( p_input ), p_new_loc );
vlc_object_release( p_input );
free( psz_location );
......
......@@ -848,7 +848,7 @@ input_item_t *MRLParse( intf_thread_t *p_intf, char *_psz,
s_temp = s_mrl + strlen( s_mrl );
}
p_input = input_ItemNew( p_intf, s_mrl, psz_name );
p_input = input_item_New( p_intf, s_mrl, psz_name );
s_mrl = s_temp;
/* now we can take care of the options */
......@@ -861,7 +861,7 @@ input_item_t *MRLParse( intf_thread_t *p_intf, char *_psz,
{
s_temp = s_mrl + strlen( s_mrl );
}
input_ItemAddOption( p_input, s_mrl );
input_item_AddOption( p_input, s_mrl );
s_mrl = s_temp;
}
......
......@@ -2222,10 +2222,10 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
/* Now create a playlist item */
if( psz_item_mrl )
{
p_item = input_ItemNew( p_intf, psz_item_mrl, NULL );
p_item = input_item_New( p_intf, psz_item_mrl, NULL );
for( i = 0; i < i_options; i++ )
{
input_ItemAddOption( p_item, ppsz_options[i] );
input_item_AddOption( p_item, ppsz_options[i] );
}
}
......
......@@ -417,10 +417,10 @@ static int Open( vlc_object_t * p_this )
}
input_item_t *p_input;
msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
p_input = input_ItemNewExt( p_demux, psz_ref, NULL,
p_input = input_item_NewExt( p_demux, psz_ref, NULL,
0, NULL, -1 );
input_ItemCopyOptions( p_current, p_input );
input_ItemAddSubItem( p_current, p_input );
input_item_CopyOptions( p_current, p_input );
input_item_AddSubItem( p_current, p_input );
vlc_gc_decref( p_input );
}
else
......
......@@ -459,9 +459,9 @@ static int Demux( demux_t *p_demux )
psz_string = malloc( i_strlen*sizeof( char ) +1);
memcpy( psz_string, psz_backup, i_strlen );
psz_string[i_strlen] = '\0';
p_input = input_ItemNew( p_demux, psz_string, psz_title_asx );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
p_input = input_item_New( p_demux, psz_string, psz_title_asx );
input_item_CopyOptions( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
free( psz_string );
}
else continue;
......@@ -516,9 +516,9 @@ static int Demux( demux_t *p_demux )
/* create the new entry */
asprintf( &psz_name, "%d %s", i_entry_count, ( psz_title_entry ? psz_title_entry : p_current_input->psz_name ) );
p_entry = input_ItemNewExt( p_demux, psz_href, psz_name, i_options, (const char * const *)ppsz_options, -1 );
p_entry = input_item_NewExt( p_demux, psz_href, psz_name, i_options, (const char * const *)ppsz_options, -1 );
FREENULL( psz_name );
input_ItemCopyOptions( p_current_input, p_entry );
input_item_CopyOptions( p_current_input, p_entry );
while( i_options )
{
psz_name = ppsz_options[--i_options];
......@@ -530,7 +530,7 @@ static int Demux( demux_t *p_demux )
if( psz_copyright_entry ) input_item_SetCopyright( p_entry, psz_copyright_entry );
if( psz_moreinfo_entry ) input_item_SetURL( p_entry, psz_moreinfo_entry );
if( psz_abstract_entry ) input_item_SetDescription( p_entry, psz_abstract_entry );
input_ItemAddSubItem( p_current_input, p_entry );
input_item_AddSubItem( p_current_input, p_entry );
vlc_gc_decref( p_entry );
}
......
......@@ -256,7 +256,7 @@ static int Demux( demux_t *p_demux )
if( !psz_elname ) return -1;
if( !strcmp( psz_elname, "entry" ) )
{
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
0, NULL, -1 );
if( psz_now )
input_item_SetNowPlaying( p_input, psz_now );
......@@ -267,7 +267,7 @@ static int Demux( demux_t *p_demux )
if( psz_bitrate )
msg_Err( p_demux, "Unsupported meta bitrate" );
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
FREENULL( psz_mrl );
......
......@@ -117,13 +117,13 @@ static int Demux( demux_t *p_demux )
EnsureUTF8( psz_name );
p_input = input_ItemNewExt( p_demux, "dvb://", psz_name, 0, NULL, -1 );
p_input = input_item_NewExt( p_demux, "dvb://", psz_name, 0, NULL, -1 );
for( i = 0; i< i_options; i++ )
{
EnsureUTF8( ppsz_options[i] );
input_ItemAddOption( p_input, ppsz_options[i] );
input_item_AddOption( p_input, ppsz_options[i] );
}
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
while( i_options-- ) free( ppsz_options[i_options] );
free( ppsz_options );
......
......@@ -201,14 +201,14 @@ static int Demux( demux_t *p_demux )
}
else
{
p_input = input_ItemNewExt( p_demux,
p_input = input_item_NewExt( p_demux,
psz_url, psz_title, 0, NULL, -1 );
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, _("Google Video"), _(type), "%s", field ) ; }
SADD_INFO( "gvp_version", psz_version );
SADD_INFO( "docid", psz_docid );
SADD_INFO( "description", psz_description );
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
......
......@@ -95,8 +95,8 @@ static int Demux( demux_t *p_demux )
psz_url = (char *)malloc( len+1 );
snprintf( psz_url, len+1, "dvd://%s", p_demux->psz_path );
p_input = input_ItemNewExt( p_demux, psz_url, psz_url, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
p_input = input_item_NewExt( p_demux, psz_url, psz_url, 0, NULL, -1 );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
HANDLE_PLAY_AND_RELEASE;
......
......@@ -380,9 +380,9 @@ static bool parse_track_dict COMPLEX_INTERFACE
memmove( psz_uri + 7, psz_uri + 17, strlen( psz_uri ) - 9 );
msg_Info( p_demux, "Adding '%s'", psz_uri );
p_new_input = input_ItemNewExt( p_demux, psz_uri,
p_new_input = input_item_NewExt( p_demux, psz_uri,
NULL, 0, NULL, -1 );
input_ItemAddSubItem( p_input_item, p_new_input );
input_item_AddSubItem( p_input_item, p_new_input );
/* add meta info */
add_meta( p_new_input, p_track );
......
......@@ -217,15 +217,15 @@ static int Demux( demux_t *p_demux )
b_cleanup = true;
if( !psz_mrl ) goto error;
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
0, NULL, i_duration );
if ( psz_artist && *psz_artist )
input_item_SetArtist( p_input, psz_artist );
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
for( int i = 0; i < i_options; i++ )
input_ItemAddOpt( p_input, ppsz_options[i], 0 );
input_item_AddOpt( p_input, ppsz_options[i], 0 );
vlc_gc_decref( p_input );
free( psz_mrl );
}
......
......@@ -159,10 +159,10 @@ static int Demux( demux_t *p_demux )
{
if( psz_mrl )
{
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
input_item_CopyOptions( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
else
......@@ -215,9 +215,9 @@ static int Demux( demux_t *p_demux )
/* Add last object */
if( psz_mrl )
{
p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,0, NULL, -1 );
input_ItemCopyOptions( p_current_input, p_input );
input_ItemAddSubItem( p_current_input, p_input );
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,0, NULL, -1 );
input_item_CopyOptions( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
free( psz_mrl_orig );
psz_mrl = NULL;
......
......@@ -233,7 +233,7 @@ static int Demux( demux_t *p_demux )
#define ADD_GINFO( info, name ) \
else if( !b_item && !b_image && !strcmp( psz_elname, name ) ) \
{ \
input_ItemAddInfo( p_current_input, _("Podcast Info"), \
input_item_AddInfo( p_current_input, _("Podcast Info"), \
_( info ), "%s", psz_text ); \
}
ADD_GINFO( "Podcast Link", "link" )
......@@ -246,7 +246,7 @@ static int Demux( demux_t *p_demux )
&& ( !strcmp( psz_elname, "itunes:summary" )
||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */
input_ItemAddInfo( p_current_input,
input_item_AddInfo( p_current_input,
_( "Podcast Info" ), _( "Podcast Summary" ),
"%s", psz_text );
}
......@@ -272,11 +272,11 @@ static int Demux( demux_t *p_demux )
msg_Err( p_demux, "invalid XML (no enclosure markup)" );
return -1;
}
p_input = input_ItemNewExt( p_demux, psz_item_mrl,
p_input = input_item_NewExt( p_demux, psz_item_mrl,
psz_item_name, 0, NULL, -1 );
if( p_input == NULL ) break;
#define ADD_INFO( info, field ) \
if( field ) { input_ItemAddInfo( p_input, \
if( field ) { input_item_AddInfo( p_input, \
_( "Podcast Info" ), _( info ), "%s", field ); }
ADD_INFO( "Podcast Publication Date", psz_item_date );
ADD_INFO( "Podcast Author", psz_item_author );
......@@ -288,13 +288,13 @@ static int Demux( demux_t *p_demux )
ADD_INFO( "Podcast Type", psz_item_type );
if( psz_item_size )
{
input_ItemAddInfo( p_input,
input_item_AddInfo( p_input,
_( "Podcast Info" ),
_( "Podcast Size" ),
"%s bytes",
psz_item_size );
}
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_item_name );
FREENULL( psz_item_mrl );
......
......@@ -349,19 +349,19 @@ static int Demux( demux_t *p_demux )
}
else
{
p_input = input_ItemNewExt( p_demux,
p_input = input_item_NewExt( p_demux,
psz_src, psz_moviename, 0, NULL, -1 );
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, "QuickTime Media Link", _(type), "%s", field ) ; }
SADD_INFO( "href", psz_href );
SADD_INFO( "mime type", psz_mimetype );
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
if( psz_qtnext )
{
p_input = input_ItemNewExt( p_demux,
p_input = input_item_NewExt( p_demux,
psz_qtnext, NULL, 0, NULL, -1 );
input_ItemAddSubItem( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
}
......
......@@ -353,7 +353,7 @@ static int Demux ( demux_t *p_demux )
p_sys->psz_uri, p_sys->i_sid );
}
p_child = input_ItemNewWithType( VLC_OBJECT(p_demux), p_sys->psz_uri,
p_child = input_item_NewWithType( VLC_OBJECT(p_demux), p_sys->psz_uri,
p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri,
0, NULL, p_sys->i_duration, ITEM_TYPE_NET );
......@@ -363,31 +363,31 @@ static int Demux ( demux_t *p_demux )
return -1;
}
input_ItemCopyOptions( p_current_input, p_child );
input_item_CopyOptions( p_current_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 );
input_ItemAddOption( p_child, psz_option );
input_item_AddOption( p_child, psz_option );
free( psz_option );
}
if( !p_sys->psz_mcast_ip )
{
char *psz_option;
asprintf( &psz_option, "rtsp-caching=5000" );
input_ItemAddOption( p_child, psz_option );
input_item_AddOption( 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" );
input_ItemAddOption( p_child, psz_option );
input_item_AddOption( p_child, psz_option );
free( psz_option );
}
input_ItemAddSubItem( p_current_input, p_child );
input_item_AddSubItem( p_current_input, p_child );
vlc_gc_decref( p_child );
HANDLE_PLAY_AND_RELEASE
return 0; /* Needed for correct operation of go back */
......
......@@ -228,12 +228,12 @@ static int DemuxGenre( demux_t *p_demux )
+ strlen( "?genre=" ) + strlen( psz_name ) + 1 );
sprintf( psz_mrl, SHOUTCAST_BASE_URL "?genre=%s",
psz_name );
p_input = input_ItemNewExt( p_demux, psz_mrl,
p_input = input_item_NewExt( p_demux, psz_mrl,
psz_name, 0, NULL, -1 );
input_ItemCopyOptions( p_sys->p_current_input,
input_item_CopyOptions( p_sys->p_current_input,
p_input );
free( psz_mrl );
input_ItemAddSubItem( p_sys->p_current_input, p_input );
input_item_AddSubItem( p_sys->p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
}
......@@ -402,14 +402,14 @@ static int DemuxStation( demux_t *p_demux )
sprintf( psz_mrl, SHOUTCAST_TUNEIN_BASE_URL "%s?id=%s",
psz_base, psz_id );
}
p_input = input_ItemNewExt( p_demux, psz_mrl,
p_input = input_item_NewExt( p_demux, psz_mrl,
psz_name , 0, NULL, -1 );
free( psz_mrl );
input_ItemCopyOptions( p_sys->p_current_input,
input_item_CopyOptions( p_sys->p_current_input,
p_input );
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, _("Shoutcast"), _(type), "%s", field ) ; }
SADD_INFO( "Mime type", psz_mt );
SADD_INFO( "Bitrate", psz_br );
......@@ -421,7 +421,7 @@ static int DemuxStation( demux_t *p_demux )
input_item_SetNowPlaying( p_input, psz_ct );
if( psz_rt )
input_item_SetRating( p_input, psz_rt );
input_ItemAddSubItem( p_sys->p_current_input, p_input );
input_item_AddSubItem( p_sys->p_current_input, p_input );
vlc_gc_decref( p_input );
FREENULL( psz_name );
FREENULL( psz_mt );
......
......@@ -136,7 +136,7 @@ int Demux( demux_t *p_demux )
input_item_t *p_new_input = p_demux->p_sys->pp_tracklist[i];
if( p_new_input )
{
input_ItemAddSubItem( p_current_input, p_new_input );
input_item_AddSubItem( p_current_input, p_new_input );
}
}
......@@ -558,10 +558,10 @@ static bool parse_track_node COMPLEX_INTERFACE
free( psz_uri );
psz_uri = psz_tmp;
}
p_new_input = input_ItemNewExt( p_demux, psz_uri,
p_new_input = input_item_NewExt( p_demux, psz_uri,
NULL, 0, NULL, -1 );
free( psz_uri );
input_ItemCopyOptions( p_input_item, p_new_input );
input_item_CopyOptions( p_input_item, p_new_input );
psz_uri = NULL;
FREE_ATT();
p_handler = NULL;
......@@ -672,7 +672,7 @@ static bool set_option SIMPLE_INTERFACE
/* re-convert xml special characters inside psz_value */
resolve_xml_special_chars( psz_value );
input_ItemAddOpt( p_input, psz_value, 0 );
input_item_AddOpt( p_input, psz_value, 0 );
return true;
}
......@@ -734,11 +734,11 @@ static bool parse_extension_node COMPLEX_INTERFACE
msg_Warn( p_demux, "<node> requires \"title\" attribute" );
return false;
}
p_new_input = input_ItemNewWithType( VLC_OBJECT( p_demux ), "vlc://nop",
p_new_input = input_item_NewWithType( VLC_OBJECT( p_demux ), "vlc://nop",
psz_title, 0, NULL, -1, ITEM_TYPE_DIRECTORY );
if( p_new_input )
{
input_ItemAddSubItem( p_input_item, p_new_input );
input_item_AddSubItem( p_input_item, p_new_input );
p_input_item = p_new_input;
vlc_gc_decref( p_new_input );
}
......@@ -914,7 +914,7 @@ static bool parse_extitem_node COMPLEX_INTERFACE
p_new_input = p_demux->p_sys->pp_tracklist[ i_href ];
if( p_new_input )
{
input_ItemAddSubItem( p_input_item, p_new_input );
input_item_AddSubItem( p_input_item, p_new_input );
vlc_gc_decref( p_new_input );
p_demux->p_sys->pp_tracklist[i_href] = NULL;
}
......
......@@ -52,7 +52,7 @@
NSURL * o_url;
input_item_t *p_input;
p_input = input_ItemNew( p_playlist,
p_input = input_item_New( p_playlist,
[o_urlString fileSystemRepresentation],
[[[NSFileManager defaultManager]
displayNameAtPath: o_urlString] UTF8String] );
......
......@@ -296,7 +296,7 @@
}
else if( [[o_tc identifier] isEqualToString:@"status"] )
{
if( input_ItemHasErrorWhenReading( p_item->p_input ) )
if( input_item_HasErrorWhenReading( p_item->p_input ) )
{
o_value = [NSImage imageWithWarningIcon];
}
......@@ -978,7 +978,7 @@
o_uri = o_temp;
}
p_input = input_ItemNew( p_playlist, [o_uri fileSystemRepresentation], [o_name UTF8String] );
p_input = input_item_New( p_playlist, [o_uri fileSystemRepresentation], [o_name UTF8String] );
if( !p_input )
return NULL;
......@@ -986,7 +986,7 @@
{
for( i = 0; i < (int)[o_options count]; i++ )
{
input_ItemAddOption( p_input, strdup( [[o_options objectAtIndex:i] UTF8String] ) );
input_item_AddOption( p_input, strdup( [[o_options objectAtIndex:i] UTF8String] ) );
}
}
......@@ -1102,7 +1102,7 @@
PL_LOCK;
o_current_name = [NSString stringWithUTF8String:
p_item->pp_children[i_current]->p_input->psz_name];
psz_temp = input_ItemGetInfo( p_item->p_input ,
psz_temp = input_item_GetInfo( p_item->p_input ,
_("Meta-information"),_("Artist") );
o_current_author = [NSString stringWithUTF8String: psz_temp];
free( psz_temp);
......
......@@ -1265,17 +1265,17 @@ static VLCWizard *_o_sharedInstance = nil;
NSString *tempString = [NSString stringWithFormat:
@"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"),
( x + 1 ), y];
input_item_t *p_input = input_ItemNew( p_playlist,
input_item_t *p_input = input_item_New( p_playlist,
[[[o_userSelections objectForKey:@"pathToStrm"]
objectAtIndex:x] UTF8String],
[tempString UTF8String] );
input_ItemAddOption( p_input, [[[o_userSelections
input_item_AddOption( p_input, [[[o_userSelections
objectForKey:@"opts"] objectAtIndex: x] UTF8String]);
if(! [[o_userSelections objectForKey:@"partExtractFrom"]
isEqualToString:@""] )
{
input_ItemAddOption( p_input, [[NSString
input_item_AddOption( p_input, [[NSString
stringWithFormat: @"start-time=%@", [o_userSelections
objectForKey: @"partExtractFrom"]] UTF8String] );
}
......@@ -1283,12 +1283,12 @@ static VLCWizard *_o_sharedInstance = nil;
if(! [[o_userSelections objectForKey:@"partExtractTo"]
isEqualToString:@""] )
{
input_ItemAddOption( p_input, [[NSString
input_item_AddOption( p_input, [[NSString
stringWithFormat: @"stop-time=%@", [o_userSelections
objectForKey: @"partExtractTo"]] UTF8String] );
}
input_ItemAddOption( p_input, [[NSString stringWithFormat:
input_item_AddOption( p_input, [[NSString stringWithFormat:
@"ttl=%@", [o_userSelections objectForKey:@"ttl"]]
UTF8String] );
......
......@@ -308,13 +308,13 @@ void OpenDialog::finish( bool b_enqueue = false )
bool b_start = !i && !b_enqueue;
input_item_t *p_input;
p_input = input_ItemNew( p_intf, qtu( tempMRL[i] ), NULL );
p_input = input_item_New( p_intf, qtu( tempMRL[i] ), NULL );
/* Insert options */
while( i + 1 < tempMRL.size() && tempMRL[i + 1].startsWith( ":" ) )
{
i++;
input_ItemAddOption( p_input, qtu( tempMRL[i] ) );
input_item_AddOption( p_input, qtu( tempMRL[i] ) );
}
/* Switch between enqueuing and starting the item */
......
......@@ -414,7 +414,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
{
QString dir = QFileDialog::getExistingDirectory( 0, qtr("Open Directory") );
if (!dir.isEmpty()) {
input_item_t *p_input = input_ItemNewExt( THEPL,
input_item_t *p_input = input_item_NewExt( THEPL,
qtu( "directory://" + dir ), NULL,
0, NULL, -1 );
......
......@@ -667,7 +667,7 @@ void Playlist::UpdateItem( int i )
ListView_SetItemText( hListView, i, 0, _FROMMB(p_item->input.psz_name) );
ListView_SetItemText( hListView, i, 1,
_FROMMB( input_ItemGetInfo( &p_item->input,
_FROMMB( input_item_GetInfo( &p_item->input,
_("General") , _("Author") ) ) );
char psz_duration[MSTRTIME_MAX_SIZE];
......
......@@ -1168,7 +1168,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
char *psz_utf8;
psz_utf8 = wxFromLocale( mrl[i] );
p_input = input_ItemNew( p_intf, psz_utf8, NULL );
p_input = input_item_New( p_intf, psz_utf8, NULL );
wxLocaleFree( psz_utf8 );
/* Insert options */
......@@ -1176,7 +1176,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
((const char *)mrl[i + 1].mb_str(wxConvUTF8))[0] == ':' )
{
psz_utf8 = wxFromLocale( mrl[i + 1] );
input_ItemAddOption( p_input, psz_utf8 );
input_item_AddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
i++;
}
......@@ -1187,7 +1187,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
for( int j = 0; j < (int)subsfile_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( subsfile_mrl[j] );
input_ItemAddOption( p_input, psz_utf8 );
input_item_AddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
}
}
......@@ -1198,7 +1198,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
for( int j = 0; j < (int)sout_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( sout_mrl[j] );
input_ItemAddOption( p_input, psz_utf8 );
input_item_AddOption( p_input, psz_utf8 );