[vlc-devel] [PATCH 04/17] video_output: remove unused support strings in control calls
Steve Lhomme
robux4 at ycbcr.xyz
Mon Sep 14 16:03:15 CEST 2020
---
src/video_output/control.c | 23 -----------------------
src/video_output/control.h | 3 ---
src/video_output/video_output.c | 1 -
3 files changed, 27 deletions(-)
diff --git a/src/video_output/control.c b/src/video_output/control.c
index 7089157bcdb..af1a714dc48 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -36,14 +36,6 @@ void vout_control_cmd_Init(vout_control_cmd_t *cmd, int type)
cmd->type = type;
}
-void vout_control_cmd_Clean(vout_control_cmd_t *cmd)
-{
- switch (cmd->type) {
- default:
- break;
- }
-}
-
/* */
void vout_control_Init(vout_control_t *ctrl)
{
@@ -61,10 +53,6 @@ void vout_control_Init(vout_control_t *ctrl)
void vout_control_Clean(vout_control_t *ctrl)
{
/* */
- for (int i = 0; i < ctrl->cmd.i_size; i++) {
- vout_control_cmd_t cmd = ARRAY_VAL(ctrl->cmd, i);
- vout_control_cmd_Clean(&cmd);
- }
ARRAY_RESET(ctrl->cmd);
}
@@ -81,8 +69,6 @@ void vout_control_Push(vout_control_t *ctrl, vout_control_cmd_t *cmd)
if (!ctrl->is_dead) {
ARRAY_APPEND(ctrl->cmd, *cmd);
vlc_cond_signal(&ctrl->wait_request);
- } else {
- vout_control_cmd_Clean(cmd);
}
vlc_mutex_unlock(&ctrl->lock);
}
@@ -111,15 +97,6 @@ void vout_control_PushBool(vout_control_t *ctrl, int type, bool boolean)
vout_control_Push(ctrl, &cmd);
}
-void vout_control_PushString(vout_control_t *ctrl, int type, const char *string)
-{
- vout_control_cmd_t cmd;
-
- vout_control_cmd_Init(&cmd, type);
- cmd.string = string ? strdup(string) : NULL;
- vout_control_Push(ctrl, &cmd);
-}
-
void vout_control_Hold(vout_control_t *ctrl)
{
vlc_mutex_lock(&ctrl->lock);
diff --git a/src/video_output/control.h b/src/video_output/control.h
index 6db75d4b95e..ed4613d6c14 100644
--- a/src/video_output/control.h
+++ b/src/video_output/control.h
@@ -38,13 +38,11 @@ typedef struct {
union {
bool boolean;
- char *string;
vlc_mouse_t mouse;
};
} vout_control_cmd_t;
void vout_control_cmd_Init(vout_control_cmd_t *, int type);
-void vout_control_cmd_Clean(vout_control_cmd_t *);
typedef struct {
vlc_mutex_t lock;
@@ -69,7 +67,6 @@ void vout_control_WaitEmpty(vout_control_t *);
void vout_control_Push(vout_control_t *, vout_control_cmd_t *);
void vout_control_PushVoid(vout_control_t *, int type);
void vout_control_PushBool(vout_control_t *, int type, bool boolean);
-void vout_control_PushString(vout_control_t *, int type, const char *string);
void vout_control_Wake(vout_control_t *);
void vout_control_Hold(vout_control_t *);
void vout_control_Release(vout_control_t *);
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index c7153a54c1c..5a906f62508 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1914,7 +1914,6 @@ static void *Thread(void *object)
ThreadProcessMouseState(vout, &cmd.mouse);
break;
}
- vout_control_cmd_Clean(&cmd);
}
deadline = VLC_TICK_INVALID;
--
2.26.2
More information about the vlc-devel
mailing list