[vlc-commits] vout: process viewpoint change directly

Rémi Denis-Courmont git at videolan.org
Mon Apr 13 12:17:24 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 12 22:17:00 2020 +0300| [184939bdb4b3a829ccc3dbef76ddda52d2c74f34] | committer: Rémi Denis-Courmont

vout: process viewpoint change directly

The work in question is wholly protected by the display lock.
There are no points running it on the video output thread.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=184939bdb4b3a829ccc3dbef76ddda52d2c74f34
---

 src/video_output/control.h      |  3 ---
 src/video_output/video_output.c | 12 ++++--------
 2 files changed, 4 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 dffd93f4d2..6e73e01973 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -634,9 +634,10 @@ 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(&sys->display_lock);
+    if (sys->display != NULL)
+        vout_SetDisplayViewpoint(sys->display, p_viewpoint);
+    vlc_mutex_unlock(&sys->display_lock);
 }
 
 /* */
@@ -1679,11 +1680,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;
     }



More information about the vlc-commits mailing list