vout: invert default for event thread
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 28 Nov 2016 21:44:40 +0000 (23:44 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 28 Nov 2016 21:51:20 +0000 (23:51 +0200)
The name was confusing and only three rarely used video output plugins
suffer from this bug.

18 files changed:
include/vlc_vout_display.h
modules/hw/vdpau/display.c
modules/video_output/aa.c
modules/video_output/android/display.c
modules/video_output/caca.c
modules/video_output/evas.c
modules/video_output/gl.c
modules/video_output/ios2.m
modules/video_output/macosx.m
modules/video_output/sdl.c
modules/video_output/wayland/shm.c
modules/video_output/win32/direct3d11.c
modules/video_output/win32/direct3d9.c
modules/video_output/win32/directdraw.c
modules/video_output/win32/glwin32.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xvideo.c
src/video_output/display.c

index 04a265a..90f29d9 100644 (file)
@@ -131,7 +131,7 @@ typedef struct {
     bool has_double_click;                  /* Is double-click generated */
     bool has_hide_mouse;                    /* Is mouse automatically hidden */
     bool has_pictures_invalid;              /* Will VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
-    bool has_event_thread;                  /* Will events (key at least) be emitted using an independent thread */
+    bool needs_event_thread VLC_DEPRECATED; /* Will events (key at least) be emitted using an independent thread */
     const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for subpicture rendering. */
 } vout_display_info_t;
 
index f87a38e..41bbe63 100644 (file)
@@ -654,7 +654,6 @@ static int Open(vlc_object_t *obj)
     /* */
     vd->sys = sys;
     vd->info.has_pictures_invalid = true;
-    vd->info.has_event_thread = true;
     vd->info.subpicture_chromas = spu_chromas;
     vd->fmt = fmt;
 
index 26f7575..9b9436d 100644 (file)
@@ -122,13 +122,10 @@ static int Open(vlc_object_t *object)
     fmt.i_visible_width = fmt.i_width;
     fmt.i_visible_height = fmt.i_height;
 
-    /* */
-    vout_display_info_t info = vd->info;
-    info.has_pictures_invalid = true;
-
     /* Setup vout_display now that everything is fine */
     vd->fmt = fmt;
-    vd->info = info;
+    vd->info.has_pictures_invalid = true;
+    vd->info.needs_event_thread = true;
 
     vd->pool    = Pool;
     vd->prepare = Prepare;
index 9390a4d..086fdc6 100644 (file)
@@ -740,7 +740,6 @@ static int Open(vlc_object_t *p_this)
     vd->display = Display;
     vd->control = Control;
     vd->manage  = NULL;
-    vd->info.has_event_thread = true;
     vd->info.is_slow = !sys->p_window->b_opaque;
 
     /* Fix initial state */
index c082ef3..22d5d95 100644 (file)
@@ -185,12 +185,9 @@ static int Open(vlc_object_t *object)
         fmt.i_bmask = 0x000000ff;
     }
 
-    /* TODO */
-    vout_display_info_t info = vd->info;
-
     /* Setup vout_display now that everything is fine */
     vd->fmt = fmt;
-    vd->info = info;
+    vd->info.needs_event_thread = true;
 
     vd->pool    = Pool;
     vd->prepare = Prepare;
index b38c6b5..9166d09 100644 (file)
@@ -912,8 +912,6 @@ Open( vlc_object_t *p_this )
     vd->control = Control;
     vd->manage  = Manage;
 
-    vd->info.has_event_thread = true;
-
     /* Fix initial state */
     vout_display_SendEventFullscreen( vd, true );
 
index d22cbee..6d1fce6 100644 (file)
@@ -138,7 +138,6 @@ static int Open (vlc_object_t *obj)
 
     vd->sys = sys;
     vd->info.has_pictures_invalid = false;
-    vd->info.has_event_thread = true;
     vd->info.subpicture_chromas = spu_chromas;
     vd->pool = Pool;
     vd->prepare = PictureRender;
index bfeefe5..061f186 100644 (file)
@@ -275,7 +275,6 @@ static int Open(vlc_object_t *this)
         /* */
         vout_display_info_t info = vd->info;
         info.has_pictures_invalid = false;
-        info.has_event_thread = true;
         info.subpicture_chromas = subpicture_chromas;
         info.is_slow = !sys->zero_copy;
         info.has_hide_mouse = false;
index 81be6c5..de5b475 100644 (file)
@@ -271,7 +271,6 @@ static int Open (vlc_object_t *this)
         /* */
         vout_display_info_t info = vd->info;
         info.has_pictures_invalid = false;
