From f85075724981d8f0c49b533648374ddbf61020b3 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 14:21:02 +0000 Subject: Fix grammar of comment and sync it with vo_x11.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27912 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index f84f99fb83..93b14568b0 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -226,7 +226,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, #ifdef CONFIG_GUI if (use_gui) - guiGetEvent(guiSetShVideo, 0); // let the GUI to setup/resize our window + guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else #endif { -- cgit v1.2.3 From eb4f31f73b05ae7c7f63bf182a5540bdec5da7fe Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 16:36:39 +0000 Subject: Remove vo_xv code that has been under #if 0 since ages. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27916 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 93b14568b0..684d543c72 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -352,10 +352,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, current_buf = 0; current_ip_buf = 0; -#if 0 - set_gamma_correction(); -#endif - aspect(&vo_dwidth, &vo_dheight, A_NOZOOM); if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0) vo_fs = 1; calc_drwXY(&drwX, &drwY); @@ -367,31 +363,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, vo_dwidth + vo_panscan_x - 1, vo_dheight + vo_panscan_y - 1); - -#if 0 -#ifdef HAVE_SHM - if (Shmem_Flag) - { - XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, - xvimage[current_buf], 0, 0, image_width, - image_height, drwX, drwY, 1, 1, False); - XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, - xvimage[current_buf], 0, 0, image_width, - image_height, drwX, drwY, vo_dwidth, - (vo_fs ? vo_dheight - 1 : vo_dheight), False); - } else -#endif - { - XvPutImage(mDisplay, xv_port, vo_window, vo_gc, - xvimage[current_buf], 0, 0, image_width, image_height, - drwX, drwY, 1, 1); - XvPutImage(mDisplay, xv_port, vo_window, vo_gc, - xvimage[current_buf], 0, 0, image_width, image_height, - drwX, drwY, vo_dwidth, - (vo_fs ? vo_dheight - 1 : vo_dheight)); - } -#endif - mp_msg(MSGT_VO, MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n", drwX, drwY, vo_dwidth, vo_dheight); -- cgit v1.2.3 From 18fac2d9475e3292a8f7273a6811710f2539cd6b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 16:40:48 +0000 Subject: Remove code from unused and since ages deprecated draw_frame function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27917 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 684d543c72..1019036476 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -551,8 +551,7 @@ static int draw_slice(uint8_t * image[], int stride[], int w, int h, static int draw_frame(uint8_t * src[]) { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_XV_DrawFrameCalled); - return -1; + return VO_ERROR; } static uint32_t draw_image(mp_image_t * mpi) -- cgit v1.2.3 From 252f6d5093b732e3762e97348af4e8599d09a999 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 17:41:30 +0000 Subject: Remove a useless XGetGeometry call, the X11 event handling already takes care of this. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27918 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 1019036476..6949c00f0a 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -462,11 +462,6 @@ static void check_events(void) if (e & VO_EVENT_RESIZE) { - XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &vo_dwidth, - &vo_dheight, &drwBorderWidth, &drwDepth); - mp_msg(MSGT_VO, MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n", drwX, - drwY, vo_dwidth, vo_dheight); - calc_drwXY(&drwX, &drwY); } -- cgit v1.2.3 From 87bee02b191b7400532ff40c21da8dd43c15d289 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 17:45:55 +0000 Subject: Replace some of the different inconsistent XGetGeometry uses by a vo_x11_update_geometry function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27919 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 6949c00f0a..8b6cfda146 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -290,11 +290,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, ButtonReleaseMask | ExposureMask); XMapWindow(mDisplay, vo_window); - XGetGeometry(mDisplay, vo_window, &mRoot, - &drwX, &drwY, &vo_dwidth, &vo_dheight, - &drwBorderWidth, &drwDepth); - if (vo_dwidth <= 0) vo_dwidth = d_width; - if (vo_dheight <= 0) vo_dheight = d_height; + vo_x11_update_geometry(); aspect_save_prescale(vo_dwidth, vo_dheight); } } else -- cgit v1.2.3 From f2bceedc4915245e68856442c07eb4198bee1e2c Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 18:14:03 +0000 Subject: Get rid of (besides useless assignments) unused XSizeHints variable git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27922 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 8b6cfda146..7386505d8a 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -166,7 +166,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { - XSizeHints hint; XVisualInfo vinfo; XGCValues xgcv; XSetWindowAttributes xswa; @@ -230,10 +229,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, else #endif { - hint.x = vo_dx; - hint.y = vo_dy; - hint.width = d_width; - hint.height = d_height; #ifdef CONFIG_XF86VM if (vm) { @@ -248,16 +243,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } vo_vm_switch(vm_width, vm_height, &modeline_width, &modeline_height); - hint.x = (vo_screenwidth - modeline_width) / 2; - hint.y = (vo_screenheight - modeline_height) / 2; - hint.width = modeline_width; - hint.height = modeline_height; aspect_save_screenres(modeline_width, modeline_height); } else #endif - hint.flags = PPosition | PSize /* | PBaseSize */ ; - hint.base_width = hint.width; - hint.base_height = hint.height; XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs); depth = attribs.depth; -- cgit v1.2.3 From c8d9e2eb60e942009c35270b97045e84e74dd5d5 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 18:28:35 +0000 Subject: Set modified window position and monitor aspect in vo_vm_switch instead of in individual vo drivers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27923 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 7386505d8a..d557838738 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -243,7 +243,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } vo_vm_switch(vm_width, vm_height, &modeline_width, &modeline_height); - aspect_save_screenres(modeline_width, modeline_height); } else #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), -- cgit v1.2.3 From 4b9ee2e2063f8d0a56288cb9d1aa8b35e640600b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 18:56:25 +0000 Subject: Simplify vo_vm_switch and vo_vm_close, everyone was using the (almost) same boiler-plate code with them, just with different bugs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27924 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index d557838738..302d98f1b2 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -232,17 +232,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, #ifdef CONFIG_XF86VM if (vm) { - if ((d_width == 0) && (d_height == 0)) - { - vm_width = image_width; - vm_height = image_height; - } else - { - vm_width = d_width; - vm_height = d_height; - } - vo_vm_switch(vm_width, vm_height, &modeline_width, - &modeline_height); + vo_vm_switch(); } else #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), @@ -659,7 +649,7 @@ static void uninit(void) for (i = 0; i < num_buffers; i++) deallocate_xvimage(i); #ifdef CONFIG_XF86VM - vo_vm_close(mDisplay); + vo_vm_close(); #endif mp_input_rm_event_fd(ConnectionNumber(mDisplay)); vo_x11_uninit(); -- cgit v1.2.3 From 21040bb95168c44232cc39bb9ae7dc9b4af4206f Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 18:58:14 +0000 Subject: Use vo_dwidth/vo_dheight for creating the windows instead of d_width/d_height. This fixes the -vm bug that the created window is too small. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27925 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 302d98f1b2..926f3737be 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -272,7 +272,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } } else { - vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, + vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight, flags, CopyFromParent, "xv", title); XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); } -- cgit v1.2.3 From 55175c457dcad4fc33e10c2db5949d13b0a08cca Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 19:03:21 +0000 Subject: Remove now unused variables. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27926 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 926f3737be..77c9d78531 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -89,8 +89,7 @@ static int flip_flag; static int int_pause; -static Window mRoot; -static uint32_t drwX, drwY, drwBorderWidth, drwDepth; +static uint32_t drwX, drwY; static uint32_t max_width = 0, max_height = 0; // zero means: not set static void (*draw_alpha_fnc) (int x0, int y0, int w, int h, @@ -175,9 +174,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, #ifdef CONFIG_XF86VM int vm = 0; - unsigned int modeline_width, modeline_height; - static uint32_t vm_width; - static uint32_t vm_height; #endif image_height = height; -- cgit v1.2.3 From 39e42b26e9ade6374654f2c82a00ac2f66a81469 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 19:14:09 +0000 Subject: Remove a nonsensical "else" for the video mode switching case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27929 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 77c9d78531..a4a1316033 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -229,7 +229,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (vm) { vo_vm_switch(); - } else + } #endif XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs); -- cgit v1.2.3 From 936420385ae40ab3041788e310bade1569cafd80 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 22:33:36 +0000 Subject: Sync with vo_x11: make sure we get expose events even when drawing to the root window. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27933 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index a4a1316033..f18c64f40f 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -265,7 +265,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, XMapWindow(mDisplay, vo_window); vo_x11_update_geometry(); aspect_save_prescale(vo_dwidth, vo_dheight); - } + } else + XSelectInput(mDisplay, vo_window, ExposureMask); } else { vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight, -- cgit v1.2.3 From 8cc27a3561be0db3295c47ca540cb5739b18aa75 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 15 Nov 2008 23:09:31 +0000 Subject: Remove explicit setting of vo_ontop since that is already done by vo_x11_create_vo_window git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27937 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'libvo/vo_xv.c') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index f18c64f40f..67ec61b485 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -336,9 +336,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, mp_msg(MSGT_VO, MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n", drwX, drwY, vo_dwidth, vo_dheight); - if (vo_ontop) - vo_x11_setlayer(mDisplay, vo_window, vo_ontop); - return 0; } -- cgit v1.2.3