Commit 8d5040cf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: invert default for event thread

The name was confusing and only three rarely used video output plugins
suffer from this bug.
parent 1ec06f9a
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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") &&
......
......@@ -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) &&
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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,
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment