#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;
* 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;
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;
}
#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
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 );
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 */
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,
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 );
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 */
{
s_temp = s_mrl + strlen( s_mrl );
}
- input_ItemAddOption( p_input, s_mrl );
+ input_item_AddOption( p_input, s_mrl );
s_mrl = s_temp;
}
/* 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] );
}
}
}
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
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;
/* 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];
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 );
}
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 );
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 );
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 );
}
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 );
}
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;
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 );
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 );
}
{
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
/* 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;
#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" )
&& ( !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 );
}
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 );
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 );
}
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 );
}
}
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 );
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 */
+ 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 );
}
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 );
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 );
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 );
}
}
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;
/* 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;
}
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 );
}
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;
}
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] );
}
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];
}
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;
{
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] ) );
}
}
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);
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] );
}
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] );
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 */
{
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 );
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];
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 */
((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++;
}
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 );
}
}
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 );
wxLocaleFree( psz_utf8 );
}
}
for( size_t i = 0; i < filenames.GetCount(); i++ )
{
char *psz_utf8 = wxDnDFromLocale( filenames[i] );
- input_item_t *p_input = input_ItemNew( p->p_playlist,
+ input_item_t *p_input = input_item_New( p->p_playlist,
psz_utf8, psz_utf8 );
int i_ret = ( playlist_BothAddInput( p->p_playlist, p_input, p_dest,
PLAYLIST_PREPARSE, i_pos, NULL, NULL, pl_Unlocked ) != VLC_SUCCESS );
playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist )
{
- input_item_t *p_input = input_ItemNew( p_playlist, mrl,
+ input_item_t *p_input = input_item_New( p_playlist, mrl,
ITEM_NAME );
- input_ItemAddOption( p_input, psz_opt );
+ input_item_AddOption( p_input, psz_opt );
if( i_from != 0)
{
char psz_from[20];
snprintf( psz_from, 20, "start-time=%i", i_from);
- input_ItemAddOption( p_input, psz_from );
+ input_item_AddOption( p_input, psz_from );
}
if( i_to != 0)
{
char psz_to[20];
snprintf( psz_to, 20, "stop-time=%i", i_to);
- input_ItemAddOption( p_input, psz_to );
+ input_item_AddOption( p_input, psz_to );
}
char psz_ttl[20];
snprintf( psz_ttl, 20, "ttl=%i",i_ttl );
- input_ItemAddOption( p_input, psz_ttl );
+ input_item_AddOption( p_input, psz_ttl );
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
msg_Dbg( p_this, "Custom meta %s, %s: %s",
psz_meta_category, psz_meta_name,
psz_meta_value );
- input_ItemAddInfo( p_input, psz_meta_category,
+ input_item_AddInfo( p_input, psz_meta_category,
psz_meta_name, psz_meta_value );
}
lua_pop( L, 1 ); /* pop item */
vlclua_read_options( p_this, L, &i_options, &ppsz_options );
/* Create input item */
- p_input = input_ItemNewExt( p_playlist, psz_path,
+ p_input = input_item_NewExt( p_playlist, psz_path,
psz_name, i_options,
(const char **)ppsz_options,
i_duration );
/* Append item to playlist */
if( p_parent ) /* Add to node */
- input_ItemAddSubItem( p_parent, p_input );
+ input_item_AddSubItem( p_parent, p_input );
else /* Play or Enqueue (preparse) */
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
if( psz_uri != NULL )
{
- p_input = input_ItemNewExt( p_sd, psz_uri, name, 0, NULL, -1 );
+ p_input = input_item_NewExt( p_sd, psz_uri, name, 0, NULL, -1 );
free( (void *)psz_uri );
}
if( p_input != NULL )
if( asprintf( &psz_uri, "dvd://%s", psz_blockdevice ) == -1 )
return;
/* Create the playlist item here */
- p_input = input_ItemNew( p_sd, psz_uri, psz_name );
+ p_input = input_item_New( p_sd, psz_uri, psz_name );
free( psz_uri );
if( !p_input )
{
if( asprintf( &psz_uri, "cdda://%s", psz_blockdevice ) == -1 )
return;
/* Create the item here */
- p_input = input_ItemNew( p_sd, psz_uri, "Audio CD" );
+ p_input = input_item_New( p_sd, psz_uri, "Audio CD" );
free( psz_uri );
if( !p_input )
return;
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_ItemNewExt( p_sd, psz_urls,
+ p_input = input_item_NewExt( p_sd, psz_urls,
psz_urls, 0, NULL, -1 );
- input_ItemAddOption( p_input, "demux=podcast" );
+ input_item_AddOption( p_input, "demux=podcast" );
services_discovery_AddItem( p_sd, p_input, NULL /* no cat */ );
vlc_gc_decref( p_input );
INSERT_ELEM( p_sys->pp_input, p_sys->i_input, p_sys->i_input,
p_sap->p_sdp = p_sdp;
/* Released in RemoveAnnounce */
- p_input = input_ItemNewWithType( VLC_OBJECT(p_sd),
+ p_input = input_item_NewWithType( VLC_OBJECT(p_sd),
p_sap->p_sdp->psz_uri,
p_sdp->psz_sessionname,
0, NULL, -1, ITEM_TYPE_NET );
}
if( p_sys->b_timeshift )
- input_ItemAddOption( p_input, ":access-filter=timeshift" );
+ input_item_AddOption( p_input, ":access-filter=timeshift" );
psz_value = GetAttribute( p_sap->p_sdp->pp_attributes, p_sap->p_sdp->i_attributes, "tool" );
if( psz_value != NULL )
{
- input_ItemAddInfo( p_input, _("Session"), _("Tool"), "%s", psz_value );
+ input_item_AddInfo( p_input, _("Session"), _("Tool"), "%s", psz_value );
}
if( strcmp( p_sdp->username, "-" ) )
{
- input_ItemAddInfo( p_input, _("Session"), _("User"), "%s",
+ input_item_AddInfo( p_input, _("Session"), _("User"), "%s",
p_sdp->username );
}
{
int i;
/* Create the item */
- input_item_t *p_input = input_ItemNewExt( p_sd,
+ input_item_t *p_input = input_item_NewExt( p_sd,
p_item->psz_url, _(p_item->psz_name),
0, NULL, -1 );
/* Copy options */
for( i = 0; p_item->ppsz_options[i] != NULL; i++ )
- input_ItemAddOption( p_input, p_item->ppsz_options[i] );
- input_ItemAddOption( p_input, "no-playlist-autostart" );
+ input_item_AddOption( p_input, p_item->ppsz_options[i] );
+ input_item_AddOption( p_input, "no-playlist-autostart" );
return p_input;
}
if ( node->isItemNode() )
{
ItemNode *iNode = (ItemNode *)node;
- input_item_t *p_input = input_ItemNew( p_sd, iNode->getResource(), title );
+ input_item_t *p_input = input_item_New( p_sd, iNode->getResource(), title );
/* FIXME: playlist_AddInput() can fail */
playlist_BothAddInput( p_playlist, p_input, p_parent,
PLAYLIST_APPEND, PLAYLIST_END, NULL, NULL,
Item* item = parent->getItem( i );
playlist_item_t* parentNode = parent->getPlaylistNode();
- input_item_t* p_input = input_ItemNew( _cookie->serviceDiscovery,
+ input_item_t* p_input = input_item_New( _cookie->serviceDiscovery,
item->getResource(),
item->getTitle() );
int i_cat;
input_item_t * p_input_item;
libvlc_media_t * p_md;
- p_input_item = input_ItemNew( p_instance->p_libvlc_int, psz_mrl, NULL );
+ p_input_item = input_item_New( p_instance->p_libvlc_int, psz_mrl, NULL );
if (!p_input_item)
{
input_item_t * p_input_item;
libvlc_media_t * p_md;
- p_input_item = input_ItemNew( p_instance->p_libvlc_int, "vlc://nop", psz_name );
+ p_input_item = input_item_New( p_instance->p_libvlc_int, "vlc://nop", psz_name );
if (!p_input_item)
{
libvlc_exception_t *p_e )
{
VLC_UNUSED(p_e);
- input_ItemAddOpt( p_md->p_input_item, ppsz_option,
+ input_item_AddOpt( p_md->p_input_item, ppsz_option,
VLC_INPUT_OPTION_UNIQUE|VLC_INPUT_OPTION_TRUSTED );
}
input_item_t * p_input_item;
libvlc_media_t * p_md;
- p_input_item = input_ItemNewExt( p_mlist->p_libvlc_instance->p_libvlc_int, psz_uri,
+ p_input_item = input_item_NewExt( p_mlist->p_libvlc_instance->p_libvlc_int, psz_uri,
_("Media Library"), 0, NULL, -1 );
if( !p_input_item )
case INPUT_ADD_INFO:
{
- /* FIXME : Impossible to use input_ItemAddInfo because of
+ /* FIXME : Impossible to use input_item_AddInfo because of
* the ... problem ? */
char *psz_cat = (char *)va_arg( args, char * );
char *psz_name = (char *)va_arg( args, char * );
int i_ret = VLC_EGENERIC;
*ppsz_value = NULL;
- *ppsz_value = input_ItemGetInfo( p_input->p->input.p_item,
+ *ppsz_value = input_item_GetInfo( p_input->p->input.p_item,
psz_cat, psz_name );
return i_ret;
}
if( asprintf( &str, "%s=%s", psz_option, psz_value ) == -1 )
return VLC_ENOMEM;
- i = input_ItemAddOpt( p_input->p->input.p_item, str,
+ i = input_item_AddOpt( p_input->p->input.p_item, str,
VLC_INPUT_OPTION_UNIQUE );
free( str );
return i;
/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
* anyway. */
-static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
+static inline void input_item_Init( vlc_object_t *p_o, input_item_t *p_i )
{
memset( p_i, 0, sizeof(input_item_t) );
p_i->psz_name = NULL;
vlc_event_manager_register_event_type( p_em, vlc_InputItemErrorWhenReadingChanged );
}
-static inline void input_ItemClean( input_item_t *p_i )
+static inline void input_item_Clean( input_item_t *p_i )
{
int i;
* empty string otherwise. The caller should free the returned
* pointer.
*/
-char *input_ItemGetInfo( input_item_t *p_i,
+char *input_item_GetInfo( input_item_t *p_i,
const char *psz_cat,
const char *psz_name )
{
return strdup( "" );
}
-static void input_ItemDestroy ( gc_object_t *p_this )
+static void input_item_Destroy ( gc_object_t *p_this )
{
vlc_object_t *p_obj = (vlc_object_t *)p_this->p_destructor_arg;
libvlc_priv_t *priv = libvlc_priv (p_obj->p_libvlc);
input_item_t *p_input = (input_item_t *) p_this;
int i;
- input_ItemClean( p_input );
+ input_item_Clean( p_input );
vlc_object_lock( p_obj->p_libvlc );
free( p_input );
}
-int input_ItemAddOpt( input_item_t *p_input, const char *psz_option,
+int input_item_AddOpt( input_item_t *p_input, const char *psz_option,
unsigned flags )
{
int err = VLC_SUCCESS;
return err;
}
-int input_ItemAddInfo( input_item_t *p_i,
+int input_item_AddInfo( input_item_t *p_i,
const char *psz_cat,
const char *psz_name,
const char *psz_format, ... )
return p_info->psz_value ? VLC_SUCCESS : VLC_ENOMEM;
}
-input_item_t *__input_ItemGetById( vlc_object_t *p_obj, int i_id )
+input_item_t *__input_item_GetById( vlc_object_t *p_obj, int i_id )
{
libvlc_priv_t *priv = libvlc_priv (p_obj->p_libvlc);
input_item_t * p_ret = NULL;
return p_ret;
}
-input_item_t *__input_ItemNewExt( vlc_object_t *p_obj, const char *psz_uri,
+input_item_t *__input_item_NewExt( vlc_object_t *p_obj, const char *psz_uri,
const char *psz_name,
int i_options,
const char *const *ppsz_options,
mtime_t i_duration )
{
- return input_ItemNewWithType( p_obj, psz_uri, psz_name,
+ return input_item_NewWithType( p_obj, psz_uri, psz_name,
i_options, ppsz_options,
i_duration, ITEM_TYPE_UNKNOWN );
}
-input_item_t *input_ItemNewWithType( vlc_object_t *p_obj, const char *psz_uri,
+input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
const char *psz_name,
int i_options,
const char *const *ppsz_options,
DECMALLOC_NULL( p_input, input_item_t );
- input_ItemInit( p_obj, p_input );
- vlc_gc_init( p_input, input_ItemDestroy, (void *)p_obj->p_libvlc );
+ input_item_Init( p_obj, p_input );
+ vlc_gc_init( p_input, input_item_Destroy, (void *)p_obj->p_libvlc );
vlc_object_lock( p_obj->p_libvlc );
p_input->i_id = ++priv->i_last_input_id;
p_input->i_duration = i_duration;
for( int i = 0; i < i_options; i++ )
- input_ItemAddOption( p_input, ppsz_options[i] );
+ input_item_AddOption( p_input, ppsz_options[i] );
return p_input;
}
int i;
vlc_gc_decref( p_media->vod.p_item );
- p_media->vod.p_item = input_ItemNew( p_vlm, p_cfg->ppsz_input[0],
+ p_media->vod.p_item = input_item_New( p_vlm, p_cfg->ppsz_input[0],
p_cfg->psz_name );
if( p_cfg->psz_output )
if( psz_output && asprintf( &psz_dup, "sout=%s", psz_output ) != -1 )
{
- input_ItemAddOption( p_media->vod.p_item, psz_dup );
+ input_item_AddOption( p_media->vod.p_item, psz_dup );
free( psz_dup );
}
free( psz_output );
for( i = 0; i < p_cfg->i_option; i++ )
- input_ItemAddOption( p_media->vod.p_item,
+ input_item_AddOption( p_media->vod.p_item,
p_cfg->ppsz_option[i] );
if( asprintf( &psz_header, _("Media: %s"), p_cfg->psz_name ) == -1 )
p_media->cfg.id = p_vlm->i_id++;
/* FIXME do we do something here if enabled is true ? */
- p_media->vod.p_item = input_ItemNew( p_vlm, NULL, NULL );
+ p_media->vod.p_item = input_item_New( p_vlm, NULL, NULL );
p_media->vod.p_media = NULL;
TAB_INIT( p_media->i_instance, p_media->instance );
if( psz_name )
p_instance->psz_name = strdup( psz_name );
- p_instance->p_item = input_ItemNew( p_vlm, NULL, NULL );
+ p_instance->p_item = input_item_New( p_vlm, NULL, NULL );
p_instance->i_index = 0;
p_instance->b_sout_keep = false;
(p_cfg->psz_output && psz_vod_output) ? ":" : psz_vod_output ? "#" : "",
psz_vod_output ? psz_vod_output : "" ) != -1 )
{
- input_ItemAddOption( p_instance->p_item, psz_buffer );
+ input_item_AddOption( p_instance->p_item, psz_buffer );
free( psz_buffer );
}
}
else if( !strcmp( p_cfg->ppsz_option[i], "nosout-keep" ) || !strcmp( p_cfg->ppsz_option[i], "no-sout-keep" ) )
p_instance->b_sout_keep = false;
else
- input_ItemAddOption( p_instance->p_item, p_cfg->ppsz_option[i] );
+ input_item_AddOption( p_instance->p_item, p_cfg->ppsz_option[i] );
}
TAB_APPEND( p_media->i_instance, p_media->instance, p_instance );
}
input_DecoderNew
input_get_event_manager
input_GetItem
-input_ItemAddInfo
-input_ItemAddOpt
-__input_ItemGetById
-input_ItemGetInfo
-__input_ItemNewExt
-input_ItemNewWithType
+input_item_AddInfo
+input_item_AddOpt
+__input_item_GetById
+input_item_GetInfo
+__input_item_NewExt
+input_item_NewWithType
input_item_SetMeta
input_MetaTypeToLocalizedString
__input_Preparse
{
input_item_t *p_input;
if( psz_uri == NULL ) return NULL;
- p_input = input_ItemNewWithType( VLC_OBJECT(p_playlist), psz_uri,
+ p_input = input_item_NewWithType( VLC_OBJECT(p_playlist), psz_uri,
psz_name, i_options, ppsz_options,
i_duration, i_type );
return playlist_ItemNewFromInput( p_playlist, p_input );
int i_options, bool b_playlist, bool b_locked )
{
int i_ret;
- input_item_t *p_input = input_ItemNewExt( p_playlist, psz_uri, psz_name,
+ input_item_t *p_input = input_item_NewExt( p_playlist, psz_uri, psz_name,
i_options, ppsz_options,
i_duration );
const char *const psz_option = "meta-file";
/* that option has to be cleaned in input_item_subitem_added() */
/* vlc_gc_decref() in the same function */
- p_input = input_ItemNewExt( p_playlist, psz_uri,
+ p_input = input_item_NewExt( p_playlist, psz_uri,
_("Media Library"), 1, &psz_option, -1 );
if( p_input == NULL )
goto error;
if( !psz_name ) psz_name = _("Undefined");
if( !p_input )
- p_new_input = input_ItemNewWithType( VLC_OBJECT(p_playlist), NULL,
+ p_new_input = input_item_NewWithType( VLC_OBJECT(p_playlist), NULL,
psz_name, 0, NULL, -1, ITEM_TYPE_NODE );
p_item = playlist_ItemNewFromInput( p_playlist,
p_input ? p_input : p_new_input );