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
156b3058
Commit
156b3058
authored
Dec 15, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: remove unused return value from playlist_Control()
parent
6efc10f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
33 deletions
+19
-33
include/vlc_playlist.h
include/vlc_playlist.h
+1
-2
src/playlist/control.c
src/playlist/control.c
+18
-31
No files found.
include/vlc_playlist.h
View file @
156b3058
...
@@ -283,9 +283,8 @@ VLC_API void playlist_Deactivate( playlist_t * );
...
@@ -283,9 +283,8 @@ VLC_API void playlist_Deactivate( playlist_t * );
* \param i_query the command to do
* \param i_query the command to do
* \param b_locked TRUE if playlist is locked when entering this function
* \param b_locked TRUE if playlist is locked when entering this function
* \param variable number of arguments
* \param variable number of arguments
* \return VLC_SUCCESS or an error
*/
*/
VLC_API
int
playlist_Control
(
playlist_t
*
p_playlist
,
int
i_query
,
bool
b_locked
,
...
);
VLC_API
void
playlist_Control
(
playlist_t
*
p_playlist
,
int
i_query
,
bool
b_locked
,
...
);
/** Get current playing input. The object is retained.
/** Get current playing input. The object is retained.
*/
*/
...
...
src/playlist/control.c
View file @
156b3058
...
@@ -30,11 +30,6 @@
...
@@ -30,11 +30,6 @@
#include "playlist_internal.h"
#include "playlist_internal.h"
#include <assert.h>
#include <assert.h>
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
int
PlaylistVAControl
(
playlist_t
*
p_playlist
,
int
i_query
,
va_list
args
);
/*****************************************************************************
/*****************************************************************************
* Playlist control
* Playlist control
*****************************************************************************/
*****************************************************************************/
...
@@ -54,29 +49,13 @@ void playlist_AssertLocked( playlist_t *pl )
...
@@ -54,29 +49,13 @@ void playlist_AssertLocked( playlist_t *pl )
vlc_assert_locked
(
&
pl_priv
(
pl
)
->
lock
);
vlc_assert_locked
(
&
pl_priv
(
pl
)
->
lock
);
}
}
int
playlist_Control
(
playlist_t
*
p_playlist
,
int
i_query
,
static
void
playlist_vaControl
(
playlist_t
*
p_playlist
,
int
i_query
,
va_list
args
)
bool
b_locked
,
...
)
{
va_list
args
;
int
i_result
;
PL_LOCK_IF
(
!
b_locked
);
va_start
(
args
,
b_locked
);
i_result
=
PlaylistVAControl
(
p_playlist
,
i_query
,
args
);
va_end
(
args
);
PL_UNLOCK_IF
(
!
b_locked
);
return
i_result
;
}
static
int
PlaylistVAControl
(
playlist_t
*
p_playlist
,
int
i_query
,
va_list
args
)
{
{
playlist_item_t
*
p_item
,
*
p_node
;
PL_ASSERT_LOCKED
;
PL_ASSERT_LOCKED
;
if
(
i_query
!=
PLAYLIST_STOP
)
if
(
i_query
!=
PLAYLIST_STOP
)
if
(
pl_priv
(
p_playlist
)
->
killed
||
playlist_IsEmpty
(
p_playlist
)
)
if
(
pl_priv
(
p_playlist
)
->
killed
||
playlist_IsEmpty
(
p_playlist
)
)
return
VLC_EGENERIC
;
return
;
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -89,8 +68,10 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
...
@@ -89,8 +68,10 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
// Node can be null, it will keep the same. Use with care ...
// Node can be null, it will keep the same. Use with care ...
// Item null = take the first child of node
// Item null = take the first child of node
case
PLAYLIST_VIEWPLAY
:
case
PLAYLIST_VIEWPLAY
:
p_node
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
{
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
playlist_item_t
*
p_node
=
va_arg
(
args
,
playlist_item_t
*
);
playlist_item_t
*
p_item
=
va_arg
(
args
,
playlist_item_t
*
);
if
(
p_node
==
NULL
)
if
(
p_node
==
NULL
)
{
{
p_node
=
get_current_status_node
(
p_playlist
);
p_node
=
get_current_status_node
(
p_playlist
);
...
@@ -104,6 +85,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
...
@@ -104,6 +85,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
if
(
p_item
&&
var_GetBool
(
p_playlist
,
"random"
)
)
if
(
p_item
&&
var_GetBool
(
p_playlist
,
"random"
)
)
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
pl_priv
(
p_playlist
)
->
b_reset_currently_playing
=
true
;
break
;
break
;
}
case
PLAYLIST_PLAY
:
case
PLAYLIST_PLAY
:
if
(
pl_priv
(
p_playlist
)
->
p_input
)
if
(
pl_priv
(
p_playlist
)
->
p_input
)
...
@@ -127,7 +109,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
...
@@ -127,7 +109,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
{
/* FIXME: is this really useful without input? */
{
/* FIXME: is this really useful without input? */
pl_priv
(
p_playlist
)
->
status
.
i_status
=
PLAYLIST_PAUSED
;
pl_priv
(
p_playlist
)
->
status
.
i_status
=
PLAYLIST_PAUSED
;
/* return without notifying the playlist thread as there is nothing to do */
/* return without notifying the playlist thread as there is nothing to do */
return
VLC_SUCCESS
;
return
;
}
}
if
(
var_GetInteger
(
pl_priv
(
p_playlist
)
->
p_input
,
"state"
)
==
PAUSE_S
)
if
(
var_GetInteger
(
pl_priv
(
p_playlist
)
->
p_input
,
"state"
)
==
PAUSE_S
)
...
@@ -151,12 +133,17 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
...
@@ -151,12 +133,17 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
pl_priv
(
p_playlist
)
->
request
.
i_status
=
pl_priv
(
p_playlist
)
->
status
.
i_status
;
pl_priv
(
p_playlist
)
->
request
.
i_status
=
pl_priv
(
p_playlist
)
->
status
.
i_status
;
pl_priv
(
p_playlist
)
->
request
.
b_request
=
true
;
pl_priv
(
p_playlist
)
->
request
.
b_request
=
true
;
break
;
break
;
default:
msg_Err
(
p_playlist
,
"unknown playlist query"
);
return
VLC_EBADVAR
;
}
}
vlc_cond_signal
(
&
pl_priv
(
p_playlist
)
->
signal
);
vlc_cond_signal
(
&
pl_priv
(
p_playlist
)
->
signal
);
}
return
VLC_SUCCESS
;
void
playlist_Control
(
playlist_t
*
p_playlist
,
int
query
,
bool
locked
,
...
)
{
va_list
args
;
PL_LOCK_IF
(
!
locked
);
va_start
(
args
,
locked
);
playlist_vaControl
(
p_playlist
,
query
,
args
);
va_end
(
args
);
PL_UNLOCK_IF
(
!
locked
);
}
}
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