aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out
Commit message (Collapse)AuthorAge
* wayland: print waylands display errosGravatar Alexander Preisinger2013-12-04
| | | | | This is very usefull especially if you want to use newer wayland stuff like wl_subsurfaces and xdg_surfaces.
* gl_video: change internal API for hwdec mp_image downloadGravatar Stefano Pigozzi2013-12-02
| | | | | | Previous API worked under the assumption that download_image is always called after map_image. In practice this is true, but it's better to have a much generic API that doesn't depend on the order in which the functions are called.
* gl_video: use hwdec download_image call only if hwdec is activeGravatar wm42013-12-02
| | | | | | | | | | The hwdec driver can be loaded, even if it's not used (e.g. when playing a file with no hardware decoding after one with it enabled). Also, check whether dlimage is NULL. Since this will do call into the native hwdec API, there's a chance a driver could fail doing this, it's better to check the return value, even if this case currently can't happen.
* options: add option to disable using right Alt key as Alt GrGravatar Vivek Jain2013-12-02
| | | | | | | | | mpv was hardcoded to always consider the right Alt key as Alt Gr, but there are parituclar combinations of platforms and keyboard layouts where it's more convenient to treat the right Alt as a keyboard modifier just like the left one. Fixes #388
* vo_opengl: support for vda hardware decodingGravatar Stefano Pigozzi2013-12-02
| | | | | | | | | | | The harder work was done in the previous commits. After that this feature comes out almost for free. The only problem is I can't get the textures created with CGLTexImageIOSurface2D to download properly, thus the code performs download using some CoreVideo APIs. If someone knows why download of textures created with CGLTexImageIOSurface2D doesn't work please contact me :)
* gl_video: support packed YUV formats with Apple extensionsGravatar Stefano Pigozzi2013-12-02
| | | | | | | | | | This adds support for packed YUV formats (YUVY and UYVY) using the extension GL_APPLE_rgb_422. While supporting this formats on their own is not that important (considering most video is planar YUV) they are used for interoperability with IOSurfaces. Next commit will use this formats to render VDA hardware decoded frames through IOSurface and OpenGL interoperability.
* vo_opengl: add support for rectangle texturesGravatar wm42013-12-01
| | | | | | | | | This allows vo_opengl to use GL_TEXTURE_RECTANGLE textures, either by enabling it with the 'rectangle-textures' sub-option, or by having a hwdec backend force it. By default it's off. The _only_ reason we're adding this is because VDA can export rectangle textures only.
* vo_null: don't reject hwaccel formatsGravatar wm42013-12-01
| | | | | | This is not strictly needed anymore. (On the other hand, it's not really possible to do hw decoding with vo_null, because the VO is still responsible for opening the hw decoder API, but that's another story.)
* options: add options that set defaults for af/vf/ao/voGravatar wm42013-12-01
| | | | | | | | There are some use cases for this. For example, you can use it to set defaults of automatically inserted filters (like af_lavrresample). It's also useful if you have a non-trivial VO configuration, and want to use --vo to quickly change between the drivers without repeating the whole configuration in the --vo argument.
* Take care of some libavutil deprecations, drop support for FFmpeg 1.0Gravatar wm42013-11-29
| | | | | | | | | | | | | | PIX_FMT_* -> AV_PIX_FMT_* (except some pixdesc constants) enum PixelFormat -> enum AVPixelFormat Losen some version checks in certain newer pixel formats. av_pix_fmt_descriptors -> av_pix_fmt_desc_get This removes support for FFmpeg 1.0.x, which is even older than Libav 9.x. Support for it probably was already broken, and its libswresample was rejected by our build system anyway because it's broken. Mostly untested; it does compile with Libav 9.9.
* gl_hwdec: use a imgfmt field instead of a query_format callbackGravatar wm42013-11-29
| | | | | Now that vdpau always uses a single image format, this can be simplified.
* vdpau: always let decoder output IMGFMT_VDPAUGravatar wm42013-11-29
| | | | | | | | | | The old ffmpeg vdpau support code uses separate vdpau pixel formats for each decoder (pretty much because mplayer's architecture sucked), which just gets into the way. Force the old decoder's output to IMGFMT_VDPAU, and remove IMGFMT_IS_VDPAU() where we can remove it. This should completely remove the differences betwene the old and new vdpau decoder outside of the decoder.
* vaapi: remove unused hw image formats, simplifyGravatar wm42013-11-29
| | | | | | | | | | PIX_FMT_VDA_VLD and PIX_FMT_VAAPI_VLD were never used anywhere. I'm not sure why they were even added, and they sound like they are just for compatibility with XvMC-style decoding, which sucks anyway. Now that there's only a single vaapi format, remove the IMGFMT_IS_VAAPI() macro. Also get rid of IMGFMT_IS_VDA(), which was unused.
* cocoa: unlock on uninitGravatar Stefano Pigozzi2013-11-26
| | | | NSLock should be unlocked before dealloc is called on it.
* osd: remove mp_osd_res.video_par fieldGravatar wm42013-11-24
| | | | | | This is not needed anymore, because we decided that the PAR of the decoded video matters, and not the PAR of the filtered video that arrives at the VO.
* Rename sub.c/.h to osd.c/.hGravatar wm42013-11-24
| | | | | This was way too misleading. osd.c merely calls the subtitle renderers, instead of actually dealing with subtitles.
* video: move struct mp_hwdec_info into its own header fileGravatar wm42013-11-23
| | | | | | | | This means most code accessing this struct must now include hwdec.h instead of dec_video.h. I just put it into dec_video.h at first because I thought a separate file would be a waste, but it's more proper to do it this way, as there are too many files which include dec_video.h only to get the mp_hwdec_info definition.
* vo_opengl: fix compilationGravatar wm42013-11-22
| | | | Never do a trivial change while drunk and without actually testing it.
* vo_opengl: initialize all fields for VFCTRL_GET_HWDEC_INFOGravatar wm42013-11-22
| | | | | | This initialized only the load_api and load_api_ctx fields, and left the other fields as they were. This failed with vf_vavpp, which assumed all fields are initialized.
* cocoa: use window-scale to support video scaling functionalityGravatar Stefano Pigozzi2013-11-22
| | | | | In the cocoa backend you can use cmd+0/1/2 to scale the window. This commit makes it use the new window-scale functionality.
* cocoa: implement window-scaleGravatar Stefano Pigozzi2013-11-22
|
* switch the build system to wafGravatar Stefano Pigozzi2013-11-21
| | | | | | | | | | | | | | | | | | | | | | | This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.
* vo_vdpau: don't calculate destination alpha when drawing OSDGravatar wm42013-11-18
| | | | | | Same as MPlayer svn commit r36515 "Chose cheaper alpha blend equation." No idea if this is actually faster, but can't hurt.
* gl_common: print SW renderer warning only if it was the only reason we ↵Gravatar wm42013-11-14
| | | | rejected it
* gl_common: remove unneeded callbackGravatar wm42013-11-14
| | | | We got rid of this some time ago, but apparently not completely.
* wayland: create xkbcommon keymap from stringGravatar Alexander Preisinger2013-11-13
| | | | Fixes a problem where the passed size doesn't match the actuall string.
* waylad: implement functionality for window-scalingGravatar Alexander Preisinger2013-11-12
|
* vo_lavc: fix -ovoffset.Gravatar Rudolf Polzer2013-11-11
| | | | Previously, using it led to no single frame being output, ever.
* vo_opengl: fix alpha values written to the framebufferGravatar wm42013-11-10
| | | | | | | | | | | | | | | | | | | | | | | When blending OSD and subtitles onto the video, we write bogus alpha values. This doesn't normally matter, because these values are normally unused and discarded. But at least on Wayland, the alpha values are used by the compositor and leads to transparent windows even with opaque video on places where the OSD happens to use transparency. (Also see github issue #338.) Until now, the alpha basically contained garbage. The source factor GL_SRC_ALPHA meant that alpha was multiplied with itself. Use GL_ONE instead (which is why we have to use glBlendFuncSeparate()). This should give correct results, even with video that has alpha. (Or at least it's something close to correct, I haven't thought too hard how the compositor will blend it, and in fact I couldn't manage to test it.) If glBlendFuncSeparate() is not available, fall back to glBlendFunc(), which does the same as the code did before this commit. Technically, we support GL 1.1, but glBlendFuncSeparate is 1.4, and I guess we should try not to crash if vo_opengl_old runs on a system with GL 1.1 drivers only.
* gl_hwdec_vdpau: silence warning caused by buggy GL_NV_vdpau_interop specGravatar wm42013-11-09
| | | | | VDPAU handles are integers, but for some reasons the VDPAU GL extension expects them as void*.
* gl_header_fixes: fix inverted conditionGravatar wm42013-11-05
| | | | | Could possibly leading to failing compilation on systems with headers that miss the vdpau extension.
* vo_opengl: support for vdpau hardware decodingGravatar wm42013-11-05
| | | | | | | | | | | | This uses vdpau OpenGL interop to convert a vdpau surface to a texture. Note that this is a bit weak and primitive. Deinterlacing (or any other form of vdpau postprocessing) is not supported. vo_opengl chroma scaling and chroma sample position are not supported. Internally, the vdpau video surfaces are converted to a RGBA surface first, because using the video surfaces directly is too complicated. (These surfaces are always split into separate fields, and the vo_opengl core expects progressive frames or frames with weaved fields.)
* vdpau: move device and video surface management from vo_vdpau.c to vdpau.cGravatar wm42013-11-05
| | | | | The goal is being able to use vdpau decoding independently from vo_vdpau.c.
* vo_opengl: redo aspects of initialization, change hwdec APIGravatar wm42013-11-05
| | | | | | | | | | | Instead of checking for resolution and image format changes, always fully reinit on any parameter change. Let init_video do all required initializations, which simplifies things a little bit. Change the gl_video/hardware decoding interop API slightly, so that hwdec initialization gets the full image parameters. Also make some cosmetic changes.
* vo_opengl/vaapi: use IMGFMT_RGB0Gravatar wm42013-11-05
| | | | | More correct, might make things slightly faster (probably insignificant).
* vo_xv: fix compilation of SHM not availableGravatar wm42013-11-05
|
* Adjust wayland definesGravatar Paweł Forysiuk2013-11-04
|
* vo_opengl: cosmetics/fix typosGravatar wm42013-11-04
|
* vo_opengl: reserve 4 texture units for video instead of 3Gravatar wm42013-11-04
| | | | | | | | | | Video has up to 4 textures, if you include obscure formats with alpha. This means alpha formats could always overwrite the first scaler texture, leading to corrupted video display. This problem was recently brought to light, when commit 571e697 started to explicitly unbind all 4 video textures, which broke rendering for non-alpha formats as well. Fix this by reserving the correct number of texture units.
* Merge remote-tracking branch 'origin/have_configure'Gravatar Stefano Pigozzi2013-11-04
|\
* | vo_opengl: fix use of uninitialized memoryGravatar wm42013-11-04
| | | | | | | | | | Pretty bad, although it should actually not cause any misbehavior. Comes from the hardware decoding interop commit.
| * fix weird DPMS->EXT replacementGravatar wm42013-11-04
| |
| * Merge branch 'master' into have_configureGravatar wm42013-11-04
| |\ | |/ |/| | | | | Conflicts: configure
* | vo_opengl: add support for VA-API OpenGL interopGravatar wm42013-11-04
| | | | | | | | | | | | | | | | VA-API's OpenGL/GLX interop is pretty bad and perhaps slow (renders a X11 pixmap into a FBO, and has to go over X11, probably involves one or more copies), and this code serves more as an example, rather than for serious use. On the other hand, this might be work much better than vo_vaapi, even if slightly slower.
* | vo_opengl: add infrastructure for hardware decoding OpenGL interopGravatar wm42013-11-04
| | | | | | | | | | | | | | | | | | | | | | | | Most hardware decoding APIs provide some OpenGL interop. This allows using vo_opengl, without having to read the video data back from GPU. This requires adding a backend for each hardware decoding API. (Each backend is an entry in gl_hwdec_vaglx[].) The backends expose video data as a set of OpenGL textures. Add infrastructure to support this. The next commit will add support for VA-API.
| * configure: uniform the defines to #define HAVE_xxx (0|1)Gravatar Stefano Pigozzi2013-11-03
|/ | | | | | | | | | | | | | | | | | | | | The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
* w32: implement functionality required for window-scaleGravatar wm42013-11-02
| | | | Same semantics with respect to fullscreen as x11.
* x11: make window-scale use windowed size in fullscreen modeGravatar wm42013-11-02
| | | | | | This is a bit more intuitive, since before, the window size was just set to something random when setting the window-scale property during fullscreen.
* Fix some more -Wshadow warningsGravatar wm42013-11-01
| | | | | | These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
* Enable -WshadowGravatar wm42013-11-01
| | | | | | | | | This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.