summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.h
Commit message (Collapse)AuthorAgeFilesLines
* vo_vdpau: disable refresh-aware frame timing when compositedUoti Urpala2012-07-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Under a compositing window manager the current VDPAU implementation behaves differently than without it. Frame flip timing info becomes incorrect (I guess it only reflects when the frame was sent to the compositor, not when it was actually shown), and there is no limitation to at most one frame switch per refresh like without compositing. Detect whether a compositing window manager is active and disable refresh-aware frame timing and dropping in this case, similarly to what fps=-1 would do. This behavior can be controlled with the new suboption "composite-detect". Disabling the refresh-aware logic makes timing somewhat less accurate. Because the video switch rate limit isn't there, the lack of frame dropping on player side does not impose a hard limit on video FPS, but does reduce performance somewhat as redundant frames are drawn in memory. The existence of a compositing window manager does not guarantee that the current window is actually composited, so the current check is not foolproof. In particular, some WMs have support for a "unredirect fullscreen windows" option. Support for such things could be improved.
* options, x11+cocoa: add option --cursor-autohide-delayStefano Pigozzi2012-03-251-1/+0
| | | | | | | | | | | | | | | Add option --cursor-autohide-delay to control the number of milliseconds with no user interaction before the mouse cursor is hidden. There are two negative values with useful special meanings: * A value of -1 prevents the cursor from hiding (useful for users with multiple displays). * A value of -2 prevents the cursor from showing upon activity. The default is 1 second to keep the behaviour consistent with the past X11 backend implementation. Remove the vo_mouse_autohide field as it was always true.
* x11: allow unicode inputwm42012-03-251-0/+3
| | | | | | | | | This change allows using non-ASCII keys with X11. These keys were ingored before. Technically, this creates an invisible, non-interactive input method context. If creation fails, the code falls back to the old method, which allows a subset of ASCII only.
* x11: set window titles as UTF-8wm42011-12-061-0/+3
| | | | | | | | | | | | | | Always set the X11 window title properties as UTF-8. This is a bit tricky for X11 window properties which are not specified to use UTF-8, such as WM_NAME. We also properly set WM_ICON_NAME, which means the window caption and the text used in the task bar (of the WM has one) will be the same on most window managers. Before this commit, WM_ICON_NAME was always hardcoded to "MPlayer", even if --title or --use-filename-title was used. Also update the window title only on reconfigure, like it is done in mplayer-svn commit 34380.
* libvo: remove title argument from struct vo_driver.configwm42011-12-061-2/+3
| | | | | | | | | | This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the window title.
* vo_xv: avoid clearing too much on resizeUoti Urpala2011-07-061-1/+1
| | | | | | | | | | | | | vo_xv set the "use_fs" parameter to vo_x11_clearwindow_part(). This meant it always used the whole screen size to calculate the area to clear. I can't see why overriding the vo->dwidth/dheight values would ever be the right thing to do (if in fullscreen they should be set to match that), so remove the use_fs parameter and always use the dwidth/dheight values in the function. Also delete code drawing back borders in vo_xv_draw colorkey. That should already happen in vo_x11_clearwindow_part(); if it doesn't then things need to be fixed anyway because colorkey code only ran in fullscreen mode (but borders must work in window mode too).
* cleanup: avoid various GCC warningsClément Bœsch2011-04-201-4/+4
|
* x11_common: fix for reconfig with pos/xineramascreen setUoti Urpala2011-02-031-2/+2
| | | | | | | | | | | | | vo_x11_create_vo_window() only called vo_x11_update_geometry() if no window position had been specified by -geometry or -xineramascreen, to avoid overwriting the specified position with values from the existing window. However window size should be initialized to the existing window here, and setting new window title for -use-filename-title is also done in vo_x11_update_geometry() (for whatever reason, it doesn't match what else that function does). Change the code in vo_x11_create_vo_window() to always call vo_x11_update_geometry() for size variable and window title updates, but add a flag that tells it not to update position variables.
* input: support bindings with modifier keys for X inputUoti Urpala2010-12-201-2/+0
| | | | | | | | | | | | | | | | | | | | | Add support for binding commands to modifier+key combinations like "Shift+Left" or "Ctrl+Alt+x", and support reading such combinations from the output window of X VOs. The recognized modifier names are Shift, Ctrl, Alt and Meta. Any combination of those and then a non-modifier key name, separated by '+', is accepted as a key name in input.conf. For non-special keys that produce characters shift is ignored as a modifier. For example "A" is handled as a key without modifiers even if you use shift to write the capital letter; 'a' vs 'A' already distinguishes the combinations with a normal keymap, and having separate 'a', 'Shift+A' and 'A' (written with caps lock for example) would bring more confusion than benefit. Currently reading the modifier+key combinations is only supported in the output window of those VOs that use x11_common.c event handling. It's not possible to input the key combinations in other VOs or in a terminal window.
* 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
| | |