summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* gl_common: allow compilation on Mac OS 10.6Stefano Pigozzi2012-10-072-1/+18
| | | | | Define just enough constants to allow compilation on OS X Snow Leopard. mpv's OpenGL autodetection features should make the rest.
* vo_opengl: don't try to map an empty bufferwm42012-10-031-1/+1
| | | | | | | | The change detection signalled a full re-upload on initialization, but no texture reallocation. Binding the uninitialized buffer caused an OpenGL error. Fixes error messages on start with "opengl-hq".
* vo_opengl: change default FBO formatwm42012-10-031-1/+1
| | | | | | | | | GL_RGB16 doesn't seem to work universally (e.g. Intel). Use GL_RGB by default, and use GL_RGB16 for "opengl-hq" only. This may require users of Intel GPUs to manually experiment with the fbo-format suboption when using "opengl-hq", as GL_RGB16 doesn't seem to work there in some cases (black screen).
* vo_opengl: use PBOs by default with opengl-hqwm42012-10-031-1/+1
| | | | | | | | | | It's not really known whether PBO use causes problems of any kind (most likely not). They should slightly increase performance. Use them by default with "opengl-hq". Even though PBOs don't have anything to do with rendering quality, "opengl-hq" provides a test bed for features that should be enabled by default, but aren't out of fear for regressions.
* vo_opengl: use low quality default settings, add opengl-hq aliaswm42012-10-032-7/+31
| | | | | | | | Change the default settings for vo_opengl to highest performance and compatibility, but lowest quality. Use bilinear as default scaler. Add "opengl-hq" as alias for high quality settings. This alias uses exactly the same settings as vo_opengl did before this commit.
* VO: add mechanism to replace old VO names, use it with "gl" and "gl3"wm42012-10-032-37/+24
| | | | | Rather than duplicating the VO driver structs to add aliases, replace them textually when searching for the VO on initialization.
* vo_opengl: always check GL errors in first 5 frameswm42012-10-031-1/+5
| | | | | | | | | | | | Normally, we don't want to call glGetError() all the time, because this supposedly causes slowdowns. (I could not measure any on Linux with nVidia binary drivers; maybe it's due to the fact that we have only a few, expensive calls per frame.) However, having to ask users to add the "debug" suboption when trying to diagnose problems is very annoying. Since most errors happen during initialization only, enabling it for the first 5 frames only is an interesting compromise.
* VO: actually rename VOs gl -> opengl-old, gl3 -> openglwm42012-10-033-39/+35
| | | | | | | | | | | | | This renames vo_gl3 to vo_opengl, and makes it the default. The old vo_gl is still available under "opengl-old". We keep "gl3" as alias to "opengl" for short-term compatibility. For OSX/Cocoa, the autoprobe order changes (prefer the "opengl" over "opengl-old"). Remove "gl_nosw". This was a compatibility alias for "opengl-old", and there's no point in keeping it.
* VO: rename file: vo_gl3_shaders.glsl -> vo_opengl_shaders.glslwm42012-10-032-2/+2
|
* VO: rename file: vo_gl3.c -> vo_opengl.cwm42012-10-031-0/+0
|
* VO: rename file: vo_gl.c -> vo_opengl_old.cwm42012-10-031-0/+0
|
* gl_common: require GLX 1.3 for vo_gl, remove old pre-1.3 codewm42012-10-031-123/+91
| | | | | | Now both GL3 (for vo_gl3) and legacy context context creation (for vo_gl) use the same code to create the X window. Only actual GL context creation is different.
* vo_gl3: make it work on OpenGL 2.1wm42012-10-037-642/+956
| | | | | | | | | | | | | | | | | | | | Now vo_gl3 should work with standard OpenGL 2.1, as long as the GL_ARB_texture_rg extension is available. Optional features, which require features that are always in OpenGL 3.0, but are available as extensions only in OpenGL 2.1, are automatically disabled. The force-gl2 suboption, which was an unreliable hack to run vo_gl3 in an OpenGL 2.1 context, is removed. Significant changes are done to the extension loader to make it easier to identify optional OpenGL features. Context creation is a bit changed to simplify the code and to handle the fallback better if OpenGL 3 context creation fails, and creating an OpenGL legacy context is attempted. Based on the initial work by Rudolf Polzer <divverent@xonotic.org>, which included making the shader GLSL 1.20 compatible, and more.
* encode: fix -ocopyts with certain DVD imagesRudolf Polzer2012-09-291-56/+50
| | | | | | When timestamps jump by more than 30 seconds, assume an unexpected discontinuity. Fixes encoding aborts (i.e. no more frames written) at DVD cell switches.
* cocoa_common: make fullscreen menubar/dock hiding conditionalStefano Pigozzi2012-09-181-1/+9
| | | | | | | | | | cocoa_common was hiding the dock and menubar unconditionally when going fullscreen. This means they were hidden even if they weren't on the screen mplayer2 was going fullscreen on, resulting in poor user experience. Change the fullscreen function in the cocoa backend to check that mplayer2 is on the same screen as the menubar/dock before hiding them.
* encode: video encoding now supported using mencoder-like optionsRudolf Polzer2012-09-185-22/+631
|
* subs, vo_vdpau: support RGBA color for PGS subtitlesUoti Urpala2012-09-183-40/+127
| | | | | | | | | | | | | | | | | | | | | | Support passing bitmap subtitles to VOs in full RGBA color, and implement this for libavcodec-decoded subtitle formats on decoding side and vo_vdpau on display side. Currently this is enabled for PGS (blu-ray) and DVB subtitles. VDPAU seems to have sampling issues similar to known GL ones when drawing a sub-rectangle from a larger texture with scaling, where adjacent pixels outside the specified source rectangle affect the result. As the bitmap subtitles may be scaled, add padding support to the bitmap packer code. In principle, this could be used for colored DVD subtitles too. However, the libavcodec DVD decoder lacks parts of the resolution and palette handling that are present in spudec.c. Conflicts: libvo/vo_gl.c sub/dec_sub.h sub/sd_lavc.c
* Remove VESA/FBDEV remains, clean up example.confwm42012-09-182-93/+0
| | | | | | Remove VESA and FBDEV specific code that was forgotten when the respective VOs were removed. Remove references to old or broken stuff from example.conf.
* subs, vo: do sub bitmap change detection by comparing IDsUoti Urpala2012-09-183-8/+16
| | | | | | | | | | | | | | | | | vo_vdpau and vo_gl cache the last subtitle bitmaps uploaded to video card in case they stay the same over multiple frames. Detecting whether the bitmaps have changed and should be re-uploaded was somewhat fragile. Change the VO API to provide a bitmap ID which can be compared with what the VO has to determine whether a new upload of the bitmaps is needed. Conflicts: libvo/vo_gl.c Note: the changes for vo_gl.c were not merged. Instead, eosd_packer is modified to use the new way of detecting EOSD changes. This takes care of vo_gl, vo_gl3 and vo_direct3d, which all render EOSD. They don't need to be updated in turn.
* vo_vdpau: split bitmap packing code into a separate fileUoti Urpala2012-09-183-146/+483
| | | | | | | | | | | | | | | | | | Split the vo_vdpau code that calculates how to pack all subtitle bitmaps into a larger surface into a separate file. This will allow using it in other VOs. Conflicts: Makefile libvo/vo_vdpau.c Note: this commit does the same as an earlier commit by me (4010dd0b1a27e3996). My commit added the vo_vdpau packer code as eosd_packer.c, while this commit by uau uses bitmap_packer.c. Since bitmap_packer.c has a different interface, and because there are more commits changing OSD rendering coming, I will pick uau's version. However, vo_gl, vo_gl3 and vo_direct3d are still using eosd_packer.c, so to make the transition easier, don't delete eosd_packer.c yet.
* cleanup: video_out: remove vo_subdevice global variablewm42012-09-182-8/+2
| | | | | | | This wasn't accessed anymore. This is all what was left of mplayer2 commit c54fae82fd16 ("vo: fix crash if all VO open fallback attempts fail").
* subs: always use sub decoder framework for libass renderingUoti Urpala2012-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | Remove subtitle selection code setting osd->ass_track directly and vf_ass/vf_vo code rendering the track directly with libass. Instead, do track selection and rendering with dec_sub.c functions. Before, mpctx->set_of_ass_tracks[] contained bare libass tracks generated from external subtitle files. For use with dec_sub.c, it now contains struct sh_sub instances with decoder already initialized. This commit breaks the sub_step command ('g' and 'y' keys) for libass-rendered subtitles. It could be fixed, but it's so useless - especially as with the existing implementation there's no practical way to get subtitle delay back to normal after using it - that I didn't bother. Conflicts: command.c mp_core.h mplayer.c
* subs: libass: use a single persistent renderer for subtitlesUoti Urpala2012-09-181-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To draw libass subtitles, the code used ASS_Renderer objects created in vf_vo (VO rendering) or vf_ass. They were destroyed and recreated together with the video filter chain. Change the code to use a single persistent renderer instance stored in the main osd_state struct. Because libass seems to misbehave if fonts are changed while a renderer exists (even if ass_set_fonts() is called on the renderer afterwards), the renderer is recreated after adding embedded fonts. The known benefits are simpler code and avoiding delays when switching between timeline parts from different files (libass fontconfig initialization, needed when creating a new renderer, can take a long time in some cases; switching between files rebuilds the video filter chain, and this required recreating the renderers). On the other hand, I'm not sure whether this could cause inefficient bitmap caching in libass; explicitly resetting the renderer in some cases could be beneficial. The new code does not keep the distinction of separate renderers for vsfilter munged aspect vs normal; this means that changing subtitle tracks can lose cache for the previous track. The new code always sets some libass parameters on each rendering call, which were previously only set if they had potentially changed. This should be harmless as libass itself has checks to see if the values differ from previous ones. Conflicts: command.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c mplayer.c sub/ass_mp.c
* cleanup: remove pointless #definesUoti Urpala2012-09-182-11/+0
| | | | | | | | | | | | | | | | | | | | Remove the following #defines, which should never change in practice: CONFIG_FAKE_MONO, OUTBURST, FAST_OSD, FAST_OSD_TABLE The configure script hardcoded these to particular values in config.h. They could only be changed by manually editing it. I don't think anyone would want to. X11_FULLSCREEN This once did something, but became meaningless years ago and was now always set to true if the files using it were compiled at all. Conflicts: configure libvo/osd.c libvo/vo_gl.c Merged from mplayer2. The OSD defines were already removed in this fork.
* video_out: free memory if initializing a VO failswm42012-09-181-1/+3
| | | | This was a minor memory leak with no real impact.
* cocoa_common: improve conditional dock hiding from 3259e4a7aStefano Pigozzi2012-08-281-2/+3
| | | | | | Make the conditional hiding logic introduced in commit 3259e4a7a2a938 ("cocoa_common: make fullscreen menubar/dock hiding conditional") work when mplayer is started with the `fs` and `xineramascreen` options.
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-211-1/+1
| | | | | | | | The <libavutil/avutil.h> stopped including <libavutil/common.h> recursively in recent ffmpeg/libav git revisions. As a result, some files no longer got needed definitions, causing a build failure. Modify #include lines in various files to fix build with the latest versions of ffmpeg/libav headers.
* video: honor the video's colormatrix and color range flagscantabile2012-08-212-0/+36
| | | | | | If either of them is not defined, the old behavior is used: - the colormatrix is guessed based on resolution. - the color range is assumed to be tv aka limited range.
* osd: get rid of useless initialization functionwm42012-08-202-20/+0
| | | | | The function merely printed redundant messages that were not visible by default.
* cocoa_common: add HiDPI/retina supportStefano Pigozzi2012-08-163-17/+63
| | | | | | | | | | | | | | | | | | | | With a HiDPI screen, for performance and backwards compatibility reasons, AppKit requests an OpenGL surface with a pixel number that equals the user points number. After the image is rendered to this smaller surface, it is upscaled so that its dimensions are comparable across screens of different DPIs. The applied scaling is not that good and makes the video/subtitles blurry; this is not acceptable for a video player. Request AppKit to use a high resolution OpenGL surface to back the mplayer2 OpenGL view. Also set the window pixel size information correctly in the VO object by converting user points to actual pixels. All the system version checks are done at runtime so that the feature is available on OSX 10.7 even with a binary compiled with older SDKs. Also replace is_lion_or_better() with is_osx_version_at_least(10, 7, 0) which is defined in osx_common.
* cocoa_common.m: add missing config.h includeStefano Pigozzi2012-08-161-0/+2
| | | | This is needed for the check on CONFIG_SDL in this file.
* cleanup: osx_common: remove unused functionsStefano Pigozzi2012-08-162-53/+0
| | | | | | | | | Remove functions that aren't called anymore: * `osx_foreground_hack` was replaced by the NSApplication's activateIgnoringOtherApps: in cocoa_common. * Aspect ratio functions were not called by the "new" cocoa backend, since the corresponding menu item was deleted.
* cocoa_common: refactor menu generationStefano Pigozzi2012-08-161-16/+41
| | | | | This commit is supposed to make the menu generation a little more readable. It also fixes menu generation for the `cmd+q` entry.
* gl_common: fix compilation on OS X 10.8Stefano Pigozzi2012-08-161-0/+6
| | | | | | | | | As of OS X 10.8 Apple completely removed X11 from the system. gl_common.h was including gl.h using the path <GL/gl.h>. This path comes from the X11 headers, which are missing in 10.8. Change gl_common.h to include gl.h from Apple's OpenGL implementation as <OpenGL/gl.h> if X11/XQuartz is not detected.
* VO: remove vo_directfb2 and vo_directxwm42012-08-164-2691/+0
| | | | | | | | | | | | While being able to play videos on a framebuffer device would be nice, I didn't need it, and couldn't even test it (buggy nvidia binary drivers that disable framebuffers, buggy DirectFB that crashes when using the X11 backend). It's just dead weight, get rid of it. vo_directx was very horrible, and by today it's mostly useless. I didn't remove it, because there was that-guy who told me in amazement how awesome mplayer was, because it was the only video player fast enough for fast playback on his system when using vo_directx. Sorry, that-guy.
* vo_vdpau: fix crash when vo_vdpau initialization failswm42012-08-161-1/+1
| | | | | | | | This happened on system without a vdpau driver installed. It's especially bad because vdpau is the default VO. I'm not sure when this bug was introduced, and it seems to exist in upstream mplayer2 too.
* video_out: fix crash when VO autoselection failswm42012-08-161-2/+3
| | | | | | | | init_best_video_out() did not manage the memory for vo->window_title correctly, and free'd it twice when initialization failed (that's due to talloc_free_children() being called). When the next VO was tried, it reused the dangling pointer. Initialize this member somewhere else lazily instead.
* vo_sharedbuffer: remove this VOStefano Pigozzi2012-08-153-310/+0
| | | | | | | | | | | | | | Since slave mode is not planned to be kept, this VO is useless and I'm removing it. This VO was useful for OSX GUIs. Since in cocoa you can't embed views in windows from other processes, this VO was writing to a sharedbuffer with mmap. The OSX GUIs would then read from the buffer and render the image with an external renderer. If in the future we will want to support GUIs we will need to reasearch the IOSurface framework. This allows to share kernel managed image data across processes and integrates well with OpenGL.
* osx: fix buildStefano Pigozzi2012-08-082-3/+3
| | | | adapt the osx VOs to build against the latest changes.
* osd: remove FAST_OSD codewm42012-08-073-79/+1
| | | | | | This code has never been active by default, ever since it was added back in 2001. You had to edit config.h or configure manually to enable it.
* VO: remove old VO gluewm42012-08-079-330/+0
| | | | | | | This transition to a new VO API started over 4 years ago. It's time to finally end it, and get rid of the horrible hacks. Also removes some previously undetected dead code from spudec.c.
* osx_common: remove old VO include, modify change_movie_aspect()wm42012-08-072-4/+5
| | | | | | | | The only reason the old VO related header old_vo_defines.h was included was probably to gain access to the current VO struct in the function change_movie_aspect(). Make that function take a parameter instead. This function seems to be unused.
* vo_directx: convert to new VO APIwm42012-08-071-68/+78
|
* win32: fix compilation on MinGWwm42012-08-071-1/+1
| | | | | | | | | | | | | | | The commit 74df1d8e05aa2 (and f752212c62353) replaced the configure endian check with byte order macros defined by standard headers. It turns out that MinGW-w64 actually doesn't define these macros in the sys/types.h system header. (I assumed it does, because a quick test seemed to work. But that was because gcc -W -Wall doesn't warn against undefined macros. You need -Wundef for that.) MinGW-w64 has a sys/params.h header defining these macros, but sys/types.h doesn't include it, so it's useless without special casing the mplayer code. Add a hack top configure instead. Define the macros directly, and assume MinGW-w64 only works on little endian machines. The other changes are basically random typos and superficial oversights.
* vo_null: reformat and use new VO APIwm42012-08-071-48/+42
|
* Remove V4L2 decoder support (vo_v4l2 and ao_v4l2)wm42012-08-073-288/+0
| | | | | | | | | | | The removed VO and AO took MPEG data and decoded it with V4L2. I'm not exactly sure what's the use of this today, but get rid of it. As far as feeding video data to V4L2 is concerned, there are other ways. For example, there is this script, that feeds yuv4mpeg formatted raw video data to V4L2: https://raw.github.com/umlaeute/v4l2loopback/master/examples/yuv4mpeg_to_v4l2.c
* vo_v4l2: reformat, use new VO APIwm42012-08-071-165/+153
| | | | | Actually, this is probably completely broken, and there are better ways to get mplayer output into a V4L2 device.
* vo_caca: use new VO APIwm42012-08-071-33/+54
|
* vo_directfb2: reformat and convert to new VO APIwm42012-08-071-938/+1083
| | | | | | No effort was put into moving static variables into a priv struct. The VO wasn't tested, because DirectFB's X11 backend didn't work for me (it crashed, not just with mplayer, but also SDL applications).
* vo_x11: reformat, use new VO APIwm42012-08-071-375/+397
| | | | This also involves moving the static variables into a priv struct.
* libvo: remove videodev_mjpeg.hwm42012-08-061-141/+0
| | | | This was used by stream/tvi_v4l.c, which was removed a while ago.
* VO: remove vo_gif89a, vo_md5sum, vo_yuv4mpegwm42012-08-064-996/+0
| | | | | | | | The encoding branch by divverent can handle of these via libavformat. Note: for some reason, libav/ffmpeg have a GIF muxer only, and no demuxer. The gif configure checks needef for the mplayer internal gif demuxer can't be removed yet.
* VO: remove vo_jpeg, vo_png, vo_pnm, vo_tgawm42012-08-065-1443/+0
| | | | All of these have been replaced by vo_image.
* vo_image: add outdir optionwm42012-08-061-8/+42
| | | | | The function checked_mkdir is taken from vo_jpeg, with the error handling stripped down to a reasonable level.
* vo_image: add new video output for writing imageswm42012-08-063-1/+172
| | | | This is supposed to replace vo_png and others.
* video_out: rename privsize member to priv_sizewm42012-08-063-5/+5
|
* options: get rid of some compatibility stuffwm42012-08-061-5/+0
| | | | | | | | | Doesn't make sense because we broke/are going to break compatibility with everything anyway. Remove mechanism for warning the user against disabled options. Remove colorspace alternative option values.
* m_config: implement m_config_new in terms of m_config_simplewm42012-08-041-1/+2
| | | | | Also change m_config_simple() such that you need to register options using m_config_register_options().
* options: revert passing around talloc contextswm42012-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | |