summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* cocoa: return the real CGLPixelFormatObjStefano Pigozzi2012-05-151-1/+1
| | | | | vo_cocoa_cgl_pixel_format is returning a cached CGLPixelFormatObj. Return the current one by querying the OpenGL context.
* cocoa: don't request a depth buffer sizeStefano Pigozzi2012-05-151-2/+0
|
* cocoa: gl3: make window creation fail on <10.7Stefano Pigozzi2012-05-151-0/+5
| | | | | Versions of OSX prior to 10.7 do not support OpenGL 3. Fail the window creation when that is the case.
* cocoa: gl3: support querying of colors bit depthStefano Pigozzi2012-05-153-0/+21
| | | | | Add support for querying the bit depth of the colors from the OpenGL context. This allows to perform dithering correctly.
* cocoa: handle failure on pixel format creationStefano Pigozzi2012-05-141-0/+6
| | | | | | | | This didn't make any difference on with OpenGL 2.1, but with the introduction of OpenGL3.2 it's possible for the pixel format creation to fail (if OpenGL3.2 is not supported). This code handles the failure case accordingly.
* screenshot, vo_png: fix dependency on sizeof(AVFrame)wm42012-04-291-4/+11
| | | | | | | | | In order to stay binary compatible with libavcodec, applications should not dependent on sizeof(AVFrame). This means allocating AVFrame on the stack is not allowed, and the function avcodec_alloc_frame() must be used to allocate an AVFrame instead. Partially based on a patch by uau.
* Merge remote-tracking branch 'origin/master'wm42012-04-299-1058/+723
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h libvo/cocoa_common.m libvo/gl_common.c libvo/video_out.c mplayer.c screenshot.c sub/subassconvert.c Merge of cocoa_common.m done by pigoz. Picking my version of screenshot.c. The fix in commit aadf1002f8a will be redone in a follow-up commit, as the original commit causes too many conflicts with the work done locally in this branch, and other work in progress.
| * cocoa_common: fix problems with alt-tab window changesStefano Pigozzi2012-04-261-4/+5
| | | | | | | | | | | | | | | | | | | | Fix alt tabbing to another window in the same workspace. The player window stayed on top because of a missing call to orderBack:. Fix alt tabbing to the player window from a different workspace. The window didn't get activated. Turns out that you must call makeKeyAndOrderFront: before setLevel: or setPresentationOptions: or the window will not properly ask for focus.
| * cocoa_common, gl_common: add OSX specific getProcAddressStefano Pigozzi2012-04-263-1/+17
| | | | | | | | | | | | | | | | Run dlopen on the OpenGL dynamic library instead of on the binary. This should prevent crashes due to function conflicts when X11/lGL is linked. Remove mutual exclusion of the X11 and Cocoa backends.
| * OSX, input: implement wakeup in response to Cocoa eventsStefano Pigozzi2012-04-262-0/+8
| | | | | | | | | | | | | | | | | | Add code to wake up the select() call in input.c when an OSX event is available and a Cocoa OpenGL backend is initialized. Fixes the slow response to input or other events in Cocoa-based VOs during long select() sleeps (e.g., when mplayer2 is paused) introduced by commit 7040968.
| * vo_sharedbuffer: add this video outputStefano Pigozzi2012-04-263-0/+318
| | | | | | | | | | | | | | | | | | | | This OSX video output is replaces the previous shared_buffer mode of vo_corevideo. It manages a shared buffer and a Cocoa distributed object to communicate with GUIs. Splitting this code into a separate VO allows to get rid of harmful code coupling, performance inefficiencies (useless image memory copies) and ugly code (big if-else conditionals).
| * vo_corevideo: restructure this video outputStefano Pigozzi2012-04-265-352/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure this video output to be similar to vo_gl, even if simpler and less feature complete (for example it's still missing EOSD support). Ideally, it should act as a decent fallback in the case where something breaks in the OSX support of vo_gl. Here's a summary of what changed: * Remove the shared buffer code since it wasn't using any function from the CoreVideo API. Moreover, its presence in vo_corevideo was forcing the non-GUI related code to perform more image copies than necessary. Equivalent shared-buffer functionality will be added in a separate new VO in the next commit (this means OSX GUIs will need to specify a different VO). * Clean up the code to conform a bit more to the mplayer2 conventions. Enforce 80 column wrapping, use a private struct for file variables, use the new libvo api. * Add OSD rendering using OpenGL instead of writing directly on the video image data. * Simplify the logic for the rendering function when dealing with panscan. * Add VOCTRL_REDRAW_FRAME support. * Add colormatrix support by using the built-in API provided by CoreVideo.
| * vo_corevideo: use cocoa_common to display the windowStefano Pigozzi2012-04-264-838/+166
| | | | | | | | | | | | | | Change vo_corevideo to use cocoa_common to create and manage the window. This doesn't affect external OSX GUIs, since they don't use vo_corevideo window management, but only read the image data from the shared buffer.
| * vo_corevideo: use soft tabs (4 spaces)Stefano Pigozzi2012-04-261-684/+684
| |
* | vo_directx: clear panscan borders in windowed modewm42012-04-241-5/+32
| | | | | | | | | | | | | | | | The window size is normally clipped against desktop size due to the usage of WM_SIZING in w32_common.c. This is a useful (if accidental) feature, but vo_directx didn't handle it well: the areas not covered by video were filled with the colorkey, which looked ugly. Explicitly clear these borders with black.
* | vo_gl: reject MS Windows native OpenGL as software rasterizerwm42012-04-241-1/+3
| | | | | | | | | | | | | | | | If the graphics driver doesn't provide its own OpenGL implementation, applications get Microsoft's OpenGL emulation. Even if it should be the case that it's not strictly a software renderer, it provides OpenGL 1.1 only, no shaders in any form, and has other limitations that make it almost completely useless for mplayer.
* | vo_gl: refuse to use software renderer, unless explicitly requestedwm42012-04-242-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vo_gl will now fail at initialization if a software renderer is detected. This is the same behavior as vo_gl_nosw. Making this the default behavior is preferable, because it will simplify positioning vo_gl in the VO autoprobe list (video_out_drivers[]). Also, vo_gl_nosw exists only if X11 support is configured. Move gl in place of gl_nosw. Add the "sw" suboption to vo_gl to allow using vo_gl even if a software renderer is detected. vo_gl_nosw is now completely equivalent to vo_gl. It is kept in order not to break too many user configurations, but should be considered deprecated.
* | win32: don't crash if vo_w32_uninit() is called without vo_w32_init()wm42012-04-241-0/+2
| | | | | | | | | | This is a recent regression. At least vo_direct3d uses vo_w32_uninit() in this way, and crashed if initialization failed at an early point.
* | gl_common: do not call glXGetClientString() and glXGetServerString()wm42012-04-161-34/+12
| | | | | | | | | | | | | | | | | | | | Only call glXGetClientString(), which contains all supported GLX extensions. Extensions only returned by glXGetClientString() or glXGetServerString() are not necessarily actually supported. This essentially reverts svn commit 29721 (git fe3b9a88ce62ab). It is not known whether this commit actually fixed anything, such as working around a broken OpenGL driver.
* | win32: fix handling of AltGrwm42012-04-141-0/+5
| | | | | | | | | | | | | | Windows implicitly enables Ctrl+Alt on AltGr. These modifiers are unwanted for keys that have special mappings on AltGr. Add warning about different behavior on wine.
* | win32: simplify icon loadingwm42012-04-141-6/+1
| | | | | | | | | | I have no idea why the code used this roundabout method. Also detab mplayer.rc.
* | win32: move global variables into a struct & some refactoringwm42012-04-146-321/+345
| | | | | | | | | | | | | | | | | | | | This reflects the changes done to x11_common in mplayer2 some years ago. It makes it possible to open multiple VOs at once. The removed defines are probably for ancient versions of MinGW with incomplete headers. Remove some minor code duplication.
* | win32: use GetKeyState() instead of maintaining the state manuallywm42012-04-141-16/+9
| |
* | Merge remote-tracking branch 'origin/master'wm42012-04-131-1090/+0
|\| | | | | | | | | Conflicts: libvo/vo_kva.c
| * build: remove OS/2 supportUoti Urpala2012-04-061-1090/+0
| |
* | win32: prevent modifier keys from getting stuckwm42012-04-131-0/+5
| | | | | | | | | | | | Especially Alt would get stuck when using Alt+Tab to change focus. Apparently Windows doesn't send an appropriate key up message. Solve this by resetting the modifier state on focus change.
* | win32: make F10 key not enter the window menuwm42012-04-071-0/+2
| | | | | | | | | | | | | | | | | | | | Normally, F10 enters the window menu (it's invisible at first, and the blocking/recursive message handling by Windows makes it look like mplayer was paused, without much visual indication). Stop this almost completely useless behavior by signalling Windows that the F10 key was handled. This makes the F10 key usable as normal mplayer shortcut. This is probably still somewhat questionable.
* | win32: fix behavior of enter keywm42012-04-071-5/+11
| | | | | | | | | | | | | | | | | | | | | | Windows sends the same character code on CTRL+Enter and CTRL+J. I'm not sure what's the proper way to deal with this, but the hack added with this commit seems to work fine. Just to be sure, don't forward the modified wParam to DefWindowProc. Add the missing "break;" in the switch statement, which sometimes produced bogus mouse button events. Fix the F12 key, which wasn't mapped correctly due to a typo.
* | vo_directx: do not do aspect scaling in windowed mode.reimar2012-04-061-4/+6
| | | | | | | | | | | | This matches behaviour of other vos. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34840 b3059339-0415-0410-9bf9-f77b7e298cf2
* | win32: use more unicode functionswm42012-04-061-38/+24
| | | | | | | | | | | | | | | | Use the *W variants instead of the implicit *A functions. (One could define the UNICODE macro to switch the functions without suffix from A to W, but I'm too lazy to figure out how portable that is, etc.) Also make sure io.h defines a unicode aware printf().
* | win32: support key modifiers (shift, ctrl, alt)wm42012-04-061-13/+45
| | | | | | | | | | | | | | | | | | | | Support for this is rather simple, and some combinations of modifiers and keys don't work. For example, Ctrl+Alt+character is not supported, because Windows doesn't emit a WM_CHAR in this case. Also add support for the pause and print screen keys. Remove the pointless KEY_CTRL translation. Remove KEY_CTRL altogether, because it was not clear what it was actually supposed to mean.
* | Merge remote-tracking branch 'origin/master'wm42012-04-019-1517/+165
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * cocoa_common: update screen info before entering fullscreenStefano Pigozzi2012-03-251-0/+1
| | | | | | | | | | | | If the user moved the window to another screen, fullscreen mode would still use the original screen. Fix to use the screen the window is currently on (unless overridden by --xineramascreen).
| * VO: move gl+cocoa before corevideo in default VO orderStefano Pigozzi2012-03-251-1/+4
| | | | | | | | | | | | | | | | | | The gl video output is faster and has more features than corevideo, so it should be preferred on mac osx. This doesn't affect GUI compatibility because they specify the corevideo video output along with the suboptions for the shared buffer name to mmap in.
| * cocoa_common: add license informationStefano Pigozzi2012-03-252-0/+38
| |
| * vo_quartz: remove this video outputStefano Pigozzi2012-03-252-1375/+0
| | | | | | | | | | | | | | | | | | This video output is not useful anymore. It is based on Carbon to draw the mplayer window and this has been deprecated by Apple in 10.5. The upcoming 10.8 OSX release should deprecate most of Carbon, so it doesn't make sense to keep vo_quartz in the codebase when there are modern and better alternatives (vo_gl and vo_corevideo).
| * cocoa_common: fix double click handlingStefano Pigozzi2012-03-251-8/+8
| | | | | | | | | | | | | | The Cocoa framework generates only a NS*MouseDown event when handling the second click of a double click (no NS*MouseUp). If that's the case put mouse up key in mplayer2's fifo when dealing with the MouseDown Cocoa event.
| * cocoa_common: accept window drag event from the whole window surfaceStefano Pigozzi2012-03-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Change the window to accept mouse drag events not only on the title bar, but also on the rest of the window surface; this includes the video area. It looks like the changing of the window mask resets the behaviour specified in the delegate method, probably due to some strange interaction with NSBorderlessWindow. For this reason call -setPresentationOptions in the -fullscreen method to remind cocoa the behaviour we want.
| * options, x11+cocoa: add option --cursor-autohide-delayStefano Pigozzi2012-03-253-16/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-107/+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-252-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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-252-29/+49
| | | | | | | | | | | | | | | | | | 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
| * vo_gl: cocoa: add support for --ontopStefano Pigozzi2012-03-253-4/+33
| | | | | | | | | | Make the cocoa backend change the non-fullscreen window level according to the value of the ontop property.
| * vo_xv: remove direct rendering supportUoti Urpala2012-03-251-111/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Direct rendering support in vo_xv (used with --dr) had at least two problems. First, OSD drawing modified the buffers; this meant that if the buffers were used for reference frames there would be video corruption. I don't think "performance optimization" with this level of drawbacks is appropriate with today's machines any more. Direct rendering could still be used for non-reference frames, but there's a second problem: with direct rendering enabled the same buffer is used for every frame, and with the XShm extension that is used by default there's no checking that the previous frame has been completely uploaded to the graphics card before it's overwritten by the next one. This could be fixed, but as Xv is becoming obsolete I don't see it as a priority to improve it. Thus I'm simply removing the parts of functionality that were more likely to break things than improve playback.
| * cosmetics: misc minor clean