Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f3c6bbcc
Commit
f3c6bbcc
authored
Jul 08, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some infrastructure work for playlist autoload/autosave
parent
3c47829f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
33 deletions
+41
-33
include/vlc_playlist.h
include/vlc_playlist.h
+1
-1
include/vlc_symbols.h
include/vlc_symbols.h
+7
-1
modules/control/rc.c
modules/control/rc.c
+2
-0
modules/demux/playlist/xspf.c
modules/demux/playlist/xspf.c
+2
-2
src/playlist/item.c
src/playlist/item.c
+5
-0
src/playlist/loadsave.c
src/playlist/loadsave.c
+21
-27
src/playlist/search.c
src/playlist/search.c
+3
-2
No files found.
include/vlc_playlist.h
View file @
f3c6bbcc
...
...
@@ -352,7 +352,7 @@ VLC_EXPORT( int, playlist_NodeSort, ( playlist_t *, playlist_item_t *,int, int
VLC_EXPORT
(
int
,
playlist_RecursiveNodeSort
,
(
playlist_t
*
,
playlist_item_t
*
,
int
,
int
)
);
/* Load/Save */
VLC_EXPORT
(
int
,
playlist_Import
,
(
playlist_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
playlist_Import
,
(
playlist_t
*
,
const
char
*
,
playlist_item_t
*
,
vlc_bool_t
)
);
VLC_EXPORT
(
int
,
playlist_Export
,
(
playlist_t
*
,
const
char
*
,
playlist_item_t
*
,
const
char
*
)
);
/***********************************************************************
...
...
include/vlc_symbols.h
View file @
f3c6bbcc
...
...
@@ -312,7 +312,7 @@ struct module_symbols_t
int
(
*
playlist_NodeGroup_inner
)
(
playlist_t
*
,
playlist_item_t
*
,
playlist_item_t
**
,
int
,
int
,
int
);
int
(
*
playlist_NodeSort_inner
)
(
playlist_t
*
,
playlist_item_t
*
,
int
,
int
);
int
(
*
playlist_RecursiveNodeSort_inner
)
(
playlist_t
*
,
playlist_item_t
*
,
int
,
int
);
int
(
*
playlist_Import_inner
)
(
playlist_t
*
,
const
char
*
);
int
(
*
playlist_Import_inner
)
(
playlist_t
*
,
const
char
*
,
playlist_item_t
*
,
vlc_bool_t
);
int
(
*
playlist_Export_inner
)
(
playlist_t
*
,
const
char
*
,
playlist_item_t
*
,
const
char
*
);
spu_t
*
(
*
__spu_Create_inner
)
(
vlc_object_t
*
);
int
(
*
spu_Init_inner
)
(
spu_t
*
);
...
...
@@ -517,6 +517,8 @@ struct module_symbols_t
void
*
stats_TimerClean_deprecated
;
void
*
stats_TimersClean_deprecated
;
void
(
*
__stats_TimersClean_inner
)
(
vlc_object_t
*
);
void
(
*
__intf_IntfProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
int
(
*
__intf_IntfProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
float
);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
...
@@ -984,6 +986,8 @@ struct module_symbols_t
# define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner
# define __stats_CounterCreate (p_symbols)->__stats_CounterCreate_inner
# define __stats_TimersClean (p_symbols)->__stats_TimersClean_inner
# define __intf_IntfProgressUpdate (p_symbols)->__intf_IntfProgressUpdate_inner
# define __intf_IntfProgress (p_symbols)->__intf_IntfProgress_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
...
@@ -1454,6 +1458,8 @@ struct module_symbols_t
((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \
((p_symbols)->__stats_CounterCreate_inner) = __stats_CounterCreate; \
((p_symbols)->__stats_TimersClean_inner) = __stats_TimersClean; \
((p_symbols)->__intf_IntfProgressUpdate_inner) = __intf_IntfProgressUpdate; \
((p_symbols)->__intf_IntfProgress_inner) = __intf_IntfProgress; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->__playlist_ItemCopy_deprecated = NULL; \
(p_symbols)->playlist_ItemAddParent_deprecated = NULL; \
...
...
modules/control/rc.c
View file @
f3c6bbcc
...
...
@@ -1280,6 +1280,8 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
}
else
if
(
!
strcmp
(
psz_cmd
,
"playlist"
)
)
{
playlist_Import
(
p_playlist
,
"/home/zorglub/vlc-trunk/foo.xspf"
,
p_playlist
->
p_ml_category
,
VLC_FALSE
);
playlist_NodeDump
(
p_playlist
,
p_playlist
->
p_root_category
,
0
);
playlist_NodeDump
(
p_playlist
,
p_playlist
->
p_root_onelevel
,
0
);
}
...
...
modules/demux/playlist/xspf.c
View file @
f3c6bbcc
...
...
@@ -486,10 +486,10 @@ static vlc_bool_t parse_track_node COMPLEX_INTERFACE
{
FREE_ATT
();
/* Add it */
/*
playlist_AddWhereverNeeded( p_playlist, p_new_input,
playlist_AddWhereverNeeded
(
p_playlist
,
p_new_input
,
p_item
,
p_demux
->
p_sys
->
p_item_in_category
,
(
p_demux
->
p_sys
->
i_parent_id
>
0
)
?
VLC_TRUE
:
VLC_FALSE, PLAYLIST_APPEND );
*/
VLC_FALSE
,
PLAYLIST_APPEND
);
if
(
p_demux
->
p_sys
->
i_identifier
<
p_demux
->
p_sys
->
i_tracklist_entries
)
{
...
...
src/playlist/item.c
View file @
f3c6bbcc
...
...
@@ -277,6 +277,7 @@ int playlist_BothAddInput( playlist_t *p_playlist,
AddItem
(
p_playlist
,
p_item_cat
,
p_direct_parent
,
i_pos
);
/* Add to onelevel */
/** \todo make a faster case for ml import */
p_item_one
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
if
(
p_item_one
==
NULL
)
return
VLC_EGENERIC
;
...
...
@@ -389,6 +390,10 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
* useful for later BothAddInput )
*/
/* Fast track the media library, no time to loose */
if
(
p_item
==
p_playlist
->
p_ml_category
)
return
p_item
;
/** \todo First look if we don't already have it */
playlist_item_t
*
p_item_in_category
=
playlist_ItemFindFromInputAndRoot
(
p_playlist
,
p_item
->
p_input
->
i_id
,
...
...
src/playlist/loadsave.c
View file @
f3c6bbcc
...
...
@@ -36,42 +36,36 @@
#define PLAYLIST_FILE_HEADER "# vlc playlist file version 0.5"
/**
* Import a certain playlist file into the library
* This file will get inserted as a new category
*
* XXX: TODO
* Import a playlist file at a given point of a given view
* \param p_playlist the playlist to which the new items will be added
* \param psz_filename the name of the playlistfile to import
* \return VLC_SUCCESS on success
*/
int
playlist_Import
(
playlist_t
*
p_playlist
,
const
char
*
psz_filename
)
int
playlist_Import
(
playlist_t
*
p_playlist
,
const
char
*
psz_filename
,
playlist_item_t
*
p_root
,
vlc_bool_t
b_only_there
)
{
playlist_item_t
*
p_item
;
char
*
psz_uri
;
int
i_id
;
msg_Info
(
p_playlist
,
"clearing playlist"
);
playlist_Clear
(
p_playlist
);
psz_uri
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
strlen
(
psz_filename
)
+
17
);
sprintf
(
psz_uri
,
"file/playlist://%s"
,
psz_filename
);
i_id
=
playlist_PlaylistAdd
(
p_playlist
,
psz_uri
,
psz_uri
,
PLAYLIST_INSERT
,
PLAYLIST_END
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
playlist_Play
(
p_playlist
);
char
*
psz_uri
,
*
psz_opt
;
input_item_t
*
p_input
;
asprintf
(
&
psz_uri
,
"file/playlist://%s"
,
psz_filename
);
p_input
=
input_ItemNewExt
(
p_playlist
,
psz_uri
,
"playlist"
,
0
,
NULL
,
-
1
);
if
(
b_only_there
)
{
asprintf
(
&
psz_opt
,
"parent-item=%i"
,
p_root
->
i_id
);
vlc_input_item_AddOption
(
p_input
,
psz_opt
);
free
(
psz_opt
);
}
if
(
p_root
==
p_playlist
->
p_ml_category
)
p_input
->
i_id
=
p_playlist
->
p_ml_category
->
p_input
->
i_id
;
input_Read
(
p_playlist
,
p_input
,
VLC_TRUE
);
free
(
psz_uri
);
return
VLC_SUCCESS
;
}
/**
* Load a
certain playlist file into the playlist
*
This file will replace the contents of the "current" view
* Load a
playlist file to the playlist. It will create a new node in
*
category
*
* \param p_playlist the playlist to which the new items will be added
* \param psz_filename the name of the playlistfile to import
...
...
src/playlist/search.c
View file @
f3c6bbcc
...
...
@@ -68,14 +68,15 @@ playlist_item_t * playlist_ItemGetByInput( playlist_t * p_playlist ,
input_item_t
*
p_item
)
{
int
i
;
if
(
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
p_input
==
p_item
)
if
(
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
p_input
==
p_item
)
{
return
p_playlist
->
status
.
p_item
;
}
for
(
i
=
0
;
i
<
p_playlist
->
i_all_size
;
i
++
)
{
if
(
p_playlist
->
pp_all_items
[
i
]
->
p_input
==
p_item
)
if
(
p_playlist
->
pp_all_items
[
i
]
->
p_input
->
i_id
==
p_item
->
i_id
)
{
return
p_playlist
->
pp_all_items
[
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