mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
-fixed-vo support, based on patch by .so :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7758 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
539d77e892
commit
9214ce653c
@ -1,3 +1,4 @@
|
|||||||
|
/* vo_xv.c, X11 Xv interface */
|
||||||
|
|
||||||
// Number of buffers _FOR_DOUBLEBUFFERING_MODE_
|
// Number of buffers _FOR_DOUBLEBUFFERING_MODE_
|
||||||
// Use option -double to enable double buffering! (default: single buffer)
|
// Use option -double to enable double buffering! (default: single buffer)
|
||||||
@ -15,21 +16,6 @@ Buffer allocation:
|
|||||||
3: 2*STATIC+TEMP
|
3: 2*STATIC+TEMP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* vo_xv.c, X11 Xv interface
|
|
||||||
*
|
|
||||||
* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Hacked into mpeg2dec by
|
|
||||||
*
|
|
||||||
* Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
|
||||||
*
|
|
||||||
* Xv image suuport by Gerd Knorr <kraxel@goldbach.in-berlin.de>
|
|
||||||
* fullscreen support by Pontscho
|
|
||||||
* double buffering support by A'rpi
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -258,6 +244,8 @@ static int xv_get_eq(char *name, int *value)
|
|||||||
return(VO_FALSE);
|
return(VO_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void deallocate_xvimage(int foo);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* connect to server, create and map window,
|
* connect to server, create and map window,
|
||||||
* allocate colors and (shared) memory
|
* allocate colors and (shared) memory
|
||||||
@ -377,7 +365,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
XMapWindow( mDisplay,vo_window );
|
XMapWindow( mDisplay,vo_window );
|
||||||
} else { drwX=vo_dx; drwY=vo_dy; }
|
} else { drwX=vo_dx; drwY=vo_dy; }
|
||||||
} else
|
} else
|
||||||
{
|
if ( vo_window == None ){
|
||||||
vo_window = XCreateWindow(mDisplay, mRootWin,
|
vo_window = XCreateWindow(mDisplay, mRootWin,
|
||||||
hint.x, hint.y, hint.width, hint.height,
|
hint.x, hint.y, hint.width, hint.height,
|
||||||
0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
|
0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
|
||||||
@ -396,7 +384,9 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
#ifdef HAVE_XINERAMA
|
#ifdef HAVE_XINERAMA
|
||||||
vo_x11_xinerama_move(mDisplay,vo_window);
|
vo_x11_xinerama_move(mDisplay,vo_window);
|
||||||
#endif
|
#endif
|
||||||
}
|
} else
|
||||||
|
XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
|
||||||
|
|
||||||
vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
|
vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
|
||||||
XFlush(mDisplay);
|
XFlush(mDisplay);
|
||||||
XSync(mDisplay, False);
|
XSync(mDisplay, False);
|
||||||
@ -425,6 +415,10 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
|
|||||||
default: draw_alpha_fnc=draw_alpha_null;
|
default: draw_alpha_fnc=draw_alpha_null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( vo_config_count )
|
||||||
|
for(current_buf=0;current_buf<num_buffers;++current_buf)
|
||||||
|
deallocate_xvimage(current_buf);
|
||||||
|
|
||||||
for(current_buf=0;current_buf<num_buffers;++current_buf)
|
for(current_buf=0;current_buf<num_buffers;++current_buf)
|
||||||
allocate_xvimage(current_buf);
|
allocate_xvimage(current_buf);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user