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
75c556ad
Commit
75c556ad
authored
Aug 21, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux playlist: Move the usage of vlc_object_find behind one function.
parent
279339a6
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
43 additions
and
40 deletions
+43
-40
modules/demux/playlist/asx.c
modules/demux/playlist/asx.c
+2
-2
modules/demux/playlist/b4s.c
modules/demux/playlist/b4s.c
+2
-2
modules/demux/playlist/dvb.c
modules/demux/playlist/dvb.c
+2
-2
modules/demux/playlist/gvp.c
modules/demux/playlist/gvp.c
+2
-2
modules/demux/playlist/ifo.c
modules/demux/playlist/ifo.c
+2
-2
modules/demux/playlist/itml.c
modules/demux/playlist/itml.c
+2
-2
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+2
-2
modules/demux/playlist/playlist.c
modules/demux/playlist/playlist.c
+8
-0
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+2
-7
modules/demux/playlist/pls.c
modules/demux/playlist/pls.c
+2
-2
modules/demux/playlist/podcast.c
modules/demux/playlist/podcast.c
+3
-3
modules/demux/playlist/qtl.c
modules/demux/playlist/qtl.c
+2
-2
modules/demux/playlist/ram.c
modules/demux/playlist/ram.c
+2
-2
modules/demux/playlist/sgimb.c
modules/demux/playlist/sgimb.c
+2
-2
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+2
-2
modules/demux/playlist/wpl.c
modules/demux/playlist/wpl.c
+2
-2
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+2
-2
modules/demux/playlist/zpl.c
modules/demux/playlist/zpl.c
+2
-2
No files found.
modules/demux/playlist/asx.c
View file @
75c556ad
...
...
@@ -234,7 +234,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_parse
=
NULL
;
char
*
psz_backup
=
NULL
;
bool
b_entry
=
false
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
/* init txt */
if
(
p_sys
->
i_data_len
<
0
)
...
...
@@ -710,7 +710,7 @@ static int Demux( demux_t *p_demux )
STARTMARK
#endif
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/b4s.c
View file @
75c556ad
...
...
@@ -91,7 +91,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_mrl
=
NULL
,
*
psz_name
=
NULL
,
*
psz_genre
=
NULL
;
char
*
psz_now
=
NULL
,
*
psz_listeners
=
NULL
,
*
psz_bitrate
=
NULL
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_xml
=
p_sys
->
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
return
-
1
;
...
...
@@ -295,7 +295,7 @@ static int Demux( demux_t *p_demux )
free
(
psz_elname
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/dvb.c
View file @
75c556ad
...
...
@@ -101,7 +101,7 @@ static int Demux( demux_t *p_demux )
{
char
*
psz_line
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
))
)
{
...
...
@@ -131,7 +131,7 @@ static int Demux( demux_t *p_demux )
free
(
psz_line
);
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/gvp.c
View file @
75c556ad
...
...
@@ -129,7 +129,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_description
=
NULL
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_sys
->
p_current_input
=
p_current_input
;
...
...
@@ -212,7 +212,7 @@ static int Demux( demux_t *p_demux )
vlc_gc_decref
(
p_input
);
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
free
(
psz_version
);
free
(
psz_url
);
...
...
modules/demux/playlist/ifo.c
View file @
75c556ad
...
...
@@ -88,7 +88,7 @@ static int Demux( demux_t *p_demux )
size_t
len
=
0
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
len
=
strlen
(
"dvd://"
)
+
strlen
(
p_demux
->
psz_path
)
-
strlen
(
"VIDEO_TS.IFO"
);
...
...
@@ -99,7 +99,7 @@ static int Demux( demux_t *p_demux )
input_item_AddSubItem
(
p_current_input
,
p_input
);
vlc_gc_decref
(
p_input
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/itml.c
View file @
75c556ad
...
...
@@ -71,7 +71,7 @@ int Demux( demux_t *p_demux )
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_name
=
NULL
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_demux
->
p_sys
->
i_ntracks
=
0
;
/* create new xml parser from stream */
...
...
@@ -106,7 +106,7 @@ int Demux( demux_t *p_demux )
parse_plist_node
(
p_demux
,
p_current_input
,
NULL
,
p_xml_reader
,
"plist"
,
pl_elements
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
end:
free
(
psz_name
);
...
...
modules/demux/playlist/m3u.c
View file @
75c556ad
...
...
@@ -148,7 +148,7 @@ static int Demux( demux_t *p_demux )
bool
b_cleanup
=
false
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
while
(
psz_line
)
...
...
@@ -249,7 +249,7 @@ static int Demux( demux_t *p_demux )
b_cleanup
=
false
;
}
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
var_Destroy
(
p_demux
,
"m3u-extvlcopt"
);
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/playlist.c
View file @
75c556ad
...
...
@@ -165,6 +165,14 @@ vlc_module_begin ()
set_callbacks
(
Import_ZPL
,
Close_ZPL
)
vlc_module_end
()
input_item_t
*
GetCurrentItem
(
demux_t
*
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
);
vlc_gc_incref
(
p_current_input
);
vlc_object_release
(
p_input_thread
);
return
p_current_input
;
}
/**
* Find directory part of the path to the playlist file, in case of
...
...
modules/demux/playlist/playlist.h
View file @
75c556ad
...
...
@@ -22,6 +22,7 @@
*****************************************************************************/
#include <vlc_input.h>
#include <vlc_playlist.h>
char
*
ProcessMRL
(
char
*
,
char
*
);
char
*
FindPrefix
(
demux_t
*
);
...
...
@@ -82,13 +83,7 @@ void Close_WPL ( vlc_object_t * );
int
Import_ZPL
(
vlc_object_t
*
);
void
Close_ZPL
(
vlc_object_t
*
);
#define INIT_PLAYLIST_STUFF \
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 );
extern
input_item_t
*
GetCurrentItem
(
demux_t
*
p_demux
);
#define STANDARD_DEMUX_INIT_MSG( msg ) do { \
DEMUX_INIT_COMMON(); \
...
...
modules/demux/playlist/pls.c
View file @
75c556ad
...
...
@@ -91,7 +91,7 @@ static int Demux( demux_t *p_demux )
int
i_key_length
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
)
)
)
{
...
...
@@ -228,7 +228,7 @@ static int Demux( demux_t *p_demux )
free
(
psz_name
);
psz_name
=
NULL
;
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/podcast.c
View file @
75c556ad
...
...
@@ -91,7 +91,7 @@ static int Demux( demux_t *p_demux )
int
i_type
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
...
...
@@ -363,7 +363,7 @@ static int Demux( demux_t *p_demux )
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
xml_Delete
(
p_xml
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
0
;
/* Needed for correct operation of go back */
error:
...
...
@@ -386,7 +386,7 @@ error:
if
(
p_xml
)
xml_Delete
(
p_xml
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
-
1
;
}
...
...
modules/demux/playlist/qtl.c
View file @
75c556ad
...
...
@@ -124,7 +124,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_mimetype
=
NULL
;
int
i_volume
=
100
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
...
...
@@ -327,7 +327,7 @@ error:
if
(
p_xml
)
xml_Delete
(
p_xml
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
free
(
psz_href
);
free
(
psz_moviename
);
...
...
modules/demux/playlist/ram.c
View file @
75c556ad
...
...
@@ -214,7 +214,7 @@ static int Demux( demux_t *p_demux )
bool
b_cleanup
=
false
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
while
(
psz_line
)
...
...
@@ -360,7 +360,7 @@ static int Demux( demux_t *p_demux )
b_cleanup
=
false
;
}
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
var_Destroy
(
p_demux
,
"m3u-extvlcopt"
);
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/sgimb.c
View file @
75c556ad
...
...
@@ -324,7 +324,7 @@ static int Demux ( demux_t *p_demux )
input_item_t
*
p_child
=
NULL
;
char
*
psz_line
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
while
(
(
psz_line
=
stream_ReadLine
(
p_demux
->
s
)
)
)
{
...
...
@@ -404,7 +404,7 @@ static int Demux ( demux_t *p_demux )
input_item_AddSubItem
(
p_current_input
,
p_child
);
vlc_gc_decref
(
p_child
);
HANDLE_PLAY_AND_RELEASE
vlc_gc_decref
(
p_current_input
);
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/shoutcast.c
View file @
75c556ad
...
...
@@ -83,7 +83,7 @@ static int Demux( demux_t *p_demux )
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_eltname
=
NULL
;
int
i_ret
=
-
1
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_xml
=
xml_Create
(
p_demux
);
if
(
!
p_xml
)
...
...
@@ -132,7 +132,7 @@ error:
if
(
p_xml
)
xml_Delete
(
p_xml
);
free
(
psz_eltname
);
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
return
i_ret
;
}
...
...
modules/demux/playlist/wpl.c
View file @
75c556ad
...
...
@@ -93,7 +93,7 @@ static int Demux( demux_t *p_demux )
char
*
psz_parse
;
input_item_t
*
p_input
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
while
(
psz_line
)
...
...
@@ -124,7 +124,7 @@ static int Demux( demux_t *p_demux )
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
var_Destroy
(
p_demux
,
"wpl-extvlcopt"
);
return
0
;
/* Needed for correct operation of go back */
}
...
...
modules/demux/playlist/xspf.c
View file @
75c556ad
...
...
@@ -83,7 +83,7 @@ int Demux( demux_t *p_demux )
xml_t
*
p_xml
=
NULL
;
xml_reader_t
*
p_xml_reader
=
NULL
;
char
*
psz_name
=
NULL
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
p_demux
->
p_sys
->
pp_tracklist
=
NULL
;
p_demux
->
p_sys
->
i_tracklist_entries
=
0
;
p_demux
->
p_sys
->
i_track_id
=
-
1
;
...
...
@@ -130,7 +130,7 @@ int Demux( demux_t *p_demux )
}
end:
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
if
(
p_xml_reader
)
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
if
(
p_xml
)
...
...
modules/demux/playlist/zpl.c
View file @
75c556ad
...
...
@@ -97,7 +97,7 @@ static int Demux( demux_t *p_demux )
*
psz_description
=
NULL
,
*
psz_url
=
NULL
,
*
psz_copyright
=
NULL
,
*
psz_mrl
=
NULL
;
INIT_PLAYLIST_STUFF
;
input_item_t
*
p_current_input
=
GetCurrentItem
(
p_demux
)
;
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
char
*
psz_parse
=
psz_line
;
...
...
@@ -212,7 +212,7 @@ static int Demux( demux_t *p_demux )
psz_line
=
stream_ReadLine
(
p_demux
->
s
);
}
HANDLE_PLAY_AND_RELEASE
;
vlc_gc_decref
(
p_current_input
)
;
var_Destroy
(
p_demux
,
"zpl-extvlcopt"
);
return
0
;
/* Needed for correct operation of go back */
}
...
...
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