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
727740c8
Commit
727740c8
authored
May 27, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable PLAYLIST_GO
parent
3ba8ca57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
28 deletions
+37
-28
src/playlist/item.c
src/playlist/item.c
+37
-28
No files found.
src/playlist/item.c
View file @
727740c8
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
void
AddItem
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
void
AddItem
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
playlist_item_t
*
p_node
,
int
i_pos
);
playlist_item_t
*
p_node
,
int
i_pos
);
void
GoAndPreparse
(
playlist_t
*
p_playlist
,
int
i_mode
,
void
GoAndPreparse
(
playlist_t
*
p_playlist
,
int
i_mode
,
playlist_item_t
*
p_item
);
playlist_item_t
*
,
playlist_item_t
*
);
void
ChangeToNode
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
);
void
ChangeToNode
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
);
int
DeleteInner
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
int
DeleteInner
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
vlc_bool_t
b_stop
);
vlc_bool_t
b_stop
);
...
@@ -236,7 +236,7 @@ int playlist_PlaylistAddExt( playlist_t *p_playlist, const char * psz_uri,
...
@@ -236,7 +236,7 @@ int playlist_PlaylistAddExt( playlist_t *p_playlist, const char * psz_uri,
int
playlist_PlaylistAddInput
(
playlist_t
*
p_playlist
,
input_item_t
*
p_input
,
int
playlist_PlaylistAddInput
(
playlist_t
*
p_playlist
,
input_item_t
*
p_input
,
int
i_mode
,
int
i_pos
)
int
i_mode
,
int
i_pos
)
{
{
playlist_item_t
*
p_item
;
playlist_item_t
*
p_item
_cat
,
*
p_item_one
;
p_input
->
i_id
=
++
p_playlist
->
i_last_input_id
;
p_input
->
i_id
=
++
p_playlist
->
i_last_input_id
;
msg_Dbg
(
p_playlist
,
"adding playlist item `%s' ( %s )"
,
msg_Dbg
(
p_playlist
,
"adding playlist item `%s' ( %s )"
,
...
@@ -245,16 +245,16 @@ int playlist_PlaylistAddInput( playlist_t* p_playlist, input_item_t *p_input,
...
@@ -245,16 +245,16 @@ int playlist_PlaylistAddInput( playlist_t* p_playlist, input_item_t *p_input,
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
/* Add to ONELEVEL */
/* Add to ONELEVEL */
p_item
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
p_item
_one
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
if
(
p_item
==
NULL
)
return
VLC_EGENERIC
;
if
(
p_item
_one
==
NULL
)
return
VLC_EGENERIC
;
AddItem
(
p_playlist
,
p_item
,
p_playlist
->
p_local_onelevel
,
i_pos
);
AddItem
(
p_playlist
,
p_item
_one
,
p_playlist
->
p_local_onelevel
,
i_pos
);
/* Add to CATEGORY */
/* Add to CATEGORY */
p_item
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
p_item
_cat
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
if
(
p_item
==
NULL
)
return
VLC_EGENERIC
;
if
(
p_item
_cat
==
NULL
)
return
VLC_EGENERIC
;
AddItem
(
p_playlist
,
p_item
,
p_playlist
->
p_local_category
,
i_pos
);
AddItem
(
p_playlist
,
p_item
_cat
,
p_playlist
->
p_local_category
,
i_pos
);
GoAndPreparse
(
p_playlist
,
i_mode
,
p_item
);
GoAndPreparse
(
p_playlist
,
i_mode
,
p_item
_cat
,
p_item_one
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -267,19 +267,19 @@ int playlist_BothAddInput( playlist_t *p_playlist,
...
@@ -267,19 +267,19 @@ int playlist_BothAddInput( playlist_t *p_playlist,
playlist_item_t
*
p_direct_parent
,
playlist_item_t
*
p_direct_parent
,
int
i_mode
,
int
i_pos
)
int
i_mode
,
int
i_pos
)
{
{
playlist_item_t
*
p_item
,
*
p_up
;
playlist_item_t
*
p_item
_cat
,
*
p_item_one
,
*
p_up
;
int
i_top
;
int
i_top
;
assert
(
p_input
);
assert
(
p_input
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
/* Add to category */
/* Add to category */
p_item
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
p_item
_cat
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
if
(
p_item
==
NULL
)
return
VLC_EGENERIC
;
if
(
p_item
_cat
==
NULL
)
return
VLC_EGENERIC
;
AddItem
(
p_playlist
,
p_item
,
p_direct_parent
,
i_pos
);
AddItem
(
p_playlist
,
p_item
_cat
,
p_direct_parent
,
i_pos
);
/* Add to onelevel */
/* Add to onelevel */
p_item
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
p_item
_one
=
playlist_ItemNewFromInput
(
p_playlist
,
p_input
);
if
(
p_item
==
NULL
)
return
VLC_EGENERIC
;
if
(
p_item
_one
==
NULL
)
return
VLC_EGENERIC
;
p_up
=
p_direct_parent
;
p_up
=
p_direct_parent
;
while
(
p_up
->
p_parent
!=
p_playlist
->
p_root_category
)
while
(
p_up
->
p_parent
!=
p_playlist
->
p_root_category
)
...
@@ -290,12 +290,12 @@ int playlist_BothAddInput( playlist_t *p_playlist,
...
@@ -290,12 +290,12 @@ int playlist_BothAddInput( playlist_t *p_playlist,
{
{
if
(
p_playlist
->
p_root_onelevel
->
pp_children
[
i_top
]
->
p_input
->
i_id
==
p_up
->
p_input
->
i_id
)
if
(
p_playlist
->
p_root_onelevel
->
pp_children
[
i_top
]
->
p_input
->
i_id
==
p_up
->
p_input
->
i_id
)
{
{
AddItem
(
p_playlist
,
p_item
,
AddItem
(
p_playlist
,
p_item
_one
,
p_playlist
->
p_root_onelevel
->
pp_children
[
i_top
],
i_pos
);
p_playlist
->
p_root_onelevel
->
pp_children
[
i_top
],
i_pos
);
break
;
break
;
}
}
}
}
GoAndPreparse
(
p_playlist
,
i_mode
,
p_item
);
GoAndPreparse
(
p_playlist
,
i_mode
,
p_item
_cat
,
p_item_one
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -560,28 +560,37 @@ void playlist_ItemAddOption( playlist_item_t *p_item,
...
@@ -560,28 +560,37 @@ void playlist_ItemAddOption( playlist_item_t *p_item,
/* Enqueue an item for preparsing, and play it, if needed */
/* Enqueue an item for preparsing, and play it, if needed */
void
GoAndPreparse
(
playlist_t
*
p_playlist
,
int
i_mode
,
void
GoAndPreparse
(
playlist_t
*
p_playlist
,
int
i_mode
,
playlist_item_t
*
p_item
)
playlist_item_t
*
p_item
_cat
,
playlist_item_t
*
p_item_one
)
{
{
#if 0
if
(
(
i_mode
&
PLAYLIST_GO
)
)
if( (i_mode & PLAYLIST_GO ) && p_view )
{
{
playlist_item_t
*
p_parent
=
p_item_one
;
playlist_item_t
*
p_toplay
=
NULL
;
while
(
p_parent
)
{
if
(
p_parent
==
p_playlist
->
p_root_category
)
{
p_toplay
=
p_item_cat
;
break
;
}
else
if
(
p_parent
==
p_playlist
->
p_root_onelevel
)
{
p_toplay
=
p_item_one
;
break
;
}
p_parent
=
p_parent
->
p_parent
;
}
assert
(
p_toplay
);
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
/* FIXME ... */
p_playlist
->
request
.
p_item
=
p_toplay
;
p_playlist->request.i_view = VIEW_CATEGORY;
p_playlist->request.p_node = p_view->p_root;
p_playlist->request.p_item = p_item;
if
(
p_playlist
->
p_input
)
if
(
p_playlist
->
p_input
)
{
{
input_StopThread
(
p_playlist
->
p_input
);
input_StopThread
(
p_playlist
->
p_input
);
}
}
p_playlist->
status
.i_status = PLAYLIST_RUNNING;
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
}
}
#endif
if
(
i_mode
&
PLAYLIST_PREPARSE
&&
if
(
i_mode
&
PLAYLIST_PREPARSE
&&
var_CreateGetBool
(
p_playlist
,
"auto-preparse"
)
)
var_CreateGetBool
(
p_playlist
,
"auto-preparse"
)
)
{
{
playlist_PreparseEnqueue
(
p_playlist
,
p_item
->
p_input
);
playlist_PreparseEnqueue
(
p_playlist
,
p_item
_cat
->
p_input
);
}
}
}
}
...
...
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