summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.h
Commit message (Collapse)AuthorAgeFilesLines
* x11_common.h: remove some unused declarationsUoti Urpala2010-11-021-3/+0
|
* vo: improve fixed-vo behavior when video size changes in x11 VOsUoti Urpala2010-07-231-0/+12
| | | | | | | | | Now the window is only resized when video size (or size specified by -geometry) changes; reconfiguring the window with the same size no longer changes back to default size from possibly user-modified one. Also fix a bug in fullscreen handling that could cause incorrect window size when turning fullscreen off.
* Merge svn changes up to r30514Uoti Urpala2010-03-091-0/+1
|\
* | Merge svn changes up to r30216Uoti Urpala2010-01-081-0/+1
|\|
| * Add missing header #includes to fix 'make checkheaders'.diego2010-01-041-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30208 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30136Uoti Urpala2009-12-301-1/+1
|\| | | | | | | Ignore another broken correct-pts change in 30134.
| * vo_x11_classhint name argument should be const, since we pass string ↵reimar2009-12-271-1/+1
| | | | | | | | | | | | constants there. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30125 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Implement vsync-aware frame timing for VDPAUUoti Urpala2009-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main things added are custom frame dropping for VDPAU to work around the display FPS limit, frame timing adjustment to avoid jitter when video frame times keep falling near vsyncs, and use of VDPAU's timing feature to keep one future frame queued in advance. NVIDIA's VDPAU implementation refuses to change the displayed frame more than once per vsync. This set a limit on how much video could be sped up, and caused problems for nearly all videos on low-FPS video projectors (playing 24 FPS video on a 24 FPS projector would not work reliably as MPlayer may need to slightly speed up the video for AV sync). This commit adds a framedrop mechanism that drops some frames so that no more than one is sent for display per vsync. The code tries to select the dropped frames smartly, selecting the best one to show for each vsync. Because of the timing features needed the drop functionality currently does not work if the correct-pts option is disabled. The code also adjusts frame timing slightly to avoid jitter. If you for example play 24 FPS video content on a 72 FPS display then normally a frame would be shown for 3 vsyncs, but if the frame times happen to fall near vsyncs and change between just before and just after then there could be frames alternating between 2 and 4 vsyncs. The code changes frame timing by up to one quarter vsync interval to avoid this. The above functionality depends on having reliable vsync timing information available. The display refresh rate is not directly provided by the VDPAU API. The current code uses information from the XF86VidMode extension if available; I'm not sure how common cases where that is inaccurate are. The refresh rate can be specified manually if necessary. After the changes in this commit MPlayer now always tries to keep one frame queued for future display using VDPAU's internal timing mechanism (however no more than 50 ms to the future). This should make video playback somewhat more robust against timing inaccuracies caused by system load.
* | x11_common.h: Remove declarations of some nonexistent variablesUoti Urpala2009-05-041-3/+0
| |
* | Merge svn changes up to r28641Uoti Urpala2009-02-181-0/+1
|\| | | | | | | | | | | | | | | Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border macro) to use a wrapper macro in old-style VOs which do not provide a VO object argument. Before this function had an explicit global_vo argument in vo_gl/gl2. New vo_vdpau uses it too so use the same mechanism as most other functions.
* | Merge svn changes up to r28549Uoti Urpala2009-02-131-3/+0
|\|
| * Remove now unused vo_calc_drwXY function.reimar2009-02-121-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28547 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28537Uoti Urpala2009-02-121-0/+18
|\|
| * Add standard license headers, unify header formatting.diego2009-02-081-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28481 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-151-0/+2
|\| | | | | | | | | | | | | | | The libdvdread4 and libdvdnav directories, which are externals in the svn repository, are at least for now not included in any form. I added configure checks to automatically disable internal libdvdread and libdvdnav if the corresponding directories are not present; if they're added manually then things work the same as in svn.
| * Factor calc_drwXY out of vo_xv and vo_xvmc.cehoyos2009-01-091-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28285 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove old VO vo_mouse_autohide compatibility #defineUoti Urpala2008-11-221-1/+0
| | | | | | | | | | The VOs no longer access vo_mouse_autohide directly so the #define is not needed.
* | Merge svn changes up to r27949Uoti Urpala2008-11-171-8/+10
|\| | | | | | | | | | | | | | | | | Conflicts: common.mak libvo/vo_xv.c libvo/x11_common.c libvo/x11_common.h stream/cache2.c
| * Simplify vo_vm_switch and vo_vm_close, everyone was using the (almost) samereimar2008-11-151-2/+2
| | | | | | | | | | | | | | boiler-plate code with them, just with different bugs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27924 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Cosmetics: remove useless "extern"reimar2008-11-151-33/+33
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27920 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace some of the different inconsistent XGetGeometry uses by areimar2008-11-151-0/+1
| | | | | | | | | | | | | | vo_x11_update_geometry function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27919 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to 27824Uoti Urpala2008-10-251-0/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h libmpcodecs/dec_video.c libmpcodecs/vd.c libvo/x11_common.h mplayer.c stream/cache2.c
| * Move X11_FULLSCREEN definition to x11_common.h where it belongs.diego2008-10-161-0/+6
| | | | | | | | | | | | | | config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27784 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27649Uoti Urpala2008-09-201-1/+0
|\| | | | | | | | | | | | | Conflicts: Makefile configure libvo/x11_common.c
* | Move some declarations from mplayer.c to proper headersUoti Urpala2008-08-121-0/+2
| | | | | | | | | | Declare mp_input_register_options in input.h and xscreensaver_heartbeat in x11_common.h.
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Change a bunch of X11-specific preprocessor directives.diego2008-08-041-2/+2
| | | | | | | | | | | | | | Switch from a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27409 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27347Uoti Urpala2008-07-251-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: libvo/x11_common.c libvo/x11_common.h Rename the vo_gl macro "vo_border()" to "vo_gl_border" as it conflicts with the global variable "vo_border"; done in the merge commit because uses of the macro needed changes anyway to resolve conflicts.
| * Enable runtime border/window decorations-toggling for Linux gl and gl2 vos.reimar2008-07-221-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27338 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Move allocation/free of x11 struct to x11_common.cUoti Urpala2008-04-291-1/+1
| | | | | | | | Allocate the struct in the init function and free in uninit.
* | Add a context for mp_fifoUoti Urpala2008-04-291-1/+1
| | | | | | | | | | Store data in an allocated context and take it as an argument instead of using static variables.
* | Move mRootWin,mScreen,mLocalDisplay to x11 structUoti Urpala2008-04-231-0/+6
| |
* | Move vo_mouse_autohide,vo_wm_type,vo_fs_type,vo_fs_flip to x11 structUoti Urpala2008-04-231-2/+6
| |
* | x11_common: Move vo_old_[x|y|width|height| to x11 structUoti Urpala2008-04-231-0/+5
| |
* | x11_common.c: Move orig_layer and old_gravity to x11 structUoti Urpala2008-04-231-0/+2
| |
* | Move static mouse hide timers to x11 structUoti Urpala2008-04-231-0/+2
| |
* | Move vo_gc,f_gc,vo_hints to x11 structUoti Urpala2008-04-231-3/+6
| |
* | x11_common.c: Move function-static variables to structUoti Urpala2008-04-231-1/+5
| |
* | Move xv_port,xv_colorkey,xv_ck_info to x11 structUoti Urpala2008-04-231-14/+13
| |
* | Move vo_window to x11 structUoti Urpala2008-04-231-3/+3
| |
* | Move static X11 atoms to structUoti Urpala2008-04-231-2/+17
| |
* | Move vo_screenwidth,vo_screenheight to options structUoti Urpala2008-04-231-2/+4
| |
* | Move vo_depthonscreen to x11 structUoti Urpala2008-04-231-0/+2
| |
* | Move vo_dx,vo_dy,vo_dwidth,vo_dheight to vo structUoti Urpala2008-04-231-1/+2
| |
* | Move global mDisplay to x11 state structUoti Urpala2008-04-231-18/+34
| |
* | Create a struct for X11 stateUoti Urpala2008-04-231-0/+5
| | | | | | | | | | | | | | | | Will be used for common data between X11 VOs. The main reasons for making it a separate struct rather than extra fields in the main VO struct are that some field definitions need X headers and that the code keeps basic X state such as the display connection over opening and closing of individual VOs.
* | x11_common.c: Make some functions staticUoti Urpala2008-04-231-9/+0
| |
* | Move vo_ontop to options structUoti Urpala2008-04-231-4/+14
|/ | | | | | | | | | | Add a 'struct vo *vo' argument to the x11_common.c functions that access the variable so it's available as vo->opts->vo_ontop. To keep VOs using the old API working create a global vo variable that is set to the currently used old vo. "vo_ontop" will be #defined to "global_vo->opts->vo_ontop", and x11_common.h will add defines like the following when it is included by old VOs: #define vo_x11_ontop() vo_x11_ontop(global_vo) so that they will call the function according to the new declaration.
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-4/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless #ifdefs around extern declarations.diego2008-02-201-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26039 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make X11 window creation and (with -fixed-vo) management simpler and morereimar2007-06-271-0/+3
| | | | | | | | | consistent by introducing a new function that handles most of the ugly things. Changes of behaviour with some vos is unavoidable, bug reports welcome. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23675 b3059339-0415-0410-9bf9-f77b7e298cf2
* "()" to "(void)" function param list fixesuau2007-04-011-2/+2
| | | | | | | patch from Stefan Huehner, stefan huehner org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove updating of vo_mouse_timer_const from the main loop and alsouau2006-04-251-1/+0
| | | | | | | | remove the variable itself. Convert code in x11_common.c and OSD timing that depended on the variable to use real time instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18288 b3059339-0415-0410-9bf9-f77b7e298cf2
* forgotten update_xinerama_info prototypesreimar2006-04-211-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18175 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix and improve xinerama supportreimar2006-04-161-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18117 b3059339-0415-0410-9bf9-f77b7e298cf2
* Patch by Stefan Huehner / stefan % huehner ! org \rathann2006-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- Måns Rullgård git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
* Test if source image dimensions are too big.al2005-11-101-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16959 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove extern for variables that are already in headers.reimar2005-08-211-11/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16281 b3059339-0415-0410-9bf9-f77b7e298cf2
* added forgotten xv_enable_vsyncreimar2005-06-301-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15865 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix vo_xv_draw_colorkey to a workable stateiive2005-04-101-2/+1
| | | | | | | (using panscan makes x,y negative, so it is very bad idea they to be unsigned) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15101 b3059339-0415-0410-9bf9-f77b7e298cf2
* missing externs (fixes implicit declaration warnings)rathann2005-03-011-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14885 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unified colorkey code for vo xv and vo xvmc.al2005-02-201-0/+28
| | | | | | | | | | | | Made the code also more flexible. Colorkey drawing is now by default done as proposed by Marko Macek. Patch also approved by iive. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14743 b3059339-0415-0410-9bf9-f77b7e298cf2
* X11 headers must be included also when X11_FULLSCREEN is not defined (althoughreimar2005-02-061-2/