[vlc-commits] vout/control: remove unused WaitEmpty()
Rémi Denis-Courmont
git at videolan.org
Sun Jan 27 22:10:19 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 27 22:10:35 2019 +0200| [c3f9c2fa25e4ac6262fd7844a6a10a87cf5a8679] | committer: Rémi Denis-Courmont
vout/control: remove unused WaitEmpty()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c3f9c2fa25e4ac6262fd7844a6a10a87cf5a8679
---
src/video_output/control.c | 12 ------------
src/video_output/control.h | 1 -
2 files changed, 13 deletions(-)
diff --git a/src/video_output/control.c b/src/video_output/control.c
index c9233dcf56..d93a4b0b17 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -59,7 +59,6 @@ void vout_control_Init(vout_control_t *ctrl)
ctrl->is_dead = false;
ctrl->can_sleep = true;
- ctrl->is_processing = true;
ARRAY_INIT(ctrl->cmd);
}
@@ -86,14 +85,6 @@ void vout_control_Dead(vout_control_t *ctrl)
}
-void vout_control_WaitEmpty(vout_control_t *ctrl)
-{
- vlc_mutex_lock(&ctrl->lock);
- while ((ctrl->cmd.i_size > 0 || ctrl->is_processing) && !ctrl->is_dead)
- vlc_cond_wait(&ctrl->wait_acknowledge, &ctrl->lock);
- vlc_mutex_unlock(&ctrl->lock);
-}
-
void vout_control_Push(vout_control_t *ctrl, vout_control_cmd_t *cmd)
{
vlc_mutex_lock(&ctrl->lock);
@@ -173,7 +164,6 @@ int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd,
{
vlc_mutex_lock(&ctrl->lock);
if (ctrl->cmd.i_size <= 0) {
- ctrl->is_processing = false;
vlc_cond_broadcast(&ctrl->wait_acknowledge);
/* Spurious wakeups are perfectly fine */
@@ -189,8 +179,6 @@ int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd,
has_cmd = true;
*cmd = ARRAY_VAL(ctrl->cmd, 0);
ARRAY_REMOVE(ctrl->cmd, 0);
-
- ctrl->is_processing = true;
} else {
has_cmd = false;
ctrl->can_sleep = true;
diff --git a/src/video_output/control.h b/src/video_output/control.h
index a9314cb510..8c05a43b1a 100644
--- a/src/video_output/control.h
+++ b/src/video_output/control.h
@@ -91,7 +91,6 @@ typedef struct {
/* */
bool is_dead;
bool can_sleep;
- bool is_processing;
bool is_waiting;
DECL_ARRAY(vout_control_cmd_t) cmd;
} vout_control_t;
More information about the vlc-commits
mailing list