summaryrefslogtreecommitdiffstats
path: root/libvo/x11_common.c
Commit message (Collapse)AuthorAgeFilesLines
* libvo, libao: remove useless video and audio output driverswm42012-07-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of these have only limited use, and some of these have no use at all. Remove them. They make maintainance harder and nobody needs them. It's possible that many of the removed drivers were very useful a dozen of years ago, but now it's 2012. Note that some of these could be added back, in case they were more useful than I thought. But right now, they are just a burden. Reason for removal for each module: vo_3dfx, vo_dfbmga, vo_dxr3, vo_ivtv, vo_mga, vo_s3fb, vo_tdfxfb, vo_xmga, vo_tdfx_vid: All of these are for very specific and outdated hardware. Some of them require non-standard kernel drivers or do direct HW access. vo_dga: the most crappy and ancient way to get fast output on X. vo_aa: there's vo_caca for the same purpose. vo_ggi: this never lived, and is entirely useless. vo_mpegpes: for DVB cards, I can't test this and it's crappy. vo_fbdev, vo_fbdev2: there's vo_directfb2 vo_bl: what is this even? But it's neither important, nor alive. vo_svga, vo_vesa: you want to use this? You can't be serious. vo_wii: I can't test this, and who the hell uses this? vo_xvr100: some Sun thing. vo_xover: only useful in connection with xvr100. ao_nas: still alive, but I doubt it has any meaning today. ao_sun: Sun. ao_win32: use ao_dsound or ao_portaudio instead. ao_ivtv: removed along vo_ivtv. Also get rid of anything SDL related. SDL 1.x is total crap for video output, and will be replaced with SDL 2.x soon (perhaps), so if you want to use SDL, write output drivers for SDL 2.x. Additionally, I accidentally damaged Sun support, which made me completely remove Sun/Solaris support. Nobody cares about this anyway. Some left overs from previous commits removing modules were cleaned up.
* Merge remote-tracking branch 'origin/master'wm42012-07-281-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
| * vo_vdpau: disable refresh-aware frame timing when compositedUoti Urpala2012-07-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'origin/master'wm42012-04-011-10/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h etc/input.conf input/input.c input/input.h libao2/ao_pulse.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c libvo/gl_common.c libvo/x11_common.c mixer.c mixer.h mplayer.c
| * options, x11+cocoa: add option --cursor-autohide-delayStefano Pigozzi2012-03-251-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: remove wskeys.hwm42012-03-251-21/+20
| | | | | | | | | | Use the <X11/keysym.h> xlib header instead. I'm not sure why mplayer defined these constants itself.
| * x11: input: add print and menu keyswm42012-03-251-0/+1
| |
| * x11: add KP_Separator to key mappingwm42012-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | At least on some keyboards, the key between '0' and 'Enter' on the key pad is mapped to KP_Separator. Since X11 VOs accept unicode input, the mplayer keycode this key generates depended on the numlock state, and with numlock enabled this mapped to an ASCII character. This is probably not what the user wanted, since two physical keys will always map to the same key code. Map it to KP_DEC.
| * x11: allow unicode inputwm42012-03-251-29/+46
| | | | | | | | | | | | | | | | | | 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: fix setting UTF-8 window titles for some special caseswm42012-03-251-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the WM_NAME/WM_ICON_NAME window properties didn't always work: apparently there are some characters that can't be represented in the X STRING or COMPOUND_TEXT encodings, such as U+2013 EN DASH. The function Xutf8TextListToTextProperty partially converts the string, and returns a value different from 'Success'. This means vo_x11_set_property_string didn't set these window properties. On most modern window managers, this is not a problem, since these use the _NET_WM_NAME/_NET_ICON_NAME and the UTF8_STRING encoding. Some older WMs like IceWM don't read these, and the window title remains blank. It's not clear what exactly we should do in this situation, but fix it by setting set the WM_NAME/WM_ICON_NAME properties as UTF8_TEXT. This violates the ICCCM, but at least IceWM seems to handle this well. See also: http://lists.freedesktop.org/archives/xorg/2004-September/003391.html http://lists.freedesktop.org/archives/xorg/2004-September/003395.html
* | x11: fix crash when using switch_video (broken by UTF-8 input changes)wm42012-02-241-0/+1
| |
* | x11: fix setting UTF-8 window titles for some special caseswm42012-01-251-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the WM_NAME/WM_ICON_NAME window properties didn't always work: apparently there are some characters that can't be represented in the X STRING or COMPOUND_TEXT encodings, such as U+2013 EN DASH. The function Xutf8TextListToTextProperty partially converts the string, and returns a value different from 'Success'. This means vo_x11_set_property_string didn't set these window properties. On most modern window managers, this is not a problem, since these use the _NET_WM_NAME/_NET_ICON_NAME and the UTF8_STRING encoding. Some older WMs like IceWM don't read these, and the window title remains blank. It's not clear what exactly we should do in this situation, but fix it by setting set the WM_NAME/WM_ICON_NAME properties as UTF8_TEXT. This violates the ICCCM, but at least IceWM seems to handle this well. See also: http://lists.freedesktop.org/archives/xorg/2004-September/003391.html http://lists.freedesktop.org/archives/xorg/2004-September/003395.html Also fix a minor memory leak when conversion to COMPOUND_TEXT fails.
* | Merge branch 'utf8_input' into my_masterwm42012-01-181-49/+66
|\ \
| * | x11: remove wskeys.hwm42012-01-181-21/+20
| | | | | | | | | | | | | | | Use the <X11/keysymdef.h> xlib header instead. I'm not sure why mplayer defined these constants itself.
| * | x11: add print and menu keyswm42012-01-181-0/+1
| | |
| * | x11: add KP_Separator to key mappingwm42012-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least on some keyboards, the key between '0' and 'Enter' on the key pad is mapped to KP_Separator. Since X11 VOs accept unicode input, the mplayer keycode this key generates depended on the numlock state, and with numlock enabled this mapped to an ASCII character. This is probably not what the user wanted, since two physical keys will always map to the same key code. Map it to KP_DEC.
| * | x11: allow unicode inputwm42012-01-181-29/+45
| |/ | | | | | | | | | | | | | | | | 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: simplify setting unicode text propertieswm42012-01-181-22/+6
|/
* libvo: change default window title to "mplayer2"wm42011-12-061-1/+1
| | | | | Also change the WM_CLASS "application class" string from "MPlayer" to "mplayer2". This string is visible as application name in Gnome 3.
* x11: set window titles as UTF-8wm42011-12-061-3/+55
| | | | | | | | | | | | | | 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-7/+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: X key input: remove ambiguous KeySym remappingUoti Urpala2011-07-291-6/+1
| | | | | | | | | | | | Code mapping X keyboard events to internal player key names remapped the incoming KeySym values in a way that only kept information about the lowest byte of the value and whether or not the value was below 256. This caused collisions between values. Remove this obviously broken mapping and use the raw KeySym values instead. I'm not familiar enough with X key handling to tell whether there was any valid motivation whatsoever for the mapping, but the implementation was certainly broken; if something else breaks it'll have to be fixed later.
* Merge branch 'mplayer1_changes'Uoti Urpala2011-07-061-4/+4
|\
| * VO: support Pause/Break key in X11 inputdiego2011-07-061-1/+2
| | | | | | | | | | | | | | Allow Pause/Break key to be bound as MPlayer input key under X11. patch by Steaphan Greene, sgreene cs.binghamton edu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33609 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cleanup: x11_common: remove pointless GC operationsiive2011-07-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove useless XSetBackground() call right before freeing the graphic context. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33524 b3059339-0415-0410-9bf9-f77b7e298cf2 Create empty vo_gc graphic context instead of one with undefined foreground color. The code that uses vo_gc already employs XSetForeground()/XSetBackground() to change the context accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33525 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo: avoid losing initial expose eventUoti Urpala2011-07-061-3/+2
| | | | | | | | | | | | | | | | | | The x11_common.c window creation code could lose the initial expose event due to input mask changes. This meant that the window might not be cleared at start (there's a vo_x11_clearwindow() call but it may do nothing if it runs before the window is mapped). Modify the code to avoid losing the expose event. Handling that event should ensure the window is cleared and otherwise set up properly.
* | vo_xv: avoid clearing too much on resizeUoti Urpala2011-07-061-29/+3
|/ | | | | | | | | | | | | 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).
* input: move all key code lists to input/keycodes.hUoti Urpala2011-05-021-2/+1
| | | | | | | | | | | | | Move the definitions of all special key codes (those not passed by ASCII value) to input/keycodes.h. Before they were spread between osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus some special values in input.h. This was especially inconvenient as the codes had to be coordinated to not conflict between the files. The change requires a bit of ugliness as appleir.c includes <linux/input.h> which contains various conflicting KEY_* definitions. Work around this by adding a special preprocessor variable which can be used to avoid defining these in keycodes.h.
* cleanup: avoid various GCC warningsClément Bœsch2011-04-201-6/+5
|
* VO: don't wait for map event in X VO initializationUoti Urpala2011-04-081-4/+0
| | | | | | | | | | | After creating a video window the common X code waited for a MapNotify event before proceeding. This meant that if the window was opened on another workspace the player would be stuck until the user switched to that workspace and the window could become actually visible. Remove this waiting code. I don't know why it was there or if it was actually beneficial/needed for some setup (at least common uses seem to work fine without it); it comes from the earliest MPlayer versions visible in VCS history.
* x11_common: fix for reconfig with pos/xineramascreen setUoti Urpala2011-02-031-7/+7
| | | | | | | | | | | | | 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-6/+15
| | | | | | | | | | | | | | | | | | | | | 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.
* libvo: register X11 connection fd in input event systemUoti Urpala2010-12-141-0/+1
| | | | | | | | | | | | | | Register the X11 connection fd in the input system so that mp_input_get_cmd() can immediately wake up and handle keyboard or other X events. The callback calls vo_check_events() and tells the input system to handle any input possibly recorded during that. Before this was done for vo_xv only; this commit generalizes it to all VOs that call vo_x11_create_vo_window() - those are hopefully ones that will handle all X events in check_events(). The callback is only kept registered while the vo is properly configured. At other times calling check_events() would not clear pending input and so could lead to a busy loop.
* options: move -name and -title to option structClément Bœsch2010-11-041-3/+5
|
* x11_common: add VO_EVENT_MOVEreimar2010-11-021-2/+6
| | | | | | | | | Add VO_EVENT_MOVE which is required for VOs that interact directly with hardware like MGA and VIDIX. Patch by Dirk Porezag [porezag yahoo com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32454 b3059339-0415-0410-9bf9-f77b7e298cf2
* spelling fixessiretart2010-11-021-1/+1
| | | | | | | | | | Found by the Debian QA tool 'lintian' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2 reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
* x11_common: Get window dimensions also for -wid 0reimar2010-11-021-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31623 b3059339-0415-0410-9bf9-f77b7e298cf2
* x11_common.c: minor cleanupreimar2010-11-021-3/+1
| | | | | | | | | | Remove some commented-out code that has no purpose and is only confusing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31620 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove useless () git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31621 b3059339-0415-0410-9bf9-f77b7e298cf2
* x11_common.c: Some indentation fixesreimar2010-11-021-10/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31602 b3059339-0415-0410-9bf9-f77b7e298cf2
* x11_common: Do not try to grab input from -wid windowsreimar2010-11-021-8/+21
| | | | | | | | | | | | | | | | | It will most likely break their input processing. If someone needs the previous behaviour, an option could be added (and also used in the w32_common.c code). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31601 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix resizing with -wid after previous commit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31604 b3059339-0415-0410-9bf9-f77b7e298cf2 Always request expose events, we have to handle them, the application that created the -wid window can't. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31605 b3059339-0415-0410-9bf9-f77b7e298cf2
* x11_common: Consistently use "None" instead of "NULL" for X resourcesreimar2010-11-021-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31422 b3059339-0415-0410-9bf9-f77b7e298cf2
* vo: improve fixed-vo behavior when video size changes in x11 VOsUoti Urpala2010-07-231-0/+14
| | | | | | | | | 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 r31291Uoti Urpala2010-06-021-1/+5
|\
| * Change code to let Window Manager chose window location by default.reimar2010-05-301-1/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31289 b3059339-0415-0410-9bf9-f77b7e298cf2