Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a0e351f5
Commit
a0e351f5
authored
16 years ago
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux/playlist: Don't use playlist_t.
parent
fcaf3746
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
32 deletions
+19
-32
modules/demux/playlist/asx.c
modules/demux/playlist/asx.c
+2
-2
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+3
-5
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+1
-1
modules/demux/playlist/gvp.c
modules/demux/playlist/gvp.c
+1
-8
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+1
-1
modules/demux/playlist/itml.c
modules/demux/playlist/itml.c
+7
-8
modules/demux/playlist/itml.h
modules/demux/playlist/itml.h
+0
-1
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+1
-1
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+3
-5
No files found.
modules/demux/playlist/asx.c
View file @
a0e351f5
...
...
@@ -459,7 +459,7 @@ 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_
playlist
,
psz_string
,
psz_title_asx
);
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
);
free
(
psz_string
);
...
...
@@ -516,7 +516,7 @@ 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_
playlist
,
psz_href
,
psz_name
,
i_options
,
(
const
char
*
const
*
)
ppsz_options
,
-
1
);
p_entry
=
input_ItemNewExt
(
p_
demux
,
psz_href
,
psz_name
,
i_options
,
(
const
char
*
const
*
)
ppsz_options
,
-
1
);
FREENULL
(
psz_name
);
input_ItemCopyOptions
(
p_current_input
,
p_entry
);
while
(
i_options
)
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/b4s.c
View file @
a0e351f5
...
...
@@ -109,7 +109,6 @@ static int Demux( demux_t *p_demux )
if
(
xml_ReaderRead
(
p_xml_reader
)
!=
1
)
{
msg_Err
(
p_demux
,
"invalid file (no root node)"
);
vlc_object_release
(
p_playlist
);
return
-
1
;
}
...
...
@@ -120,7 +119,6 @@ static int Demux( demux_t *p_demux )
msg_Err
(
p_demux
,
"invalid root node %i, %s"
,
xml_ReaderNodeType
(
p_xml_reader
),
psz_elname
);
free
(
psz_elname
);
vlc_object_release
(
p_playlist
);
return
-
1
;
}
free
(
psz_elname
);
...
...
@@ -258,16 +256,16 @@ static int Demux( demux_t *p_demux )
if
(
!
psz_elname
)
return
-
1
;
if
(
!
strcmp
(
psz_elname
,
"entry"
)
)
{
p_input
=
input_ItemNewExt
(
p_
playlist
,
psz_mrl
,
psz_name
,
p_input
=
input_ItemNewExt
(
p_
demux
,
psz_mrl
,
psz_name
,
0
,
NULL
,
-
1
);
if
(
psz_now
)
input_item_SetNowPlaying
(
p_input
,
psz_now
);
if
(
psz_genre
)
input_item_SetGenre
(
p_input
,
psz_genre
);
if
(
psz_listeners
)
msg_Err
(
p_
playlist
,
"Unsupported meta listeners"
);
msg_Err
(
p_
demux
,
"Unsupported meta listeners"
);
if
(
psz_bitrate
)
msg_Err
(
p_
playlist
,
"Unsupported meta bitrate"
);
msg_Err
(
p_
demux
,
"Unsupported meta bitrate"
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/dvb.c
View file @
a0e351f5
...
...
@@ -117,7 +117,7 @@ static int Demux( demux_t *p_demux )
EnsureUTF8
(
psz_name
);
p_input
=
input_ItemNewExt
(
p_
playlist
,
"dvb://"
,
psz_name
,
0
,
NULL
,
-
1
);
p_input
=
input_ItemNewExt
(
p_
demux
,
"dvb://"
,
psz_name
,
0
,
NULL
,
-
1
);
for
(
i
=
0
;
i
<
i_options
;
i
++
)
{
EnsureUTF8
(
ppsz_options
[
i
]
);
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/gvp.c
View file @
a0e351f5
...
...
@@ -61,7 +61,6 @@ description:The now infamous Apple Macintosh commercial aired during the 1984 Su
struct
demux_sys_t
{
playlist_t
*
p_playlist
;
input_item_t
*
p_current_input
;
};
...
...
@@ -98,7 +97,6 @@ int Import_GVP( vlc_object_t *p_this )
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_demux
=
Demux
;
MALLOC_ERR
(
p_demux
->
p_sys
,
demux_sys_t
);
p_demux
->
p_sys
->
p_playlist
=
NULL
;
return
VLC_SUCCESS
;
}
...
...
@@ -111,8 +109,6 @@ void Close_GVP( vlc_object_t *p_this )
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
p_sys
->
p_playlist
)
vlc_object_release
(
p_sys
->
p_playlist
);
free
(
p_sys
);
}
...
...
@@ -133,7 +129,6 @@ static int Demux( demux_t *p_demux )
INIT_PLAYLIST_STUFF
;
p_sys
->
p_playlist
=
p_playlist
;
p_sys
->
p_current_input
=
p_current_input
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
)
)
)
...
...
@@ -206,7 +201,7 @@ static int Demux( demux_t *p_demux )
}
else
{
p_input
=
input_ItemNewExt
(
p_
sys
->
p_playlist
,
p_input
=
input_ItemNewExt
(
p_
demux
,
psz_url
,
psz_title
,
0
,
NULL
,
-
1
);
#define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
p_input, _("Google Video"), _(type), "%s", field ) ; }
...
...
@@ -225,8 +220,6 @@ static int Demux( demux_t *p_demux )
free
(
psz_title
);
free
(
psz_description
);
p_sys
->
p_playlist
=
NULL
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/ifo.c
View file @
a0e351f5
...
...
@@ -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_ItemNewExt
(
p_
playlist
,
psz_url
,
psz_url
,
0
,
NULL
,
-
1
);
p_input
=
input_ItemNewExt
(
p_
demux
,
psz_url
,
psz_url
,
0
,
NULL
,
-
1
);
input_ItemAddSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/itml.c
View file @
a0e351f5
...
...
@@ -114,7 +114,7 @@ int Demux( demux_t *p_demux )
{
xml_elem_hnd_t
pl_elements
[]
=
{
{
"dict"
,
COMPLEX_CONTENT
,
{.
cmplx
=
parse_plist_dict
}
}
};
i_ret
=
parse_plist_node
(
p_demux
,
p_
playlist
,
p_
current_input
,
i_ret
=
parse_plist_node
(
p_demux
,
p_current_input
,
NULL
,
p_xml_reader
,
"plist"
,
pl_elements
);
HANDLE_PLAY_AND_RELEASE
;
...
...
@@ -172,7 +172,7 @@ static bool parse_plist_node COMPLEX_INTERFACE
if
(
!
b_version_found
)
msg_Warn
(
p_demux
,
"<plist> requires
\"
version
\"
attribute"
);
return
parse_dict
(
p_demux
,
p_
playlist
,
p_
input_item
,
NULL
,
p_xml_reader
,
return
parse_dict
(
p_demux
,
p_input_item
,
NULL
,
p_xml_reader
,
"plist"
,
p_handlers
);
}
...
...
@@ -220,7 +220,6 @@ static bool parse_dict COMPLEX_INTERFACE
if
(
p_handler
->
type
==
COMPLEX_CONTENT
)
{
if
(
p_handler
->
pf_handler
.
cmplx
(
p_demux
,
p_playlist
,
p_input_item
,
NULL
,
p_xml_reader
,
...
...
@@ -316,7 +315,7 @@ static bool parse_plist_dict COMPLEX_INTERFACE
{
NULL
,
UNKNOWN_CONTENT
,
{
NULL
}
}
};
return
parse_dict
(
p_demux
,
p_
playlist
,
p_
input_item
,
NULL
,
p_xml_reader
,
return
parse_dict
(
p_demux
,
p_input_item
,
NULL
,
p_xml_reader
,
"dict"
,
pl_elements
);
}
...
...
@@ -329,7 +328,7 @@ static bool parse_tracks_dict COMPLEX_INTERFACE
{
NULL
,
UNKNOWN_CONTENT
,
{
NULL
}
}
};
parse_dict
(
p_demux
,
p_
playlist
,
p_
input_item
,
NULL
,
p_xml_reader
,
parse_dict
(
p_demux
,
p_input_item
,
NULL
,
p_xml_reader
,
"dict"
,
tracks_elements
);
msg_Info
(
p_demux
,
"added %i tracks successfully"
,
...
...
@@ -357,7 +356,7 @@ static bool parse_track_dict COMPLEX_INTERFACE
{
NULL
,
UNKNOWN_CONTENT
,
{
NULL
}
}
};
i_ret
=
parse_dict
(
p_demux
,
p_
playlist
,
p_
input_item
,
p_track
,
i_ret
=
parse_dict
(
p_demux
,
p_input_item
,
p_track
,
p_xml_reader
,
"dict"
,
track_elements
);
msg_Dbg
(
p_demux
,
"name: %s, artist: %s, album: %s, genre: %s, trackNum: %s, location: %s"
,
...
...
@@ -381,7 +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_ItemNewExt
(
p_
playlist
,
psz_uri
,
p_new_input
=
input_ItemNewExt
(
p_
demux
,
psz_uri
,
NULL
,
0
,
NULL
,
-
1
);
input_ItemAddSubItem
(
p_input_item
,
p_new_input
);
...
...
@@ -488,7 +487,7 @@ static bool add_meta( input_item_t *p_input_item,
*/
static
bool
skip_element
COMPLEX_INTERFACE
{
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
p_
playlist
);
VLC_UNUSED
(
p_
input_item
);
VLC_UNUSED
(
p_demux
);
VLC_UNUSED
(
p_input_item
);
VLC_UNUSED
(
p_track
);
VLC_UNUSED
(
p_handlers
);
char
*
psz_endname
;
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/itml.h
View file @
a0e351f5
...
...
@@ -41,7 +41,6 @@
const char *psz_name,\
char *psz_value)
#define COMPLEX_INTERFACE (demux_t *p_demux,\
playlist_t *p_playlist,\
input_item_t *p_input_item,\
track_elem_t *p_track,\
xml_reader_t *p_xml_reader,\
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/m3u.c
View file @
a0e351f5
...
...
@@ -182,7 +182,7 @@ static int Demux( demux_t *p_demux )
b_cleanup
=
true
;
if
(
!
psz_mrl
)
goto
error
;
p_input
=
input_ItemNewExt
(
p_
playlist
,
psz_mrl
,
psz_name
,
p_input
=
input_ItemNewExt
(
p_
demux
,
psz_mrl
,
psz_name
,
0
,
NULL
,
i_duration
);
if
(
psz_artist
&&
*
psz_artist
)
...
...
This diff is collapsed.
Click to expand it.
modules/demux/playlist/playlist.h
View file @
a0e351f5
...
...
@@ -21,7 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <vlc_playlist.h>
#include <vlc_input.h>
char
*
ProcessMRL
(
char
*
,
char
*
);
char
*
FindPrefix
(
demux_t
*
);
...
...
@@ -77,11 +78,8 @@ int Import_iTML ( vlc_object_t * );
void
Close_iTML
(
vlc_object_t
*
);
#define INIT_PLAYLIST_STUFF \
playlist_t *p_playlist = pl_Yield( p_demux ); \
input_thread_t *p_input_thread = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); \
input_item_t *p_current_input = input_GetItem( p_input_thread );
#define HANDLE_PLAY_AND_RELEASE \
vlc_object_release( p_input_thread ); \
vlc_object_release( p_playlist );
vlc_object_release( p_input_thread );
This diff is collapsed.
Click to expand it.
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