free( psz_path );
}
msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
- input_item_t *p_input = input_item_NewExt( p_demux, psz_ref
- , NULL, 0, NULL, 0, -1 );
+ input_item_t *p_input = input_item_New( p_demux, psz_ref, NULL );
input_item_CopyOptions( p_current, p_input );
input_item_AddSubItem( p_current, p_input );
vlc_gc_decref( p_input );
if( !psz_elname ) return -1;
if( !strcmp( psz_elname, "entry" ) )
{
- p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
- 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_mrl, psz_name );
if( psz_now )
input_item_SetNowPlaying( p_input, psz_now );
if( psz_genre )
while( (psz_line = stream_ReadLine( p_demux->s )) )
{
char **ppsz_options = NULL;
- int i, i_options = 0;
+ int i_options = 0;
char *psz_name = NULL;
if( !ParseLine( psz_line, &psz_name, &ppsz_options, &i_options ) )
}
EnsureUTF8( psz_name );
-
- p_input = input_item_NewExt( p_demux, "dvb://", psz_name, 0, NULL, 0, -1 );
- for( i = 0; i< i_options; i++ )
- {
+ for( int i = 0; i< i_options; i++ )
EnsureUTF8( ppsz_options[i] );
- input_item_AddOption( p_input, ppsz_options[i], VLC_INPUT_OPTION_TRUSTED );
- }
+
+ p_input = input_item_NewExt( p_demux, "dvb://", psz_name,
+ i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
- while( i_options-- ) free( ppsz_options[i_options] );
+
+ while( i_options-- )
+ free( ppsz_options[i_options] );
free( ppsz_options );
free( psz_line );
}
else
{
- p_input = input_item_NewExt( p_demux,
- psz_url, psz_title, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_url, psz_title );
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, _("Google Video"), _(type), "%s", field ) ; }
SADD_INFO( "gvp_version", psz_version );
psz_url = (char *)malloc( len+1 );
snprintf( psz_url, len+1, "dvd://%s", p_demux->psz_path );
- p_input = input_item_NewExt( p_demux, psz_url, psz_url, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_url, psz_url );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
memmove( psz_uri + 7, psz_uri + 17, strlen( psz_uri ) - 9 );
msg_Info( p_demux, "Adding '%s'", psz_uri );
- p_new_input = input_item_NewExt( p_demux, psz_uri,
- NULL, 0, NULL, 0, -1 );
+ p_new_input = input_item_New( p_demux, psz_uri, NULL );
input_item_AddSubItem( p_input_item, p_new_input );
/* add meta info */
if( !psz_mrl ) goto error;
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
- 0, NULL, 0, i_duration );
+ i_options, ppsz_options, 0, i_duration );
if ( psz_artist && *psz_artist )
input_item_SetArtist( p_input, psz_artist );
input_item_AddSubItem( p_current_input, p_input );
- for( int i = 0; i < i_options; i++ )
- input_item_AddOption( p_input, ppsz_options[i], 0 );
vlc_gc_decref( p_input );
free( psz_mrl );
}
{
if( psz_mrl )
{
- p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
- 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_mrl, psz_name );
input_item_CopyOptions( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
/* Add last object */
if( psz_mrl )
{
- p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_mrl, psz_name );
input_item_CopyOptions( p_current_input, p_input );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
free( psz_elname );
return -1;
}
- p_input = input_item_NewExt( p_demux, psz_item_mrl,
- psz_item_name, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_item_mrl, psz_item_name );
if( p_input == NULL ) break;
#define ADD_INFO( info, field ) \
if( field ) { input_item_AddInfo( p_input, \
}
else
{
- p_input = input_item_NewExt( p_demux,
- psz_src, psz_moviename, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_src, psz_moviename );
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, "QuickTime Media Link", _(type), "%s", field ) ; }
SADD_INFO( "href", psz_href );
vlc_gc_decref( p_input );
if( psz_qtnext )
{
- p_input = input_item_NewExt( p_demux,
- psz_qtnext, NULL, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_qtnext, NULL );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
}
if( asprintf( &psz_mrl, SHOUTCAST_BASE_URL "?genre=%s",
psz_name ) != -1 )
{
- p_input = input_item_NewExt( p_demux, psz_mrl,
- psz_name, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_mrl, psz_name );
input_item_CopyOptions( p_sys->p_current_input, p_input );
free( psz_mrl );
input_item_AddSubItem( p_sys->p_current_input, p_input );
psz_base, psz_id ) == -1 )
psz_mrl = NULL;
}
- p_input = input_item_NewExt( p_demux, psz_mrl,
- psz_name , 0, NULL, 0, -1 );
+ p_input = input_item_New( p_demux, psz_mrl, psz_name );
+ input_item_CopyOptions( p_sys->p_current_input, p_input );
free( psz_mrl );
- input_item_CopyOptions( p_sys->p_current_input,
- p_input );
-
#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
p_input, _("Shoutcast"), _(type), "%s", field ) ; }
SADD_INFO( "Mime type", psz_mt );
{NULL, UNKNOWN_CONTENT, {NULL} }
};
- input_item_t *p_new_input = input_item_NewExt( p_demux, NULL, NULL, 0, NULL, 0, -1 );
+ input_item_t *p_new_input = input_item_New( p_demux, NULL, NULL );
if( !p_new_input )
{
- /* malloc has failed for input_item_NewExt, so bailout early */
+ /* malloc has failed for input_item_New, so bailout early */
return false;
}
{
QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ?
"dvd://" : "directory://" + toNativeSeparators( dir );
- input_item_t *p_input = input_item_NewExt( THEPL, qtu( mrl ),
- NULL, 0, NULL, 0, -1 );
+ input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input,
if( psz_uri != NULL )
{
- p_input = input_item_NewExt( p_sd, psz_uri, name, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_sd, psz_uri, name );
free( (void *)psz_uri );
}
if( p_input != NULL )
input_item_t *p_input;
INSERT_ELEM( p_sys->ppsz_urls, p_sys->i_urls, p_sys->i_urls,
strdup( psz_urls ) );
- p_input = input_item_NewExt( p_sd, psz_urls,
- psz_urls, 0, NULL, 0, -1 );
+ p_input = input_item_New( p_sd, psz_urls, psz_urls );
input_item_AddOption( p_input, "demux=podcast", VLC_INPUT_OPTION_TRUSTED );
services_discovery_AddItem( p_sd, p_input, NULL /* no cat */ );
vlc_gc_decref( p_input );
{
int i;
/* Create the item */
- input_item_t *p_input = input_item_NewExt( p_sd,
- p_item->psz_url, _(p_item->psz_name),
- 0, NULL, 0, -1 );
+ input_item_t *p_input = input_item_New( p_sd, p_item->psz_url, _(p_item->psz_name) );
/* Copy options */
for( i = 0; p_item->ppsz_options[i] != NULL; i++ )