X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fxcb%2Fxvideo.c;h=556c73ad55f94f47829306cec2b37a827cfd161d;hb=e21af72667a0291da9decea43330b881fabf8939;hp=026d9a7116bdfff2a17390debd83f0fe8d1cd70b;hpb=a298057c367871989a3fda596421ad3fa8bdbd40;p=vlc diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c index 026d9a7116..556c73ad55 100644 --- a/modules/video_output/xcb/xvideo.c +++ b/modules/video_output/xcb/xvideo.c @@ -7,7 +7,7 @@ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2.0 + * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, @@ -15,7 +15,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public + * You should have received a copy of the GNU General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ****************************************************************************/ @@ -35,13 +35,14 @@ #include #include #include +#include #include "xcb_vlc.h" -#define DISPLAY_TEXT N_("X11 display") -#define DISPLAY_LONGTEXT N_( \ - "X11 hardware display to use. By default VLC will " \ - "use the value of the DISPLAY environment variable.") +#define ADAPTOR_TEXT N_("XVideo adaptor number") +#define ADAPTOR_LONGTEXT N_( \ + "XVideo hardware adaptor to use. By default, VLC will " \ + "use the first functional adaptor.") #define SHM_TEXT N_("Use shared memory") #define SHM_LONGTEXT N_( \ @@ -55,16 +56,19 @@ static void Close (vlc_object_t *); */ vlc_module_begin () set_shortname (N_("XVideo")) - set_description (N_("(Experimental) XVideo output")) + set_description (N_("XVideo output (XCB)")) set_category (CAT_VIDEO) set_subcategory (SUBCAT_VIDEO_VOUT) - set_capability ("vout display", 0) + set_capability ("vout display", 155) set_callbacks (Open, Close) - add_string ("x11-display", NULL, NULL, - DISPLAY_TEXT, DISPLAY_LONGTEXT, true) + add_integer ("xvideo-adaptor", -1, NULL, + ADAPTOR_TEXT, ADAPTOR_LONGTEXT, true) add_bool ("x11-shm", true, NULL, SHM_TEXT, SHM_LONGTEXT, true) + add_deprecated_alias ("xvideo-shm") add_shortcut ("xcb-xv") + add_shortcut ("xv") + add_shortcut ("xvideo") vlc_module_end () #define MAX_PICTURES (VOUT_MAX_PICTURES) @@ -72,9 +76,9 @@ vlc_module_end () struct vout_display_sys_t { xcb_connection_t *conn; - xcb_xv_query_adaptors_reply_t *adaptors; vout_window_t *embed;/* VLC window */ + xcb_cursor_t cursor; /* blank cursor */ xcb_window_t window; /* drawable X window */ xcb_gcontext_t gc; /* context to put images */ xcb_xv_port_t port; /* XVideo port */ @@ -83,13 +87,14 @@ struct vout_display_sys_t uint16_t height; /* display height */ uint32_t data_size; /* picture byte size (for non-SHM) */ bool shm; /* whether to use MIT-SHM */ + bool visible; /* whether it makes sense to draw at all */ xcb_xv_query_image_attributes_reply_t *att; picture_pool_t *pool; /* picture pool */ picture_resource_t resource[MAX_PICTURES]; }; -static picture_t *Get (vout_display_t *); +static picture_pool_t *Pool (vout_display_t *, unsigned); static void Display (vout_display_t *, picture_t *); static int Control (vout_display_t *, int, va_list); static void Manage (vout_display_t *); @@ -103,22 +108,25 @@ static bool CheckXVideo (vout_display_t *vd, xcb_connection_t *conn) xcb_xv_query_extension_cookie_t ck = xcb_xv_query_extension (conn); bool ok = false; + /* We need XVideo 2.2 for PutImage */ r = xcb_xv_query_extension_reply (conn, ck, NULL); - if (r != NULL) - { /* We need XVideo 2.2 for PutImage */ - if ((r->major > 2) || (r->major == 2 && r->minor >= 2)) - { - msg_Dbg (vd, "using XVideo extension v%"PRIu8".%"PRIu8, - r->major, r->minor); - ok = true; - } - else - msg_Dbg (vd, "XVideo extension too old (v%"PRIu8".%"PRIu8, - r->major, r->minor); - free (r); - } - else + if (r == NULL) msg_Dbg (vd, "XVideo extension not available"); + else + if (r->major != 2) + msg_Dbg (vd, "XVideo extension v%"PRIu8".%"PRIu8" unknown", + r->major, r->minor); + else + if (r->minor < 2) + msg_Dbg (vd, "XVideo extension v%"PRIu8".%"PRIu8" too old", + r->major, r->minor); + else + { + msg_Dbg (vd, "using XVideo extension v%"PRIu8".%"PRIu8, + r->major, r->minor); + ok = true; + } + free (r); return ok; } @@ -139,6 +147,8 @@ static vlc_fourcc_t ParseFormat (vout_display_t *vd, case 32: if (f->depth == 24) return VLC_CODEC_RGB32; + if (f->depth == 32) + return 0; /* ARGB -> VLC cannot do that currently */ break; case 24: if (f->depth == 24) @@ -242,19 +252,34 @@ FindFormat (vout_display_t *vd, if (chroma != ParseFormat (vd, f)) continue; + /* VLC pads scanline to 16 pixels internally */ + unsigned width = (fmt->i_width + 15) & ~15; + unsigned height = (fmt->i_height + 15) & ~15; xcb_xv_query_image_attributes_reply_t *i; i = xcb_xv_query_image_attributes_reply (conn, xcb_xv_query_image_attributes (conn, port, f->id, - fmt->i_width, fmt->i_height), NULL); + width, height), NULL); if (i == NULL) continue; - if (i->width != fmt->i_width - || i->height != fmt->i_height) + if (i->width != width || i->height != height) { msg_Warn (vd, "incompatible size %ux%u -> %"PRIu32"x%"PRIu32, fmt->i_width, fmt->i_height, i->width, i->height); + var_Create (vd->p_libvlc, "xvideo-resolution-error", VLC_VAR_BOOL); + if (!var_GetBool (vd->p_libvlc, "xvideo-resolution-error")) + { + dialog_FatalWait (vd, _("Video acceleration not available"), + _("Your video output acceleration driver does not support " + "the required resolution: %ux%u pixels. The maximum " + "supported resolution is %"PRIu32"x%"PRIu32".\n" + "Video output acceleration will be disabled. However, " + "rendering videos with overly large resolution " + "may cause severe performance degration."), + width, height, i->width, i->height); + var_SetBool (vd->p_libvlc, "xvideo-resolution-error", true); + } free (i); continue; } @@ -265,18 +290,6 @@ FindFormat (vout_display_t *vd, } -/** - * Get a list of XVideo adaptors for a given window. - */ -static xcb_xv_query_adaptors_reply_t *GetAdaptors (vout_window_t *wnd, - xcb_connection_t *conn) -{ - xcb_xv_query_adaptors_cookie_t ck; - - ck = xcb_xv_query_adaptors (conn, wnd->handle.xid); - return xcb_xv_query_adaptors_reply (conn, ck, NULL); -} - /** * Probe the X server. */ @@ -290,68 +303,73 @@ static int Open (vlc_object_t *obj) vd->sys = p_sys; /* Connect to X */ - p_sys->conn = Connect (obj); - if (p_sys->conn == NULL) + xcb_connection_t *conn; + const xcb_screen_t *screen; + uint8_t depth; + p_sys->embed = GetWindow (vd, &conn, &screen, &depth); + if (p_sys->embed == NULL) { free (p_sys); return VLC_EGENERIC; } - if (!CheckXVideo (vd, p_sys->conn)) + p_sys->conn = conn; + p_sys->att = NULL; + p_sys->pool = NULL; + + if (!CheckXVideo (vd, conn)) { msg_Warn (vd, "Please enable XVideo 2.2 for faster video display"); - xcb_disconnect (p_sys->conn); - free (p_sys); - return VLC_EGENERIC; + goto error; } - const xcb_screen_t *screen; - p_sys->embed = GetWindow (vd, p_sys->conn, &screen, &p_sys->shm); - if (p_sys->embed == NULL) - { - xcb_disconnect (p_sys->conn); - free (p_sys); - return VLC_EGENERIC; - } + p_sys->window = xcb_generate_id (conn); /* Cache adaptors infos */ - p_sys->adaptors = GetAdaptors (p_sys->embed, p_sys->conn); - if (p_sys->adaptors == NULL) + xcb_xv_query_adaptors_reply_t *adaptors = + xcb_xv_query_adaptors_reply (conn, + xcb_xv_query_adaptors (conn, p_sys->embed->xid), NULL); + if (adaptors == NULL) goto error; + int forced_adaptor = var_CreateGetInteger (obj, "xvideo-adaptor"); + /* */ video_format_t fmt = vd->fmt; - // TODO ! -#if 1 - p_sys->att = NULL; bool found_adaptor = false; - /* FIXME: check max image size */ xcb_xv_adaptor_info_iterator_t it; - for (it = xcb_xv_query_adaptors_info_iterator (p_sys->adaptors); - it.rem > 0; + for (it = xcb_xv_query_adaptors_info_iterator (adaptors); + it.rem > 0 && !found_adaptor; xcb_xv_adaptor_info_next (&it)) { const xcb_xv_adaptor_info_t *a = it.data; + char *name; + + if (forced_adaptor != -1 && forced_adaptor != 0) + { + forced_adaptor--; + continue; + } - /* FIXME: Open() should fail if none of the ports are usable to VLC */ if (!(a->type & XCB_XV_TYPE_IMAGE_MASK)) continue; - xcb_xv_list_image_formats_reply_t *r; - r = xcb_xv_list_image_formats_reply (p_sys->conn, - xcb_xv_list_image_formats (p_sys->conn, a->base_id), NULL); + xcb_xv_list_image_formats_reply_t *r = + xcb_xv_list_image_formats_reply (conn, + xcb_xv_list_image_formats (conn, a->base_id), NULL); if (r == NULL) continue; - const xcb_xv_image_format_info_t *xfmt; - - /* */ - const vlc_fourcc_t chromas_default[] = { + /* Look for an image format */ + const xcb_xv_image_format_info_t *xfmt = NULL; + const vlc_fourcc_t *chromas, chromas_default[] = { fmt.i_chroma, - VLC_CODEC_YUYV, + VLC_CODEC_RGB32, VLC_CODEC_RGB24, + VLC_CODEC_RGB16, VLC_CODEC_RGB15, + VLC_CODEC_YUYV, 0 }; if (vlc_fourcc_IsYUV (fmt.i_chroma)) @@ -359,66 +377,109 @@ static int Open (vlc_object_t *obj) else chromas = chromas_default; + vlc_fourcc_t chroma; for (size_t i = 0; chromas[i]; i++) { - vlc_fourcc_t chroma = chromas[i]; + chroma = chromas[i]; + + /* Oink oink! */ + if ((chroma == VLC_CODEC_I420 || chroma == VLC_CODEC_YV12) + && a->name_size >= 4 + && !memcmp ("OMAP", xcb_xv_adaptor_info_name (a), 4)) + { + msg_Dbg (vd, "skipping slow I420 format"); + continue; /* OMAP framebuffer sucks at YUV 4:2:0 */ + } + xfmt = FindFormat (vd, chroma, &fmt, a->base_id, r, &p_sys->att); if (xfmt != NULL) { + p_sys->id = xfmt->id; fmt.i_chroma = chroma; - goto found_format; + if (xfmt->type == XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB) + { + fmt.i_rmask = xfmt->red_mask; + fmt.i_gmask = xfmt->green_mask; + fmt.i_bmask = xfmt->blue_mask; + } + break; } } free (r); - continue; + if (xfmt == NULL) /* No acceptable image formats */ + continue; - found_format: - /* TODO: grab port */ - p_sys->port = a->base_id; - msg_Dbg (vd, "using port %"PRIu32, p_sys->port); + /* Grab a port */ + for (unsigned i = 0; i < a->num_ports; i++) + { + xcb_xv_port_t port = a->base_id + i; + xcb_xv_grab_port_reply_t *gr = + xcb_xv_grab_port_reply (conn, + xcb_xv_grab_port (conn, port, XCB_CURRENT_TIME), NULL); + uint8_t result = gr ? gr->result : 0xff; + + free (gr); + if (result == 0) + { + p_sys->port = port; + goto grabbed_port; + } + msg_Dbg (vd, "cannot grab port %"PRIu32, port); + } + continue; /* No usable port */ - p_sys->id = xfmt->id; + grabbed_port: + /* Found port - initialize selected format */ + name = strndup (xcb_xv_adaptor_info_name (a), a->name_size); + if (name != NULL) + { + msg_Dbg (vd, "using adaptor %s", name); + free (name); + } + msg_Dbg (vd, "using port %"PRIu32, p_sys->port); msg_Dbg (vd, "using image format 0x%"PRIx32, p_sys->id); - if (xfmt->type == XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB) + + /* Look for an X11 visual, create a window */ + xcb_xv_format_t *f = xcb_xv_adaptor_info_formats (a); + for (uint_fast16_t i = a->num_formats; i > 0; i--, f++) { - fmt.i_rmask = xfmt->red_mask; - fmt.i_gmask = xfmt->green_mask; - fmt.i_bmask = xfmt->blue_mask; + if (f->depth != depth) + continue; /* this would fail anyway */ + + const uint32_t mask = + /* XCB_CW_EVENT_MASK */ + XCB_EVENT_MASK_VISIBILITY_CHANGE; + xcb_void_cookie_t c; + + c = xcb_create_window_checked (conn, f->depth, p_sys->window, + p_sys->embed->xid, 0, 0, 1, 1, 0, + XCB_WINDOW_CLASS_INPUT_OUTPUT, f->visual, + XCB_CW_EVENT_MASK, &mask); + + if (!CheckError (vd, conn, "cannot create X11 window", c)) + { + msg_Dbg (vd, "using X11 visual ID 0x%"PRIx32 + " (depth: %"PRIu8")", f->visual, f->depth); + msg_Dbg (vd, "using X11 window 0x%08"PRIx32, p_sys->window); + goto created_window; + } } - else - if (xfmt->num_planes == 3 - && !strcmp ((const char *)xfmt->vcomp_order, "YVU")) - fmt.i_chroma = VLC_CODEC_YV12; - free (r); + xcb_xv_ungrab_port (conn, p_sys->port, XCB_CURRENT_TIME); + continue; /* No workable XVideo format (visual/depth) */ + + created_window: found_adaptor = true; break; } + free (adaptors); if (!found_adaptor) { msg_Err (vd, "no available XVideo adaptor"); goto error; } -#endif - - /* Create window */ + else { - const uint32_t mask = - /* XCB_CW_EVENT_MASK */ - XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | - XCB_EVENT_MASK_POINTER_MOTION; - xcb_void_cookie_t c; - xcb_window_t window = xcb_generate_id (p_sys->conn); - - c = xcb_create_window_checked (p_sys->conn, screen->root_depth, window, - p_sys->embed->handle.xid, 0, 0, 1, 1, 0, - XCB_WINDOW_CLASS_INPUT_OUTPUT, - screen->root_visual, - XCB_CW_EVENT_MASK, &mask); - if (CheckError (vd, p_sys->conn, "cannot create X11 window", c)) - goto error; - p_sys->window = window; - msg_Dbg (vd, "using X11 window %08"PRIx32, p_sys->window); - xcb_map_window (p_sys->conn, window); + xcb_map_window (conn, p_sys->window); vout_display_place_t place; @@ -427,20 +488,25 @@ static int Open (vlc_object_t *obj) p_sys->height = place.height; /* */ - const uint32_t values[] = { place.x, place.y, place.width, place.height }; - xcb_configure_window (p_sys->conn, p_sys->window, + const uint32_t values[] = { + place.x, place.y, place.width, place.height }; + xcb_configure_window (conn, p_sys->window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | - XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, + XCB_CONFIG_WINDOW_WIDTH | + XCB_CONFIG_WINDOW_HEIGHT, values); } + p_sys->visible = false; /* Create graphic context */ - p_sys->gc = xcb_generate_id (p_sys->conn); - xcb_create_gc (p_sys->conn, p_sys->gc, p_sys->window, 0, NULL); - msg_Dbg (vd, "using X11 graphic context %08"PRIx32, p_sys->gc); + p_sys->gc = xcb_generate_id (conn); + xcb_create_gc (conn, p_sys->gc, p_sys->window, 0, NULL); + msg_Dbg (vd, "using X11 graphic context 0x%08"PRIx32, p_sys->gc); - /* */ - p_sys->pool = NULL; + /* Create cursor */ + p_sys->cursor = CreateBlankCursor (conn, screen); + + CheckSHM (obj, conn, &p_sys->shm); /* */ vout_display_info_t info = vd->info; @@ -450,17 +516,17 @@ static int Open (vlc_object_t *obj) vd->fmt = fmt; vd->info = info; - vd->get = Get; + vd->pool = Pool; vd->prepare = NULL; vd->display = Display; vd->control = Control; vd->manage = Manage; /* */ - unsigned width, height; - if (!GetWindowSize (p_sys->embed, p_sys->conn, &width, &height)) - vout_display_SendEventDisplaySize (vd, width, height); vout_display_SendEventFullscreen (vd, false); + unsigned width, height; + if (!GetWindowSize (p_sys->embed, conn, &width, &height)) + vout_display_SendEventDisplaySize (vd, width, height, false); return VLC_SUCCESS; @@ -486,29 +552,29 @@ static void Close (vlc_object_t *obj) if (!res->p->p_pixels) break; - PictureResourceFree (res, p_sys->conn); + PictureResourceFree (res, NULL); } picture_pool_Delete (p_sys->pool); } free (p_sys->att); - free (p_sys->adaptors); - vout_display_DeleteWindow (vd, p_sys->embed); xcb_disconnect (p_sys->conn); + vout_display_DeleteWindow (vd, p_sys->embed); free (p_sys); } /** * Return a direct buffer */ -static picture_t *Get (vout_display_t *vd) +static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count) { vout_display_sys_t *p_sys = vd->sys; + (void)requested_count; if (!p_sys->pool) { - picture_t *pic = picture_New (vd->fmt.i_chroma, - p_sys->att->width, p_sys->att->height, 0); + picture_t *pic = picture_New (vd->fmt.i_chroma, p_sys->att->width, + p_sys->att->height, 0, 1); if (!pic) return NULL; @@ -537,6 +603,13 @@ static picture_t *Get (vout_display_t *vd) /* We assume that offsets[0] is zero */ for (int i = 1; i < pic->i_planes; i++) res->p[i].p_pixels = res->p[0].p_pixels + offsets[i]; + if (vd->fmt.i_chroma == VLC_CODEC_YV12) + { /* YVU: swap U and V planes */ + uint8_t *buf = res->p[2].p_pixels; + res->p[2].p_pixels = res->p[1].p_pixels; + res->p[1].p_pixels = buf; + } + pic_array[count] = picture_NewFromResource (&vd->fmt, res); if (!pic_array[count]) { @@ -551,16 +624,11 @@ static picture_t *Get (vout_display_t *vd) return NULL; p_sys->pool = picture_pool_New (count, pic_array); - if (!p_sys->pool) - { - /* TODO release picture resources */ - return NULL; - } - /* FIXME should also do it in case of error ? */ + /* TODO release picture resources if NULL */ xcb_flush (p_sys->conn); } - return picture_pool_Get (p_sys->pool); + return p_sys->pool; } /** @@ -570,10 +638,13 @@ static void Display (vout_display_t *vd, picture_t *pic) { vout_display_sys_t *p_sys = vd->sys; xcb_shm_seg_t segment = pic->p_sys->segment; + xcb_void_cookie_t ck; + if (!p_sys->visible) + goto out; if (segment) - xcb_xv_shm_put_image (p_sys->conn, p_sys->port, p_sys->window, - p_sys->gc, segment, p_sys->id, 0, + ck = xcb_xv_shm_put_image_checked (p_sys->conn, p_sys->port, + p_sys->window, p_sys->gc, segment, p_sys->id, 0, /* Src: */ vd->source.i_x_offset, vd->source.i_y_offset, vd->source.i_visible_width, @@ -582,17 +653,25 @@ static void Display (vout_display_t *vd, picture_t *pic) /* Memory: */ pic->p->i_pitch / pic->p->i_pixel_pitch, pic->p->i_lines, false); else - xcb_xv_put_image (p_sys->conn, p_sys->port, p_sys->window, + ck = xcb_xv_put_image_checked (p_sys->conn, p_sys->port, p_sys->window, p_sys->gc, p_sys->id, vd->source.i_x_offset, vd->source.i_y_offset, vd->source.i_visible_width, vd->source.i_visible_height, 0, 0, p_sys->width, p_sys->height, - vd->source.i_width, vd->source.i_height, + pic->p->i_pitch / pic->p->i_pixel_pitch, + pic->p->i_lines, p_sys->data_size, pic->p->p_pixels); - xcb_flush (p_sys->conn); + /* Wait for reply. See x11.c for rationale. */ + xcb_generic_error_t *e = xcb_request_check (p_sys->conn, ck); + if (e != NULL) + { + msg_Dbg (vd, "%s: X11 error %d", "cannot put image", e->error_code); + free (e); + } +out: picture_Release (pic); } @@ -602,6 +681,12 @@ static int Control (vout_display_t *vd, int query, va_list ap) switch (query) { + case VOUT_DISPLAY_CHANGE_FULLSCREEN: + { + const vout_display_cfg_t *c = va_arg (ap, const vout_display_cfg_t *); + return vout_window_SetFullScreen (p_sys->embed, c->is_fullscreen); + } + case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: case VOUT_DISPLAY_CHANGE_ZOOM: @@ -610,6 +695,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) { const vout_display_cfg_t *cfg; const video_format_t *source; + bool is_forced = false; if (query == VOUT_DISPLAY_CHANGE_SOURCE_ASPECT || query == VOUT_DISPLAY_CHANGE_SOURCE_CROP) @@ -621,10 +707,13 @@ static int Control (vout_display_t *vd, int query, va_list ap) { source = &vd->source; cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *); + if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE) + is_forced = (bool)va_arg (ap, int); } /* */ if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE + && is_forced && (cfg->display.width != vd->cfg->display.width ||cfg->display.height != vd->cfg->display.height) && vout_window_SetSize (p_sys->embed, @@ -650,19 +739,15 @@ static int Control (vout_display_t *vd, int query, va_list ap) case VOUT_DISPLAY_CHANGE_ON_TOP: { int on_top = (int)va_arg (ap, int); - return vout_window_SetOnTop (p_sys->embed, on_top); + return vout_window_SetState (p_sys->embed, on_top); } - /* TODO */ -#if 0 /* Hide the mouse. It will be send when * vout_display_t::info.b_hide_mouse is false */ - VOUT_DISPLAY_HIDE_MOUSE, - - /* Ask the module to acknowledge/refuse the fullscreen state change after - * being requested (externaly or by VOUT_DISPLAY_EVENT_FULLSCREEN */ - VOUT_DISPLAY_CHANGE_FULLSCREEN, /* const vout_display_cfg_t *p_cfg */ -#endif + case VOUT_DISPLAY_HIDE_MOUSE: + xcb_change_window_attributes (p_sys->conn, p_sys->embed->xid, + XCB_CW_CURSOR, &(uint32_t){ p_sys->cursor }); + return VLC_SUCCESS; case VOUT_DISPLAY_RESET_PICTURES: assert(0); default: @@ -675,6 +760,6 @@ static void Manage (vout_display_t *vd) { vout_display_sys_t *p_sys = vd->sys; - ManageEvent (vd, p_sys->conn, p_sys->window); + ManageEvent (vd, p_sys->conn, &p_sys->visible); }