Commit 60211457 authored by Jean-Paul Saman's avatar Jean-Paul Saman

codec/avcodec/vaapi*.c: Cleanup

Rename vlc_va_conn_t::p_display_x11 to vlc_va_conn_t::p_x11.
parent c4da95eb
......@@ -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;
......
......@@ -317,9 +317,9 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
* looks like it assumes fullscreen for
* vout_display_PlacePicture() to work as expected. */
unsigned int width, height;
int screen = DefaultScreen(sys->conn->p_display_x11);
width = DisplayWidth(sys->conn->p_display_x11, screen);
height = DisplayHeight(sys->conn->p_display_x11, screen);
int screen = DefaultScreen(sys->conn->p_x11);
width = DisplayWidth(sys->conn->p_x11, screen);
height = DisplayHeight(sys->conn->p_x11, screen);
sys->conn->unlock();
memset (&wnd_cfg, 0, sizeof (wnd_cfg));
......@@ -345,7 +345,7 @@ static int GetWindowSize(vout_display_t *vd, unsigned int *pi_width, unsigned in
unsigned int bw, depth;
sys->conn->lock();
status = XGetGeometry(sys->conn->p_display_x11,
status = XGetGeometry(sys->conn->p_x11,
sys->embed->handle.xid,
&root_window,
&x, &y, pi_width, pi_height,
......@@ -452,11 +452,11 @@ 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)
{
sys->conn->lock();
XFlush(sys->conn->p_display_x11);
XSync(sys->conn->p_display_x11, False);
XFlush(sys->conn->p_x11);
XSync(sys->conn->p_x11, False);
sys->conn->unlock();
}
......
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