Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b4feb9f9
Commit
b4feb9f9
authored
Jan 17, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use input_item_New when applicable.
parent
d3081fff
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
28 additions
and
46 deletions
+28
-46
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+1
-2
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+1
-2
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+8
-8
modules/demux/playlist/gvp.c
modules/demux/playlist/gvp.c
+1
-2
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+1
-1
modules/demux/playlist/itml.c
modules/demux/playlist/itml.c
+1
-2
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+1
-3
modules/demux/playlist/pls.c
modules/demux/playlist/pls.c
+2
-3
modules/demux/playlist/podcast.c
modules/demux/playlist/podcast.c
+1
-2
modules/demux/playlist/qtl.c
modules/demux/playlist/qtl.c
+2
-4
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+3
-7
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+2
-2
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+1
-2
modules/services_discovery/bonjour.c
modules/services_discovery/bonjour.c
+1
-1
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+1
-2
modules/services_discovery/shout.c
modules/services_discovery/shout.c
+1
-3
No files found.
modules/demux/mp4/mp4.c
View file @
b4feb9f9
...
...
@@ -416,8 +416,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_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
);
...
...
modules/demux/playlist/b4s.c
View file @
b4feb9f9
...
...
@@ -261,8 +261,7 @@ static int Demux( demux_t *p_demux )
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
)
...
...
modules/demux/playlist/dvb.c
View file @
b4feb9f9
...
...
@@ -106,7 +106,7 @@ static int Demux( demux_t *p_demux )
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
)
)
...
...
@@ -116,16 +116,16 @@ static int Demux( demux_t *p_demux )
}
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
);
...
...
modules/demux/playlist/gvp.c
View file @
b4feb9f9
...
...
@@ -202,8 +202,7 @@ static int Demux( demux_t *p_demux )
}
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
);
...
...
modules/demux/playlist/ifo.c
View file @
b4feb9f9
...
...
@@ -95,7 +95,7 @@ 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_item_New
Ext
(
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
);
...
...
modules/demux/playlist/itml.c
View file @
b4feb9f9
...
...
@@ -380,8 +380,7 @@ 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_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 */
...
...
modules/demux/playlist/m3u.c
View file @
b4feb9f9
...
...
@@ -218,14 +218,12 @@ static int Demux( demux_t *p_demux )
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
);
}
...
...
modules/demux/playlist/pls.c
View file @
b4feb9f9
...
...
@@ -159,8 +159,7 @@ static int Demux( demux_t *p_demux )
{
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
);
...
...
@@ -215,7 +214,7 @@ static int Demux( demux_t *p_demux )
/* Add last object */
if
(
psz_mrl
)
{
p_input
=
input_item_New
Ext
(
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
);
...
...
modules/demux/playlist/podcast.c
View file @
b4feb9f9
...
...
@@ -291,8 +291,7 @@ static int Demux( demux_t *p_demux )
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, \
...
...
modules/demux/playlist/qtl.c
View file @
b4feb9f9
...
...
@@ -349,8 +349,7 @@ static int Demux( demux_t *p_demux )
}
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
);
...
...
@@ -359,8 +358,7 @@ static int Demux( demux_t *p_demux )
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
);
}
...
...
modules/demux/playlist/shoutcast.c
View file @
b4feb9f9
...
...
@@ -228,8 +228,7 @@ static int DemuxGenre( demux_t *p_demux )
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
);
...
...
@@ -399,13 +398,10 @@ static int DemuxStation( demux_t *p_demux )
psz_base
,
psz_id
)
==
-
1
)
psz_mrl
=
NULL
;
}
p_input
=
input_item_New
Ext
(
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
);
...
...
modules/demux/playlist/xspf.c
View file @
b4feb9f9
...
...
@@ -416,11 +416,11 @@ static bool parse_track_node COMPLEX_INTERFACE
{
NULL
,
UNKNOWN_CONTENT
,
{
NULL
}
}
};
input_item_t
*
p_new_input
=
input_item_New
Ext
(
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_New
Ext
, so bailout early */
/* malloc has failed for input_item_New, so bailout early */
return
false
;
}
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
b4feb9f9
...
...
@@ -437,8 +437,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
{
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
,
...
...
modules/services_discovery/bonjour.c
View file @
b4feb9f9
...
...
@@ -175,7 +175,7 @@ static void resolve_callback(
if
(
psz_uri
!=
NULL
)
{
p_input
=
input_item_New
Ext
(
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
)
...
...
modules/services_discovery/podcast.c
View file @
b4feb9f9
...
...
@@ -245,8 +245,7 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
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
);
...
...
modules/services_discovery/shout.c
View file @
b4feb9f9
...
...
@@ -186,9 +186,7 @@ static input_item_t * CreateInputItemFromShoutItem( services_discovery_t *p_sd,
{
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
++
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment