Commit f1e369af authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

codec/avcodec/vaapi*.c: Cleanup

Rename vlc_va_conn_t::p_display_x11 to vlc_va_conn_t::p_x11.
(cherry picked from commit 602114579fbfc8f2734c19726cd07dc2d8475924)

Conflicts:

	modules/codec/avcodec/vaapi_x11.c
parent 01507447
......@@ -84,11 +84,11 @@ vlc_va_conn_t *vlc_va_Initialize( const char *display_name )
conn->unlock = vlc_va_unlock;
/* Create a VA display */
conn->p_display_x11 = XOpenDisplay(display_name);
if( !conn->p_display_x11 )
conn->p_x11 = XOpenDisplay(display_name);
if( !conn->p_x11 )
goto error;
conn->p_display = vaGetDisplay(conn->p_display_x11);
conn->p_display = vaGetDisplay(conn->p_x11);
if( !conn->p_display )
goto error;
......@@ -114,12 +114,12 @@ void vlc_va_Terminate( vlc_va_conn_t *conn )
if( conn->p_display )
vaTerminate( conn->p_display );
if( conn->p_display_x11 )
XCloseDisplay( conn->p_display_x11 );
if( conn->p_x11 )
XCloseDisplay( conn->p_x11 );
/* Reset values */
conn->p_display = 0;
conn->p_display_x11 = NULL;
conn->p_x11 = NULL;
conn->i_version_major = conn->i_version_minor = 0;
conn->i_ref_count = 0;
conn = NULL;
......
......@@ -20,7 +20,7 @@
#ifdef HAVE_AVCODEC_VAAPI
struct vlc_va_conn_t
{
Display *p_display_x11;
Display *p_x11;
VADisplay p_display;
int i_version_major;
int i_version_minor;
......
......@@ -441,9 +441,9 @@ int OpenVaapiX11 (vlc_object_t *obj)
if (FindVAFourCC(vd) != VLC_SUCCESS)
goto error;
XSetEventQueueOwner(sys->conn->p_display_x11, XCBOwnsEventQueue);
XSetEventQueueOwner(sys->conn->p_x11, XCBOwnsEventQueue);
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_display_x11);
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_x11);
assert(conn);
RegisterMouseEvents(obj, conn, sys->embed->handle.xid);
......@@ -523,13 +523,13 @@ void CloseVaapiX11 (vlc_object_t *obj)
vout_display_t *vd = (vout_display_t *) obj;
vout_display_sys_t *sys = (vout_display_sys_t *) vd->sys;
if (sys->conn && sys->conn->p_display_x11)
if (sys->conn && sys->conn->p_x11)
{
/* show the default cursor */
xcb_change_window_attributes(XGetXCBConnection(sys->conn->p_display_x11),
xcb_change_window_attributes(XGetXCBConnection(sys->conn->p_x11),
sys->embed->handle.xid, XCB_CW_CURSOR,
&(uint32_t) { XCB_CURSOR_NONE });
xcb_flush(XGetXCBConnection(sys->conn->p_display_x11));
xcb_flush(XGetXCBConnection(sys->conn->p_x11));
}
if (sys->embed)
......@@ -569,7 +569,7 @@ void CloseVaapiX11 (vlc_object_t *obj)
static void Manage (vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_display_x11);
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_x11);
ManageEvent(vd, conn, &sys->visible);
}
......@@ -598,7 +598,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
{
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_display_x11);
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_x11);
const vout_display_cfg_t *cfg;
const video_format_t *source;
bool is_forced = false;
......@@ -652,7 +652,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
* vout_display_t::info.b_hide_mouse is false */
case VOUT_DISPLAY_HIDE_MOUSE:
{
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_display_x11);
xcb_connection_t *conn = XGetXCBConnection(sys->conn->p_x11);
xcb_change_window_attributes(conn, sys->embed->handle.xid,
XCB_CW_CURSOR, &(uint32_t){ sys->cursor });
......
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