-        info.has_event_thread = true;
         info.subpicture_chromas = subpicture_chromas;
         info.has_hide_mouse = true;
 
index 44992b7..7c588e5 100644 (file)
@@ -177,6 +177,8 @@ static int Open(vlc_object_t *object)
     /* */
     vout_display_info_t info = vd->info;
 
+    info.needs_event_thread = true;
+
     /* Set main window's size */
     int display_width;
     int display_height;
index 8cda503..547db7b 100644 (file)
@@ -468,7 +468,6 @@ static int Open(vlc_object_t *obj)
     vd->fmt.i_chroma = VLC_CODEC_RGB32;
 
     vd->info.has_pictures_invalid = sys->viewport == NULL;
-    vd->info.has_event_thread = true;
 
     vd->pool = Pool;
     vd->prepare = Prepare;
index 7b515f1..973b8b0 100644 (file)
@@ -494,7 +494,6 @@ static int Open(vlc_object_t *object)
     info.is_slow              = !is_d3d11_opaque(fmt.i_chroma);
     info.has_double_click     = true;
     info.has_hide_mouse       = false;
-    info.has_event_thread     = true;
     info.has_pictures_invalid = !is_d3d11_opaque(fmt.i_chroma);
 
     if (var_InheritBool(vd, "direct3d11-hw-blending") &&
index 6800e9a..25aef91 100644 (file)
@@ -218,7 +218,6 @@ static int Open(vlc_object_t *object)
     info.has_double_click = true;
     info.has_hide_mouse = false;
     info.has_pictures_invalid = !is_d3d9_opaque(fmt.i_chroma);
-    info.has_event_thread = true;
     if (var_InheritBool(vd, "direct3d9-hw-blending") &&
         sys->d3dregion_format != D3DFMT_UNKNOWN &&
         (sys->d3dcaps.SrcBlendCaps  & D3DPBLENDCAPS_SRCALPHA) &&
index c2f5eea..f65162c 100644 (file)
@@ -202,7 +202,6 @@ static int Open(vlc_object_t *object)
     info.has_double_click = true;
     info.has_hide_mouse = false;
     info.has_pictures_invalid = true;
-    info.has_event_thread = true;
 
     /* Interaction TODO support starting with wallpaper mode */
     vlc_mutex_init(&sys->lock);
index 4a0ac0d..d5b51e2 100644 (file)
@@ -229,7 +229,6 @@ static int Open(vlc_object_t *object)
     vout_display_info_t info = vd->info;
     info.has_double_click = true;
     info.has_hide_mouse = false;
-    info.has_event_thread = true;
     info.subpicture_chromas = subpicture_chromas;
 
    /* Setup vout_display now that everything is fine */
index 7117881..6003cff 100644 (file)
@@ -301,7 +301,6 @@ found_format:;
 
     /* Setup vout_display_t once everything is fine */
     vd->info.has_pictures_invalid = true;
-    vd->info.has_event_thread = true;
 
     vd->fmt = fmt_pic;
     vd->pool = Pool;
index dde4f33..58f98d3 100644 (file)
@@ -558,7 +558,6 @@ static int Open (vlc_object_t *obj)
     /* */
     vout_display_info_t info = vd->info;
     info.has_pictures_invalid = false;
-    info.has_event_thread = true;
 
     /* Setup vout_display_t once everything is fine */
     p_sys->swap_uv = vlc_fourcc_AreUVPlanesSwapped (fmt.i_chroma,
index 71ceeff..e4bd497 100644 (file)
@@ -93,7 +93,7 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
     vd->info.has_double_click = false;
     vd->info.has_hide_mouse = false;
     vd->info.has_pictures_invalid = false;
-    vd->info.has_event_thread = false;
+    vd->info.needs_event_thread = false;
     vd->info.subpicture_chromas = NULL;
 
     vd->cfg = cfg;
@@ -654,10 +654,10 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
     case VOUT_DISPLAY_EVENT_KEY: {
         const int key = (int)va_arg(args, int);
         msg_Dbg(vd, "VoutDisplayEvent 'key' 0x%2.2x", key);
-        if (vd->info.has_event_thread)
-            vout_SendEventKey(osys->vout, key);
-        else
+        if (vd->info.needs_event_thread)
             VoutDisplayEventKey(vd, key);
+        else
+            vout_SendEventKey(osys->vout, key);
         break;
     }
     case VOUT_DISPLAY_EVENT_MOUSE_STATE: