Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
fd7ce755
Commit
fd7ce755
authored
Jun 08, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Don't delete main nodes in playlist_Clear
* Fix item add in RC
parent
0f4a4917
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
modules/control/rc.c
modules/control/rc.c
+9
-9
src/playlist/engine.c
src/playlist/engine.c
+11
-1
No files found.
modules/control/rc.c
View file @
fd7ce755
...
...
@@ -77,7 +77,7 @@ static void RegisterCallbacks( intf_thread_t * );
static
vlc_bool_t
ReadCommand
(
intf_thread_t
*
,
char
*
,
int
*
);
static
playlis
t_item_t
*
parse_MRL
(
intf_thread_t
*
,
char
*
);
static
inpu
t_item_t
*
parse_MRL
(
intf_thread_t
*
,
char
*
);
static
int
Input
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -1269,13 +1269,13 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
else
if
(
!
strcmp
(
psz_cmd
,
"add"
)
&&
newval
.
psz_string
&&
*
newval
.
psz_string
)
{
playlis
t_item_t
*
p_item
=
parse_MRL
(
p_intf
,
newval
.
psz_string
);
inpu
t_item_t
*
p_item
=
parse_MRL
(
p_intf
,
newval
.
psz_string
);
if
(
p_item
)
{
msg_rc
(
"Trying to add %s to playlist."
,
newval
.
psz_string
);
// playlist_AddItem
( p_playlist, p_item,
//
PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END );
playlist_PlaylistAddInput
(
p_playlist
,
p_item
,
PLAYLIST_GO
|
PLAYLIST_APPEND
,
PLAYLIST_END
);
}
}
else
if
(
!
strcmp
(
psz_cmd
,
"playlist"
)
)
...
...
@@ -2060,19 +2060,19 @@ vlc_bool_t ReadCommand( intf_thread_t *p_intf, char *p_buffer, int *pi_size )
}
/*****************************************************************************
* parse_MRL: build a
playlis
t item from a full mrl
* parse_MRL: build a
inpu
t item from a full mrl
*****************************************************************************
* MRL format: "simplified-mrl [:option-name[=option-value]]"
* We don't check for '"' or '\'', we just assume that a ':' that follows a
* space is a new option. Should be good enough for our purpose.
*****************************************************************************/
static
playlis
t_item_t
*
parse_MRL
(
intf_thread_t
*
p_intf
,
char
*
psz_mrl
)
static
inpu
t_item_t
*
parse_MRL
(
intf_thread_t
*
p_intf
,
char
*
psz_mrl
)
{
#define SKIPSPACE( p ) { while( *p && ( *p == ' ' || *p == '\t' ) ) p++; }
#define SKIPTRAILINGSPACE( p, d ) \
{ char *e=d; while( e > p && (*(e-1)==' ' || *(e-1)=='\t') ){e--;*e=0;} }
playlis
t_item_t
*
p_item
=
NULL
;
inpu
t_item_t
*
p_item
=
NULL
;
char
*
psz_item
=
NULL
,
*
psz_item_mrl
=
NULL
,
*
psz_orig
;
char
**
ppsz_options
=
NULL
;
int
i
,
i_options
=
0
;
...
...
@@ -2123,10 +2123,10 @@ static playlist_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
/* Now create a playlist item */
if
(
psz_item_mrl
)
{
p_item
=
playlis
t_ItemNew
(
p_intf
,
psz_item_mrl
,
psz_item_mrl
);
p_item
=
inpu
t_ItemNew
(
p_intf
,
psz_item_mrl
,
psz_item_mrl
);
for
(
i
=
0
;
i
<
i_options
;
i
++
)
{
playlist_Item
AddOption
(
p_item
,
ppsz_options
[
i
]
);
vlc_input_item_
AddOption
(
p_item
,
ppsz_options
[
i
]
);
}
}
...
...
src/playlist/engine.c
View file @
fd7ce755
...
...
@@ -84,6 +84,11 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
p_playlist
->
p_ml_onelevel
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Media Library"
),
p_playlist
->
p_root_onelevel
);
p_playlist
->
p_local_category
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_playlist
->
p_ml_category
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_playlist
->
p_local_onelevel
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_playlist
->
p_ml_onelevel
->
i_flags
|=
PLAYLIST_RO_FLAG
;
/* This is a hack to find it later. Quite ugly, but I haven't found a
* better way */
p_playlist
->
p_local_onelevel
->
p_input
->
i_id
=
...
...
@@ -127,7 +132,12 @@ void playlist_Destroy( playlist_t *p_playlist )
var_Destroy
(
p_playlist
,
"loop"
);
var_Destroy
(
p_playlist
,
"activity"
);
playlist_LockClear
(
p_playlist
);
PL_LOCK
;
playlist_NodeDelete
(
p_playlist
,
p_playlist
->
p_root_category
,
VLC_TRUE
,
VLC_TRUE
);
playlist_NodeDelete
(
p_playlist
,
p_playlist
->
p_root_onelevel
,
VLC_TRUE
,
VLC_TRUE
);
PL_UNLOCK
;
if
(
p_playlist
->
p_stats
)
free
(
p_playlist
->
p_stats
);
...
...
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