Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
629dbd8a
Commit
629dbd8a
authored
Jul 10, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless vlc_object parameter when creating an input item
parent
c7d87dd2
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
123 additions
and
159 deletions
+123
-159
include/vlc_input_item.h
include/vlc_input_item.h
+4
-5
modules/access/cdda.c
modules/access/cdda.c
+2
-3
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+1
-1
modules/control/rc.c
modules/control/rc.c
+1
-1
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+1
-1
modules/demux/playlist/asx.c
modules/demux/playlist/asx.c
+3
-3
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+1
-1
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+1
-1
modules/demux/playlist/gvp.c
modules/demux/playlist/gvp.c
+1
-1
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+2
-2
modules/demux/playlist/itml.c
modules/demux/playlist/itml.c
+1
-1
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+1
-1
modules/demux/playlist/pls.c
modules/demux/playlist/pls.c
+2
-2
modules/demux/playlist/podcast.c
modules/demux/playlist/podcast.c
+1
-1
modules/demux/playlist/qtl.c
modules/demux/playlist/qtl.c
+2
-2
modules/demux/playlist/ram.c
modules/demux/playlist/ram.c
+1
-1
modules/demux/playlist/sgimb.c
modules/demux/playlist/sgimb.c
+1
-1
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+2
-2
modules/demux/playlist/wpl.c
modules/demux/playlist/wpl.c
+1
-1
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+4
-4
modules/demux/playlist/zpl.c
modules/demux/playlist/zpl.c
+1
-1
modules/gui/hildon/maemo_callbacks.c
modules/gui/hildon/maemo_callbacks.c
+4
-5
modules/gui/macosx/applescript.m
modules/gui/macosx/applescript.m
+1
-2
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+1
-1
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+1
-1
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+1
-1
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+2
-2
modules/gui/skins2/vars/playtree.cpp
modules/gui/skins2/vars/playtree.cpp
+1
-1
modules/lua/libs/sd.c
modules/lua/libs/sd.c
+4
-6
modules/lua/vlc.c
modules/lua/vlc.c
+1
-2
modules/media_library/sql_media_library.c
modules/media_library/sql_media_library.c
+1
-3
modules/media_library/sql_monitor.c
modules/media_library/sql_monitor.c
+1
-2
modules/services_discovery/bonjour.c
modules/services_discovery/bonjour.c
+1
-1
modules/services_discovery/mediadirs.c
modules/services_discovery/mediadirs.c
+2
-2
modules/services_discovery/mtp.c
modules/services_discovery/mtp.c
+1
-2
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+2
-2
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+3
-4
modules/services_discovery/udev.c
modules/services_discovery/udev.c
+1
-2
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+3
-5
modules/services_discovery/windrive.c
modules/services_discovery/windrive.c
+1
-1
modules/services_discovery/xcb_apps.c
modules/services_discovery/xcb_apps.c
+2
-3
src/control/media.c
src/control/media.c
+2
-2
src/control/media_list.c
src/control/media_list.c
+1
-2
src/input/item.c
src/input/item.c
+43
-60
src/input/vlm.c
src/input/vlm.c
+3
-4
src/playlist/item.c
src/playlist/item.c
+2
-3
src/playlist/loadsave.c
src/playlist/loadsave.c
+2
-2
src/playlist/tree.c
src/playlist/tree.c
+2
-2
No files found.
include/vlc_input_item.h
View file @
629dbd8a
...
...
@@ -246,27 +246,26 @@ VLC_API void input_item_MergeInfos( input_item_t *, info_category_t * );
* XXX You may also use input_item_New or input_item_NewExt as they need
* less arguments.
*/
VLC_API
input_item_t
*
input_item_NewWithType
(
vlc_object_t
*
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
*
const
*
ppsz_options
,
unsigned
i_option_flags
,
mtime_t
i_duration
,
int
i_type
)
VLC_USED
;
VLC_API
input_item_t
*
input_item_NewWithType
(
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
*
const
*
ppsz_options
,
unsigned
i_option_flags
,
mtime_t
i_duration
,
int
i_type
)
VLC_USED
;
/**
* This function creates a new input_item_t with the provided information.
*
* Provided for convenience.
*/
VLC_API
input_item_t
*
input_item_NewExt
(
vlc_object_t
*
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
*
const
*
ppsz_options
,
unsigned
i_option_flags
,
mtime_t
i_duration
)
VLC_USED
;
#define input_item_NewExt(a,b,c,d,e,f,g) input_item_NewExt( VLC_OBJECT(a),b,c,d,e,f,g)
VLC_API
input_item_t
*
input_item_NewExt
(
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
*
const
*
ppsz_options
,
unsigned
i_option_flags
,
mtime_t
i_duration
)
VLC_USED
;
/**
* This function creates a new input_item_t with the provided information.
*
* Provided for convenience.
*/
#define input_item_New( a,b
,c
) input_item_NewExt( a, b,
c,
0, NULL, 0, -1 )
#define input_item_New( a,b ) input_item_NewExt( a, b, 0, NULL, 0, -1 )
/**
* This function creates a new input_item_t as a copy of another.
*/
VLC_API
input_item_t
*
input_item_Copy
(
vlc_object_t
*
,
input_item_t
*
)
VLC_USED
;
VLC_API
input_item_t
*
input_item_Copy
(
input_item_t
*
)
VLC_USED
;
/******************
...
...
modules/access/cdda.c
View file @
629dbd8a
...
...
@@ -505,9 +505,8 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
/* Create playlist items */
const
mtime_t
i_duration
=
(
int64_t
)(
p_sys
->
p_sectors
[
i
+
1
]
-
p_sys
->
p_sectors
[
i
]
)
*
CDDA_DATA_SIZE
*
1000000
/
44100
/
2
/
2
;
p_input_item
=
input_item_NewWithType
(
VLC_OBJECT
(
p_access
),
psz_uri
,
psz_name
,
0
,
NULL
,
0
,
i_duration
,
ITEM_TYPE_DISC
);
p_input_item
=
input_item_NewWithType
(
psz_uri
,
psz_name
,
0
,
NULL
,
0
,
i_duration
,
ITEM_TYPE_DISC
);
input_item_CopyOptions
(
p_current
,
p_input_item
);
input_item_AddOption
(
p_input_item
,
psz_first
,
VLC_INPUT_OPTION_TRUSTED
);
input_item_AddOption
(
p_input_item
,
psz_last
,
VLC_INPUT_OPTION_TRUSTED
);
...
...
modules/access/mms/mmsh.c
View file @
629dbd8a
...
...
@@ -162,7 +162,7 @@ int MMSHOpen( access_t *p_access )
goto
error
;
}
/** \bug we do not autodelete here */
p_new_loc
=
input_item_New
(
p_access
,
psz_location
,
psz_location
);
p_new_loc
=
input_item_New
(
psz_location
,
psz_location
);
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
input_item_PostSubItem
(
p_item
,
p_new_loc
);
...
...
modules/control/rc.c
View file @
629dbd8a
...
...
@@ -2115,7 +2115,7 @@ 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_item_New
(
p_intf
,
psz_item_mrl
,
NULL
);
p_item
=
input_item_New
(
psz_item_mrl
,
NULL
);
for
(
i
=
0
;
i
<
i_options
;
i
++
)
{
input_item_AddOption
(
p_item
,
ppsz_options
[
i
],
VLC_INPUT_OPTION_TRUSTED
);
...
...
modules/demux/mp4/mp4.c
View file @
629dbd8a
...
...
@@ -421,7 +421,7 @@ static int Open( vlc_object_t * p_this )
free
(
psz_path
);
}
msg_Dbg
(
p_demux
,
"adding ref = `%s'"
,
psz_ref
);
input_item_t
*
p_input
=
input_item_New
(
p_demux
,
psz_ref
,
NULL
);
input_item_t
*
p_input
=
input_item_New
(
psz_ref
,
NULL
);
input_item_CopyOptions
(
p_current
,
p_input
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
modules/demux/playlist/asx.c
View file @
629dbd8a
...
...
@@ -475,7 +475,7 @@ static int Demux( demux_t *p_demux )
memcpy
(
psz_string
,
psz_backup
,
i_strlen
);
psz_string
[
i_strlen
]
=
'\0'
;
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_demux
,
psz_string
,
psz_title_asx
);
p_input
=
input_item_New
(
psz_string
,
psz_title_asx
);
input_item_CopyOptions
(
p_current_input
,
p_input
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
@@ -543,7 +543,7 @@ static int Demux( demux_t *p_demux )
if
(
asprintf
(
&
psz_name
,
"%d %s"
,
i_entry_count
,
(
psz_title_entry
?
psz_title_entry
:
psz_current_input_name
)
)
!=
-
1
)
{
char
*
psz_mrl
=
ProcessMRL
(
psz_href
,
p_demux
->
p_sys
->
psz_prefix
);
p_entry
=
input_item_NewExt
(
p_demux
,
psz_mrl
,
psz_name
,
p_entry
=
input_item_NewExt
(
psz_mrl
,
psz_name
,
i_options
,
(
const
char
*
const
*
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
free
(
psz_name
);
free
(
psz_mrl
);
...
...
@@ -642,7 +642,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_name
=
input_item_GetName
(
p_current_input
);
char
*
psz_mrl
=
ProcessMRL
(
psz_href
,
p_demux
->
p_sys
->
psz_prefix
);
p_entry
=
input_item_NewExt
(
p_demux
,
psz_mrl
,
psz_name
,
p_entry
=
input_item_NewExt
(
psz_mrl
,
psz_name
,
0
,
NULL
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
free
(
psz_mrl
);
input_item_CopyOptions
(
p_current_input
,
p_entry
);
...
...
modules/demux/playlist/b4s.c
View file @
629dbd8a
...
...
@@ -199,7 +199,7 @@ static int Demux( demux_t *p_demux )
// Read the element name
if
(
!
strcmp
(
node
,
"entry"
)
)
{
p_input
=
input_item_New
(
p_demux
,
psz_mrl
,
psz_title
);
p_input
=
input_item_New
(
psz_mrl
,
psz_title
);
if
(
psz_now
)
input_item_SetNowPlaying
(
p_input
,
psz_now
);
if
(
psz_genre
)
...
...
modules/demux/playlist/dvb.c
View file @
629dbd8a
...
...
@@ -146,7 +146,7 @@ static int Demux( demux_t *p_demux )
}
}
p_input
=
input_item_NewExt
(
p_demux
,
psz_uri
,
psz_name
,
p_input
=
input_item_NewExt
(
psz_uri
,
psz_name
,
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
modules/demux/playlist/gvp.c
View file @
629dbd8a
...
...
@@ -204,7 +204,7 @@ static int Demux( demux_t *p_demux )
}
else
{
p_input
=
input_item_New
(
p_demux
,
psz_url
,
psz_title
);
p_input
=
input_item_New
(
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
);
...
...
modules/demux/playlist/ifo.c
View file @
629dbd8a
...
...
@@ -113,7 +113,7 @@ static int Demux( demux_t *p_demux )
return
0
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
input_item_t
*
p_input
=
input_item_New
(
p_demux
,
psz_url
,
psz_url
);
input_item_t
*
p_input
=
input_item_New
(
psz_url
,
psz_url
);
input_item_PostSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
@@ -136,7 +136,7 @@ static int DemuxDVD_VR( demux_t *p_demux )
memcpy
(
psz_url
+
len
,
"VR_MOVIE.VRO"
,
13
);
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
);
input_item_t
*
p_input
=
input_item_New
(
p_demux
,
psz_url
,
psz_url
);
input_item_t
*
p_input
=
input_item_New
(
psz_url
,
psz_url
);
input_item_PostSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
modules/demux/playlist/itml.c
View file @
629dbd8a
...
...
@@ -333,7 +333,7 @@ static bool parse_track_dict( demux_t *p_demux, input_item_node_t *p_input_node,
}
msg_Info
(
p_demux
,
"Adding '%s'"
,
p_track
->
location
);
p_new_input
=
input_item_New
(
p_demux
,
p_track
->
location
,
NULL
);
p_new_input
=
input_item_New
(
p_track
->
location
,
NULL
);
input_item_node_AppendItem
(
p_input_node
,
p_new_input
);
/* add meta info */
...
...
modules/demux/playlist/m3u.c
View file @
629dbd8a
...
...
@@ -226,7 +226,7 @@ static int Demux( demux_t *p_demux )
goto
error
;
}
p_input
=
input_item_NewExt
(
p_demux
,
psz_mrl
,
psz_name
,
p_input
=
input_item_NewExt
(
psz_mrl
,
psz_name
,
i_options
,
ppsz_options
,
0
,
i_duration
);
free
(
psz_parse
);
...
...
modules/demux/playlist/pls.c
View file @
629dbd8a
...
...
@@ -142,7 +142,7 @@ static int Demux( demux_t *p_demux )
/* we found a new item, insert the previous */
if
(
psz_mrl
)
{
p_input
=
input_item_New
(
p_demux
,
psz_mrl
,
psz_name
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
input_item_CopyOptions
(
p_current_input
,
p_input
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
@@ -194,7 +194,7 @@ static int Demux( demux_t *p_demux )
/* Add last object */
if
(
psz_mrl
)
{
p_input
=
input_item_New
(
p_demux
,
psz_mrl
,
psz_name
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
input_item_CopyOptions
(
p_current_input
,
p_input
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
modules/demux/playlist/podcast.c
View file @
629dbd8a
...
...
@@ -243,7 +243,7 @@ static int Demux( demux_t *p_demux )
goto
error
;
}
p_input
=
input_item_New
(
p_demux
,
psz_item_mrl
,
psz_item_name
);
p_input
=
input_item_New
(
psz_item_mrl
,
psz_item_name
);
FREENULL
(
psz_item_mrl
);
FREENULL
(
psz_item_name
);
...
...
modules/demux/playlist/qtl.c
View file @
629dbd8a
...
...
@@ -243,7 +243,7 @@ static int Demux( demux_t *p_demux )
else
{
input_item_node_t
*
p_subitems
=
input_item_node_Create
(
p_current_input
);
p_input
=
input_item_New
(
p_demux
,
psz_src
,
psz_moviename
);
p_input
=
input_item_New
(
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
);
...
...
@@ -252,7 +252,7 @@ static int Demux( demux_t *p_demux )
vlc_gc_decref
(
p_input
);
if
(
psz_qtnext
)
{
p_input
=
input_item_New
(
p_demux
,
psz_qtnext
,
NULL
);
p_input
=
input_item_New
(
psz_qtnext
,
NULL
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
}
...
...
modules/demux/playlist/ram.c
View file @
629dbd8a
...
...
@@ -326,7 +326,7 @@ static int Demux( demux_t *p_demux )
}
/* Create the input item and pump in all the options into playlist item */
p_input
=
input_item_NewExt
(
p_demux
,
psz_mrl
,
psz_title
,
i_options
,
ppsz_options
,
0
,
i_duration
);
p_input
=
input_item_NewExt
(
psz_mrl
,
psz_title
,
i_options
,
ppsz_options
,
0
,
i_duration
);
if
(
!
EMPTY_STR
(
psz_artist
)
)
input_item_SetArtist
(
p_input
,
psz_artist
);
if
(
!
EMPTY_STR
(
psz_author
)
)
input_item_SetPublisher
(
p_input
,
psz_author
);
...
...
modules/demux/playlist/sgimb.c
View file @
629dbd8a
...
...
@@ -376,7 +376,7 @@ static int Demux ( demux_t *p_demux )
}
}
p_child
=
input_item_NewWithType
(
VLC_OBJECT
(
p_demux
),
p_sys
->
psz_uri
,
p_child
=
input_item_NewWithType
(
p_sys
->
psz_uri
,
p_sys
->
psz_name
?
p_sys
->
psz_name
:
p_sys
->
psz_uri
,
0
,
NULL
,
0
,
p_sys
->
i_duration
,
ITEM_TYPE_NET
);
...
...
modules/demux/playlist/shoutcast.c
View file @
629dbd8a
...
...
@@ -178,7 +178,7 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
psz_name
)
!=
-
1
)
{
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_demux
,
psz_mrl
,
psz_name
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
input_item_CopyOptions
(
p_input_node
->
p_item
,
p_input
);
free
(
psz_mrl
);
input_item_node_AppendItem
(
p_input_node
,
p_input
);
...
...
@@ -322,7 +322,7 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
/* Create the item */
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_demux
,
psz_mrl
,
psz_name
);
p_input
=
input_item_New
(
psz_mrl
,
psz_name
);
input_item_CopyOptions
(
p_input_node
->
p_item
,
p_input
);
free
(
psz_mrl
);
...
...
modules/demux/playlist/wpl.c
View file @
629dbd8a
...
...
@@ -99,7 +99,7 @@ static int Demux( demux_t *p_demux )
*
psz_parse
=
'\0'
;
psz_uri
=
ProcessMRL
(
psz_uri
,
p_demux
->
p_sys
->
psz_prefix
);
p_input
=
input_item_NewExt
(
p_demux
,
psz_uri
,
psz_uri
,
p_input
=
input_item_NewExt
(
psz_uri
,
psz_uri
,
0
,
NULL
,
0
,
-
1
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
modules/demux/playlist/xspf.c
View file @
629dbd8a
...
...
@@ -357,7 +357,7 @@ static bool parse_track_node COMPLEX_INTERFACE
{
NULL
,
UNKNOWN_CONTENT
,
{
NULL
}
}
};
input_item_t
*
p_new_input
=
input_item_New
(
p_demux
,
NULL
,
NULL
);
input_item_t
*
p_new_input
=
input_item_New
(
NULL
,
NULL
);
input_item_node_t
*
p_new_node
=
input_item_node_Create
(
p_new_input
);
if
(
!
p_new_input
)
...
...
@@ -624,9 +624,9 @@ static bool parse_extension_node COMPLEX_INTERFACE
msg_Warn
(
p_demux
,
"<vlc:node> requires
\"
title
\"
attribute"
);
return
false
;
}
p_new_input
=
input_item_NewWithType
(
VLC_OBJECT
(
p_demux
)
,
"vlc://nop"
,
psz_title
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_DIRECTORY
);
p_new_input
=
input_item_NewWithType
(
"vlc://nop"
,
psz_title
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_DIRECTORY
);
if
(
p_new_input
)
{
p_input_node
=
...
...
modules/demux/playlist/zpl.c
View file @
629dbd8a
...
...
@@ -165,7 +165,7 @@ static int Demux( demux_t *p_demux )
else
if
(
!
strncasecmp
(
psz_parse
,
"BR!"
,
strlen
(
"BR!"
)
)
)
{
/* create the input item */
input_item_t
*
p_input
=
input_item_NewExt
(
p_demux
,
psz_mrl
,
input_item_t
*
p_input
=
input_item_NewExt
(
psz_mrl
,
psz_title
,
0
,
NULL
,
0
,
i_duration
);
input_item_node_AppendItem
(
p_subitems
,
p_input
);
FREENULL
(
psz_mrl
);
...
...
modules/gui/hildon/maemo_callbacks.c
View file @
629dbd8a
...
...
@@ -135,7 +135,7 @@ void pl_row_activated_cb( GtkTreeView *tree_view , GtkTreePath *path,
gtk_tree_model_get_iter
(
model
,
&
iter
,
path
);
gtk_tree_model_get
(
model
,
&
iter
,
0
,
&
filename
,
-
1
);
p_input
=
input_item_New
(
p_intf
,
filename
,
NULL
);
p_input
=
input_item_New
(
filename
,
NULL
);
playlist_AddInput
(
p_intf
->
p_sys
->
p_playlist
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
true
,
false
);
vlc_gc_decref
(
p_input
);
...
...
@@ -172,7 +172,7 @@ void open_cb( GtkMenuItem *menuitem, gpointer user_data )
gtk_widget_destroy
(
dialog
);
p_input
=
input_item_New
(
p_intf
,
psz_filename
,
NULL
);
p_input
=
input_item_New
(
psz_filename
,
NULL
);
playlist_AddInput
(
p_intf
->
p_sys
->
p_playlist
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
true
,
false
);
...
...
@@ -207,8 +207,7 @@ void open_address_cb( GtkMenuItem *menuitem, gpointer user_data )
return
;
}
p_input
=
input_item_New
(
p_intf
,
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)
),
p_input
=
input_item_New
(
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)
),
NULL
);
playlist_AddInput
(
p_intf
->
p_sys
->
p_playlist
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
...
...
@@ -224,7 +223,7 @@ void open_webcam_cb( GtkMenuItem *menuitem, gpointer user_data )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
user_data
;
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_intf
,
"v4l2://"
,
NULL
);
p_input
=
input_item_New
(
"v4l2://"
,
NULL
);
playlist_AddInput
(
p_intf
->
p_sys
->
p_playlist
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
,
true
,
false
);
...
...
modules/gui/macosx/applescript.m
View file @
629dbd8a
...
...
@@ -52,8 +52,7 @@
NSURL
*
o_url
;
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_playlist
,
[
o_urlString
fileSystemRepresentation
],
p_input
=
input_item_New
(
[
o_urlString
fileSystemRepresentation
],
[[[
NSFileManager
defaultManager
]
displayNameAtPath:
o_urlString
]
UTF8String
]
);
/* FIXME: playlist_AddInput() can fail */
...
...
modules/gui/macosx/playlist.m
View file @
629dbd8a
...
...
@@ -1120,7 +1120,7 @@
o_uri
=
o_temp
;
}
p_input
=
input_item_New
(
p_playlist
,
[
o_uri
fileSystemRepresentation
],
o_name
?
[
o_name
UTF8String
]
:
NULL
);
p_input
=
input_item_New
(
[
o_uri
fileSystemRepresentation
],
o_name
?
[
o_name
UTF8String
]
:
NULL
);
if
(
!
p_input
)
return
NULL
;
...
...
modules/gui/macosx/wizard.m
View file @
629dbd8a
...
...
@@ -1244,7 +1244,7 @@ static VLCWizard *_o_sharedInstance = nil;
NSString
*
tempString
=
[
NSString
stringWithFormat
:
@"%@ (%i/%i)"
,
_NS
(
"Streaming/Transcoding Wizard"
),
(
x
+
1
),
y
];
input_item_t
*
p_input
=
input_item_New
(
p_playlist
,
input_item_t
*
p_input
=
input_item_New
(
[[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
objectAtIndex:
x
]
UTF8String
],
[
tempString
UTF8String
]
);
...
...
modules/gui/qt4/dialogs/open.cpp
View file @
629dbd8a
...
...
@@ -361,7 +361,7 @@ void OpenDialog::finish( bool b_enqueue = false )
bool
b_start
=
!
i
&&
!
b_enqueue
;
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_intf
,
qtu
(
itemsMRL
[
i
]
),
NULL
);
p_input
=
input_item_New
(
qtu
(
itemsMRL
[
i
]
),
NULL
);
/* Insert options only for the first element.
We don't know how to edit that anyway. */
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
629dbd8a
...
...
@@ -508,7 +508,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
RecentsMRL
::
getInstance
(
p_intf
)
->
addRecent
(
qfu
(
uri
)
);
input_item_t
*
p_input
=
input_item_New
(
THEPL
,
uri
,
NULL
);
input_item_t
*
p_input
=
input_item_New
(
uri
,
NULL
);
free
(
uri
);
if
(
unlikely
(
p_input
==
NULL
)
)
return
;
...
...
@@ -637,7 +637,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
/* Create Input */
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_intf
,
qtu
(
mrl
),
_
(
"Streaming"
)
);
p_input
=
input_item_New
(
qtu
(
mrl
),
_
(
"Streaming"
)
);
/* Add normal Options */
for
(
int
j
=
0
;
j
<
options
.
size
();
j
++
)
...
...
modules/gui/skins2/vars/playtree.cpp
View file @
629dbd8a
...
...
@@ -313,7 +313,7 @@ void Playtree::insertItems( VarTree& elem, const list<string>& files, bool start
if
(
!
psz_uri
)
continue
;
input_item_t
*
pItem
=
input_item_New
(
m_pPlaylist
,
psz_uri
,
NULL
);
input_item_t
*
pItem
=
input_item_New
(
psz_uri
,
NULL
);
if
(
pItem
)
{
int
i_mode
=
PLAYLIST_APPEND
;
...
...
modules/lua/libs/sd.c
View file @
629dbd8a
...
...
@@ -115,8 +115,7 @@ static int vlclua_sd_add_node( lua_State *L )
if
(
lua_isstring
(
L
,
-
1
)
)
{
const
char
*
psz_name
=
lua_tostring
(
L
,
-
1
);
input_item_t
*
p_input
=
input_item_NewWithType
(
VLC_OBJECT
(
p_sd
),
"vlc://nop"
,
input_item_t
*
p_input
=
input_item_NewWithType
(
"vlc://nop"
,
psz_name
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NODE
);
lua_pop
(
L
,
1
);
...
...
@@ -166,7 +165,7 @@ static int vlclua_sd_add_item( lua_State *L )
int
i_options
=
0
;
const
char
*
psz_path
=
lua_tostring
(
L
,
-
1
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
input_item_t
*
p_input
=
input_item_NewExt
(
p_sd
,
psz_path
,
psz_path
,
input_item_t
*
p_input
=
input_item_NewExt
(
psz_path
,
psz_path
,
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
...
...
@@ -238,7 +237,7 @@ static int vlclua_node_add_subitem( lua_State *L )
const
char
*
psz_path
=
lua_tostring
(
L
,
-
1
);
vlclua_read_options
(
p_sd
,
L
,
&
i_options
,
&
ppsz_options
);
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
input_item_t
*
p_input
=
input_item_NewExt
(
p_sd
,
psz_path
,
input_item_t
*
p_input
=
input_item_NewExt
(
psz_path
,
psz_path
,
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
-
1
);
...
...
@@ -294,8 +293,7 @@ static int vlclua_node_add_node( lua_State *L )
{
const
char
*
psz_name
=
lua_tostring
(
L
,
-
1
);
input_item_node_t
*
p_input_node
=
input_item_node_Create
(
*
pp_node
);
input_item_t
*
p_input
=
input_item_NewWithType
(
VLC_OBJECT
(
p_sd
),
"vlc://nop"
,
input_item_t
*
p_input
=
input_item_NewWithType
(
"vlc://nop"
,
psz_name
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NODE
);
lua_pop
(
L
,
1
);
...
...
modules/lua/vlc.c
View file @
629dbd8a
...
...
@@ -547,8 +547,7 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
vlclua_read_options
(
p_this
,
L
,
&
i_options
,
&
ppsz_options
);
/* Create input item */
p_input
=
input_item_NewExt
(
p_playlist
,
psz_path
,
psz_name
,
i_options
,
p_input
=
input_item_NewExt
(
psz_path
,
psz_name
,
i_options
,
(
const
char
**
)
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
i_duration
);
...
...
modules/media_library/sql_media_library.c
View file @
629dbd8a
...
...
@@ -1359,9 +1359,7 @@ static int CreateInputItemFromMedia( media_library_t *p_ml,
ml_media_t
*
p_media
)
{
playlist_t
*
p_pl
=
pl_Get
(
p_ml
);
*
pp_item
=
input_item_New
(
VLC_OBJECT
(
p_pl
),
p_media
->
psz_uri
,
p_media
->
psz_title
);
*
pp_item
=
input_item_New
(
p_media
->
psz_uri
,
p_media
->
psz_title
);
/* ITEM_TYPE_FILE ); */
if
(
!*
pp_item
)
return
VLC_EGENERIC
;
...
...
modules/media_library/sql_monitor.c
View file @
629dbd8a
...
...
@@ -480,8 +480,7 @@ static void ScanFiles( monitoring_thread_t *p_mon, int i_dir_id,
if
(
b_skip
)
continue
;
p_input
=
input_item_New
(
VLC_OBJECT
(
p_mon
),
psz_encoded_uri
,
psz_entry
);
p_input
=
input_item_New
(
psz_encoded_uri
,
psz_entry
);
playlist_t
*
p_pl
=
pl_Get
(
p_mon
);
preparsed_item_t
*
p_itemobject
;
...
...
modules/services_discovery/bonjour.c
View file @
629dbd8a
...
...
@@ -176,7 +176,7 @@ static void resolve_callback(
if
(
psz_uri
!=
NULL
)
{
p_input
=
input_item_New
(
p_sd
,
psz_uri
,
name
);
p_input
=
input_item_New
(
psz_uri
,
name
);
free
(
psz_uri
);
}
if
(
p_input
!=
NULL
)
...
...
modules/services_discovery/mediadirs.c
View file @
629dbd8a
...
...
@@ -192,7 +192,7 @@ static void *Run( void *data )
char
*
psz_uri
=
make_URI
(
psz_dir
,
"file"
);
input_item_t
*
p_root
=
input_item_New
(
p_sd
,
psz_uri
,
NULL
);
input_item_t
*
p_root
=
input_item_New
(
psz_uri
,
NULL
);
if
(
p_sys
->
i_type
==
Picture
)
input_item_AddOption
(
p_root
,
"ignore-filetypes=ini,db,lnk,txt"
,
VLC_INPUT_OPTION_TRUSTED
);
...
...
@@ -269,7 +269,7 @@ static int onNewFileAdded( vlc_object_t *p_this, char const *psz_var,
return
VLC_EGENERIC
;
char
*
psz_uri
=
make_URI
(
psz_file
,
"file"
);
input_item_t
*
p_item
=
input_item_New
(
p_sd
,
psz_uri
,
NULL
);
input_item_t
*
p_item
=
input_item_New
(
psz_uri
,
NULL
);
if
(
p_sys
->
i_type
==
Picture
)
{
...
...
modules/services_discovery/mtp.c
View file @
629dbd8a
...
...
@@ -242,8 +242,7 @@ static void AddTrack( services_discovery_t *p_sd, LIBMTP_track_t *p_track )
msg_Err
(
p_sd
,
"Error adding %s, skipping it"
,
p_track
->
filename
);
return
;
}
if
(
(
p_input
=
input_item_New
(
p_sd
,
psz_string
,
p_track
->
title
)
)
==
NULL
)
if
(
(
p_input
=
input_item_New
(
psz_string
,
p_track
->
title
)
)
==
NULL
)
{
msg_Err
(
p_sd
,
"Error adding %s, skipping it"
,
p_track
->
filename
);
free
(
psz_string
);
...
...
modules/services_discovery/podcast.c
View file @
629dbd8a
...
...
@@ -311,7 +311,7 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
strdup
(
psz_urls
)
);
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_sd
,
psz_urls
,
psz_urls
);
p_input
=
input_item_New
(
psz_urls
,
psz_urls
);
input_item_AddOption
(
p_input
,
"demux=podcast"
,
VLC_INPUT_OPTION_TRUSTED
);
INSERT_ELEM
(
pp_new_items
,
i_new_items
,
i_new_items
,
p_input
);
...
...
@@ -374,7 +374,7 @@ static void ParseRequest( services_discovery_t *p_sd )
strdup
(
psz_request
)
);
input_item_t
*
p_input
;
p_input
=
input_item_New
(
p_sd
,
psz_request
,
psz_request
);
p_input
=
input_item_New
(
psz_request
,
psz_request
);
input_item_AddOption
(
p_input
,
"demux=podcast"
,
VLC_INPUT_OPTION_TRUSTED
);
INSERT_ELEM
(
p_sys
->
pp_items
,
p_sys
->
i_items
,
p_sys
->
i_items
,
p_input
);
...
...
modules/services_discovery/sap.c
View file @
629dbd8a
...
...
@@ -827,10 +827,9 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
p_sap
->
p_sdp
=
p_sdp
;
/* Released in RemoveAnnounce */
p_input
=
input_item_NewWithType
(
VLC_OBJECT
(
p_sd
),
p_sap
->
p_sdp
->
psz_uri
,
p_sdp
->
psz_sessionname
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NET
);
p_input
=
input_item_NewWithType
(
p_sap
->
p_sdp
->
psz_uri
,
p_sdp
->
psz_sessionname
,
0
,
NULL
,
0
,
-
1
,
ITEM_TYPE_NET
);
p_sap
->
p_item
=
p_input
;
if
(
!
p_input
)
{
...
...
modules/services_discovery/udev.c
View file @
629dbd8a
...
...
@@ -162,8 +162,7 @@ static int AddDevice (services_discovery_t *sd, struct udev_device *dev)
if
(
mrl
==
NULL
)
return
0
;
/* don't know if it was an error... */
char
*
name
=
p_sys
->
subsys
->
get_name
(
dev
);
input_item_t
*
item
=
input_item_NewWithType
(
VLC_OBJECT
(
sd
),
mrl
,
name
?
name
:
mrl
,
input_item_t
*
item
=
input_item_NewWithType
(
mrl
,
name
?
name
:
mrl
,
0
,
NULL
,
0
,
-
1
,
p_sys
->
subsys
->
item_type
);
msg_Dbg
(
sd
,
"adding %s (%s)"
,
mrl
,
name
);
...
...
modules/services_discovery/upnp.cpp
View file @
629dbd8a
...
...
@@ -890,7 +890,7 @@ void MediaServer::_buildPlaylist( Container* p_parent, input_item_node_t *p_inpu
{
Container
*
p_container
=
p_parent
->
getContainer
(
i
);
input_item_t
*
p_input_item
=
input_item_New
(
_p_sd
,
"vlc://nop"
,
input_item_t
*
p_input_item
=
input_item_New
(
"vlc://nop"
,
p_container
->
getTitle
()
);
input_item_node_t
*
p_new_node
=
input_item_node_AppendItem
(
p_input_node
,
p_input_item
);
...
...
@@ -903,8 +903,7 @@ void MediaServer::_buildPlaylist( Container* p_parent, input_item_node_t *p_inpu
{
Item
*
p_item
=
p_parent
->
getItem
(
i
);
input_item_t
*
p_input_item
=
input_item_NewExt
(
_p_sd
,
p_item
->
getResource
(),
input_item_t
*
p_input_item
=
input_item_NewExt
(
p_item
->
getResource
(),
p_item
->
getTitle
(),
0
,
NULL
,
...
...
@@ -966,8 +965,7 @@ bool MediaServerList::addServer( MediaServer* p_server )
msg_Dbg
(
_p_sd
,
"Adding server '%s' with uuid '%s'"
,
p_server
->
getFriendlyName
(),
p_server
->
getUDN
()
);
p_input_item
=
input_item_New
(
_p_sd
,
"vlc://nop"
,
p_server
->
getFriendlyName
()
);
p_input_item
=
input_item_New
(
"vlc://nop"
,
p_server
->
getFriendlyName
()