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
fe85cd9a
Commit
fe85cd9a
authored
Jun 11, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: playlist locking
untested
parent
5d626d6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
modules/control/http/macro.c
modules/control/http/macro.c
+18
-8
No files found.
modules/control/http/macro.c
View file @
fe85cd9a
...
...
@@ -143,6 +143,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
{
intf_thread_t
*
p_intf
=
p_args
->
p_intf
;
intf_sys_t
*
p_sys
=
p_args
->
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
p_sys
->
p_playlist
;
char
control
[
512
];
#define ALLOC( l ) \
...
...
@@ -199,9 +200,8 @@ static void MacroDo( httpd_file_sys_t *p_args,
msg_Dbg
(
p_intf
,
"requested playlist play"
);
break
;
}
//TODO: really locked here ?
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
true
,
NULL
,
pl_Unlocked
,
NULL
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
i_item
)
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_item
);
...
...
@@ -209,22 +209,22 @@ static void MacroDo( httpd_file_sys_t *p_args,
}
case
MVLC_STOP
:
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_STOP
,
true
);
pl_Unlocked
);
msg_Dbg
(
p_intf
,
"requested playlist stop"
);
break
;
case
MVLC_PAUSE
:
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_PAUSE
,
true
);
pl_Unlocked
);
msg_Dbg
(
p_intf
,
"requested playlist pause"
);
break
;
case
MVLC_NEXT
:
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_SKIP
,
true
,
1
);
pl_Unlocked
,
1
);
msg_Dbg
(
p_intf
,
"requested playlist next"
);
break
;
case
MVLC_PREVIOUS
:
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_SKIP
,
true
,
-
1
);
pl_Unlocked
,
-
1
);
msg_Dbg
(
p_intf
,
"requested playlist previous"
);
break
;
case
MVLC_FULLSCREEN
:
...
...
@@ -342,7 +342,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
if
(
psz_uri
&&
*
psz_uri
&&
playlist_AddInput
(
p_sys
->
p_playlist
,
p_input
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
true
,
false
)
==
VLC_SUCCESS
)
true
,
pl_Unlocked
)
==
VLC_SUCCESS
)
msg_Dbg
(
p_intf
,
"requested mrl add: %s"
,
mrl
);
else
msg_Warn
(
p_intf
,
"adding mrl failed: %s"
,
mrl
);
...
...
@@ -373,6 +373,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
for
(
size_t
i
=
0
;
i
<
i_nb_items
;
i
++
)
{
PL_LOCK
;
playlist_item_t
*
p_item
;
msg_Dbg
(
p_intf
,
"requested playlist delete: %d"
,
...
...
@@ -383,6 +384,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
playlist_DeleteFromInput
(
p_sys
->
p_playlist
,
p_item
->
p_input
,
false
);
PL_UNLOCK
;
}
free
(
p_items
);
...
...
@@ -408,6 +410,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
i_nb_items
++
;
}
PL_LOCK
;
size_t
size
=
p_sys
->
p_playlist
->
items
.
i_size
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
...
...
@@ -429,13 +432,14 @@ static void MacroDo( httpd_file_sys_t *p_args,
false
);
}
}
PL_UNLOCK
;
free
(
p_items
);
break
;
}
case
MVLC_EMPTY
:
{
playlist_Clear
(
p_sys
->
p_playlist
,
false
);
playlist_Clear
(
p_sys
->
p_playlist
,
pl_Unlocked
);
msg_Dbg
(
p_intf
,
"requested playlist empty"
);
break
;
}
...
...
@@ -457,27 +461,33 @@ static void MacroDo( httpd_file_sys_t *p_args,
if
(
!
strcmp
(
type
,
"title"
)
)
{
PL_LOCK
;
playlist_RecursiveNodeSort
(
p_sys
->
p_playlist
,
/* Ugly hack,but not worse than before ... */
p_sys
->
p_playlist
->
p_root_onelevel
,
SORT_TITLE_NODES_FIRST
,
(
i_order
==
0
)
?
ORDER_NORMAL
:
ORDER_REVERSE
);
PL_UNLOCK
;
msg_Dbg
(
p_intf
,
"requested playlist sort by title (%d)"
,
i_order
);
}
else
if
(
!
strcmp
(
type
,
"author"
)
)
{
PL_LOCK
;
playlist_RecursiveNodeSort
(
p_sys
->
p_playlist
,
/*playlist_ItemGetById( p_sys->p_playlist, i_item ),*/
p_sys
->
p_playlist
->
p_root_onelevel
,
SORT_ARTIST
,
(
i_order
==
0
)
?
ORDER_NORMAL
:
ORDER_REVERSE
);
PL_UNLOCK
;
msg_Dbg
(
p_intf
,
"requested playlist sort by author (%d)"
,
i_order
);
}
else
if
(
!
strcmp
(
type
,
"shuffle"
)
)
{
PL_LOCK
;
playlist_RecursiveNodeSort
(
p_sys
->
p_playlist
,
/*playlist_ItemGetById( p_sys->p_playlist, i_item ),*/
p_sys
->
p_playlist
->
p_root_onelevel
,
SORT_RANDOM
,
(
i_order
==
0
)
?
ORDER_NORMAL
:
ORDER_REVERSE
);
PL_UNLOCK
;
msg_Dbg
(
p_intf
,
"requested playlist shuffle"
);
}
...
...
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