summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
Commit message (Collapse)AuthorAgeFilesLines
* libvo, libao: remove useless video and audio output driverswm42012-07-281-1/+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.
* 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.
* Merge remote-tracking branch 'wm4/window_title'Uoti Urpala2011-12-071-3/+2
|\
| * libvo: remove title argument from struct vo_driver.configwm42011-12-061-3/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | core, vo: new window refresh logic, add slow-video OSD redrawUoti Urpala2011-12-061-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove code refreshing window contents after events such as resize from vo_vdpau, vo_gl and vo_xv. Instead have them simply set a flag indicating that a refresh is needed, and have the player core perform that refresh by doing an OSD redraw. Also add support for updating the OSD contents over existing frames during slow-but-not-paused playback. The VOs now also request a refresh if parameters affecting the picture change (equalizer settings, colormatrix, VDPAU deinterlacing setting). Even previously the picture was typically redrawn with the new settings while paused because new OSD messages associated with setting changes triggered a redraw, but this did not happen if OSD was turned off. A minor imperfection is that now window system events can trigger a single one-frame step forward when using vo_xv after pausing so that vo_xv does not yet have a copy of the current image. This could be fixed but I think it's not important enough to bother.
* | core, vo: modify OSD redraw architecture, support EOSDUoti Urpala2011-12-061-29/+17
|/ | | | | | | | | | | | | | | | Previously the core sent VFCTRL_REDRAW_OSD to change OSD contents over the current frame. Change this to VFCTRL_REDRAW_FRAME followed by normal EOSD and OSD drawing calls, then vo_flip_page(). The new version supports changing EOSD contents for libass-rendered subtitles and simplifies the redraw support code needed per VO. vo_xv doesn't support EOSD changes because it relies on vf_ass to render EOSD contents earlier in the filter chain. vo_xv logic is additionally simplified because the previous commit removed the need to track the status of current and next images separately (now each frame is guaranteed to become "visible" soon after we receive it as "next", with no VO code running in the interval between).
* vo_xv: implement screenshotswm42011-11-251-0/+51
| | | | | | | | | | | | | Caveat: the OSD will be included in the screenshots when the screenshot is taken during normal playback. This doesn't happen when a screenshot is taken while playback is paused. Fixing this would introduce a small performance reduction during normal playback, which is unacceptable for a possibly rarely used optional feature. Due to the nature of the Xv API, taking a screenshot of the scaled video isn't possible either.
* video, options: implement better YUV->RGB conversion controlwm42011-10-161-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite control of the colorspace and input/output level parameters used in YUV-RGB conversions, replacing VO-specific suboptions with new common options and adding configuration support to more cases. Add new option --colormatrix which selects the colorspace the original video is assumed to have in YUV->RGB conversions. The default behavior changes from assuming BT.601 to colorspace autoselection between BT.601 and BT.709 using a simple heuristic based on video size. Add new options --colormatrix-input-range and --colormatrix-output-range which select input YUV and output RGB range. Disable the previously existing VO-specific colorspace and level conversion suboptions in vo_gl and vo_vdpau. Remove the "yuv_colorspace" property and replace it with one named "colormatrix" and semantics matching the new option. Add new properties matching the options for level conversion. Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv and vf_scale, and all can change it at runtime (previously only vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion matrix generation as vo_gl instead of libvdpau functionality; the main functional difference is that the "contrast" equalizer control behaves somewhat differently (it scales the Y component around 1/2 instead of around 0, so that contrast 0 makes the image gray rather than black). vo_xv does not support level conversion. vf_scale supports range setting for input, but always outputs full-range RGB. The value of the slave properties is the policy setting used for conversions. This means they can be set to any value regardless of whether the current VO supports that value or whether there currently even is any video. Possibly separate properties could be added to query the conversion actually used at the moment, if any. Because the colorspace and level settings are now set with a single VF/VO control call, the return value of that is no longer used to signal whether all the settings are actually supported. Instead code should set all the details it can support, and ignore the rest. The core will use GET_YUV_COLORSPACE to check which colorspace details have been set and which not. In other words, the return value for SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace conversion handling exists at all, and VOs have to take care to return the actual state with GET_YUV_COLORSPACE instead. To be changed in later commits: add missing option documentation.
* Merge branch 'mplayer1_changes'Uoti Urpala2011-07-061-4/+5
|\
| * vo_xv: avoid setting background color due to resize flickeriive2011-07-061-4/+5
| | | | | | | | | | | | | | | | | | Set background color only when using ck-method=background. In the other cases clearing of the non-video image area should be done manually. Not drawing on the video image area prevents flickering (visible when resizing). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33522 b3059339-0415-0410-9bf9-f77b7e298cf2
* | 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: shut up more warningsClément Bœsch2011-05-061-2/+2
|
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
|
* libvo: register X11 connection fd in input event systemUoti Urpala2010-12-141-16/+0
| | | | | | | | | | | | | | 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.
* Merge svn changes up to r31303Uoti Urpala2010-06-021-6/+14
|\
| * Factor out some common code and ensure we will not try to draw OSDreimar2010-05-311-3/+12
| | | | | | | | | | | | | | elements outside the streams and thus crash. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31297 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Restore collapsed whitespace in output messagesUoti Urpala2010-03-071-1/+1
| | | | | | | | | | | | | | | | | | For some reason commit e306174952d42e1cd6cc5efc50ae6bb0410501bc, which replaced translation macro names with the corresponding English strings, also collapsed multiple consecutive space characters into one. Change most of these back. In a couple of cases the amount of whitespace is important for alignment, and for the rest it at least keeps the strings closer to the existing translations.
* | Merge svn changes up to r30165Uoti Urpala2010-01-081-7/+8
|\|
| * Fix function declarations to avoid casting function pointers.reimar2010-01-011-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30164 b3059339-0415-0410-9bf9-f77b7e298cf2
* | cosmetics: remove some unused variablesUoti Urpala2009-11-171-2/+0
| |
* | Add yuv_colorspace property, implemented in vo_vdpau and vo_xvUoti Urpala2009-11-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a property to select YUV colorspace. Currently implemented only in vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and SMPTE-240M (vdpau only). The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA card supports that; I don't know whether other xv implementations do. Bind the colorspace switch to the 'c' key by default. 'c' is currently used by vo_sdl for some fullscreen mode change thing, but at the moment that does not conflict and if it will in the future then vo_sdl can change. VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
* | cosmetics: Add two missing "static"Uoti Urpala2009-10-221-1/+1
| | | | | | | | Add missing 'static' to internal functions in vo_xv.c and vo_vdpau.c.
* | Merge branch 'vdpau' into buildUoti Urpala2009-09-191-6/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vdpau: (22 commits) VO: Prefer vo_vdpau over vo_xv again vo_vdpau: Fix X event handling bugs vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED core/VO: Allow VO drivers to add/modify frames video_out.h: Cosmetics VO interface: Remove obsolete draw_frame() from new interface vo_vdpau: Support recovering from VDPAU display preemption vo_vdpau: Support updating OSD while paused vo_vdpau.c: Reindent control() switch statement vo_vdpau: Allocate one large surface for EOSD content vo_vdpau.c: cosmetics vo_vdpau: reindent after GUI code removal vo_vpdau: Clean up uninit logic vo_vdpau: Make CHECK_ST macro safer vo_vdpau: Move all remaining static/global variables to context vo_vdpau: Move things to context struct vo_vdpau: Make info struct const vo_vdpau: Replace global function table with context variable vo_vdpau: Move VDPAU interface pointers into one struct vo_vdpau: Add template file for VDPAU functions ...
| * | VO interface: Remove obsolete draw_frame() from new interfaceUoti Urpala2009-09-171-6/+0
| | |
* | | Merge svn changes up to r29644Uoti Urpala2009-09-041-13/+1
|\ \ \ | |/ / |/| / | |/
| * Remove panscan related conditions and code that only breaks future windowedreimar2009-08-271-14/+0
| | | | | | | | | | | | | | aspect and panscan without any real benefit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29568 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove the internal GUIAnton Khirnov2009-07-071-11/+0
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-8/+16
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-8/+8
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Merge branch 'ordered_chapters'Uoti Urpala2009-04-081-1/+0
|\ \
| * | VO: Don't reset pause status in VO config() functionsUoti Urpala2009-04-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Many VOs kept track of pause status, but reset the value when their config() function was called. However it can be called while playback stays in pause mode. Modify the VOs to not change anything in config(). Also send the VO either VOCTRL_PAUSE or VOCTRL_RESUME when the playback of a new file is starting to make sure they have the right status.
* | | vo_xv: Fix context Shminfo table sizeUoti Urpala2009-04-051-1/+1
|/ / | | | | | | | | This bug could cause problems if you used -dr with xv. The most likely symptom was crash at uninit.
* | Merge svn changes up to r28951Uoti Urpala2009-03-141-3/+1
|\|
| * Setting vo_fs is handled by x11_common.c, so remove that code from ↵reimar2009-03-071-2/+0
| | | | | | | | | | | | vo_xv/vo_xvmc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28864 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make data related to suboption parsing const in libvoreimar2009-03-071-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28863 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28641Uoti Urpala2009-02-181-1/+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.
| * Extend calc_src_dst_rects to also calculate the border values needed forreimar2009-02-171-1/+1
| | | | | | | | | | | | | | correctly placed dvdnav highlights, and fix direct3d and vdpau accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28633 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28549Uoti Urpala2009-02-131-36/+24
|\|
| * Add a calc_src_dst_rects that calculates from window size, panscan etc.reimar2009-02-121-36/+18
| | | | | | | | | | | | | | | | | | which part of the video source must be scaled onto which part of the window. Direct3D and (future) VDPAU need this, for XvMC it makes it easier to add cropping support and Xv is changed to keep the diff to XvMC small. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28546 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28537Uoti Urpala2009-02-121-1/+19
|\|
| * Add standard license headers, unify header formatting.diego2009-02-081-1/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28481 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-151-20/+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-18/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28285 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify handling of VOFLAG_MODESWITCHNG, merge assignment and declarationreimar2008-11-231-5/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27986 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused flip_flag variablereimar2008-11-231-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27985 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo_xv: Always support updating OSD if none was drawn yetUoti Urpala2008-12-101-4/