[vlc-devel] [PATCH 2/2] vout: process viewpoint change directly
RĂ©mi Denis-Courmont
remi at remlab.net
Sun Apr 12 21:17:57 CEST 2020
The work in question is wholly protected by the display lock.
There are no points running it on the video output thread.
---
src/video_output/control.h | 3 ---
src/video_output/video_output.c | 11 +++--------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/video_output/control.h b/src/video_output/control.h
index ff9d4a93e1..02b0696028 100644
--- a/src/video_output/control.h
+++ b/src/video_output/control.h
@@ -31,8 +31,6 @@ enum {
VOUT_CONTROL_CHANGE_INTERLACE, /* boolean */
VOUT_CONTROL_MOUSE_STATE, /* vlc_mouse_t */
-
- VOUT_CONTROL_VIEWPOINT, /* viewpoint */
};
typedef struct {
@@ -42,7 +40,6 @@ typedef struct {
bool boolean;
char *string;
vlc_mouse_t mouse;
- vlc_viewpoint_t viewpoint;
};
} vout_control_cmd_t;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a3409123c7..bb6fb46d66 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -634,9 +634,9 @@ void vout_ChangeViewpoint(vout_thread_t *vout,
/* no window size update here */
vlc_mutex_unlock(&sys->window_lock);
- vout_control_cmd_Init(&cmd, VOUT_CONTROL_VIEWPOINT);
- cmd.viewpoint = *p_viewpoint;
- vout_control_Push(&sys->control, &cmd);
+ vlc_mutex_lock(&vout->p->display_lock);
+ vout_SetDisplayViewpoint(vout->p->display, p_viewpoint);
+ vlc_mutex_unlock(&vout->p->display_lock);
}
/* */
@@ -1679,11 +1679,6 @@ static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
case VOUT_CONTROL_MOUSE_STATE:
ThreadProcessMouseState(vout, &cmd.mouse);
break;
- case VOUT_CONTROL_VIEWPOINT:
- vlc_mutex_lock(&vout->p->display_lock);
- vout_SetDisplayViewpoint(vout->p->display, &cmd.viewpoint);
- vlc_mutex_unlock(&vout->p->display_lock);
- break;
default:
break;
}
--
2.26.0
More information about the vlc-devel
mailing list