summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* libvo, libao: remove useless video and audio output driverswm42012-07-2841-17445/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* build: remove bin_to_header.py and use TOOLS/file2string.py insteadwm42012-07-281-1/+3
| | | | | | TOOLS/file2string.py was recently added upstream, so bin_to_header.py is not needed anymore. Also fix vo_gl3.c, since file2string.py works slightly different from my script.
* Merge remote-tracking branch 'origin/master'wm42012-07-289-188/+151
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_sharedbuffer: remove from autoprobe listStefano Pigozzi2012-07-271-3/+3
| | | | | | | | | | | | This video output is headless and only intended to work with GUIs explicitly asking for it. This makes it useless to have it in the autoprobe list.
| * vo_corevideo, vo_sharedbuffer: put private state in vo->privStefano Pigozzi2012-07-272-81/+77
| | | | | | | | | | | | | | These VOs were already using a struct for all private data but the struct variable itself was static. Change them to store the address in vo->priv. Also change them to use the new automatic private data allocation and option parsing mechanism.
| * vo_vdpau: disable refresh-aware frame timing when compositedUoti Urpala2012-07-273-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * vo_vdpau: fix possible crash after preemptionUoti Urpala2012-07-161-3/+5
| | | | | | | | | | | | | | | | | | | | Preemption recovery code could change the vc->vdp pointer when recreating the VDPAU device. However, some other code cached the value of vc->vdp in local variables over calls to handle_preemption(), and could then crash when using the stale value later. Make the device creation code keep the same vc->vdp instead of freeing and reallocating it, so that the old pointer value is never invalidated now.
| * build: use python3 to generate some files previously in gitUoti Urpala2012-07-161-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | Some files used during build are generated with Python scripts in TOOLS/. Before, the generated files were included in the git tree. Start creating them at build time. This introduces a build-dependency on python3. The files in question are: libvo/vdpau_template.c libmpdemux/ebml_types.h libmpdemux/ebml_defs.c
| * VO: implement shared option handling, use for vdpauUoti Urpala2012-07-163-58/+50
| | | | | | | | | | | | | | | | Add infrastructure that allows VOs to specify the suboptions they take, and get the values directly parsed into their private struct. The option functionality available with the new system is the same as for top-level player options. Convert vo_vdpau to use the new system instead of the old subopt_helper.
* | 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
<