0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

36872 Commits

Author SHA1 Message Date
Stefano Pigozzi
18f3a1a7ee build: osx: set chmod to 755 for non-bundle binary during install
When installing the bundle we also manually install the origianl binary. Waf
defaults to chmod 644, so we must explicitely set it to 755.
2013-12-04 21:39:53 +01:00
Alexander Preisinger
6e34b0ec1f wayland: print waylands display erros
This is very usefull especially if you want to use newer wayland stuff like
wl_subsurfaces and xdg_surfaces.
2013-12-04 20:29:16 +01:00
Stefano Pigozzi
bf90317ad1 build: remove execute kwarg to check_cc when cross-compiling
This prevents waf from running test programs after compilation. A better
approach would be to only remove this option if the check actually errors,
but we are using this only for Lua anyway.
2013-12-04 19:31:28 +01:00
wm4
aeed84bd27 vf_noise: reduce binary size
Same issues as in previous commit.
2013-12-04 02:17:19 +01:00
wm4
0c2a0a67b6 vf_eq: revert unintended binary size increase
The vf_eq context contains a very large lookup table, and the method of
setting default values caused the vf_eq context to be included in the
compiled code.
2013-12-04 01:51:27 +01:00
wm4
05ba5a08d2 manpage: fix example 2013-12-04 01:39:57 +01:00
wm4
a91e51a8f1 manpage: remove two stray video fitler deprecation notes
vf_stereo3d now uses vf_lavfi, if mpv was compiled with libavfilter.

vf_swapuv is hereby undeprecated. It's too trivial to wrap it with
libavfilter, and it's also too useless that even typing this commit
message is not really worth the time to spend on it.
2013-12-04 00:14:24 +01:00
bugmen0t
7ee074813b ao_oss: when falling back from unknown prefer larger format 2013-12-04 00:07:40 +01:00
bugmen0t
9fcf88e42b ao_oss: add 24bit formats 2013-12-04 00:07:40 +01:00
wm4
e872a13d5f manpage: generic notice about changed sub-option parsing
Just in case someone expects these are unchanged just because they're
not mentioned in changes.rst anywhere. Documenting all of these changes
would be too much work and not helpful either.
2013-12-04 00:07:40 +01:00
wm4
437ecc5cad video/filter: remove legacy option handling hacks
All filters now either use the generic option parser, or don't have
options. This finally finishes a transition started in 2003 (see git
commit 33b62af947).

Why are MPlayer devs so monumentally lazy? Sorry, but this takes the
cake. You had 10 years.
2013-12-04 00:07:40 +01:00
wm4
079e0e7963 vf_vo: don't abuse option strings to set VO
Whoever thought this was a good idea should be punched.
2013-12-04 00:07:40 +01:00
wm4
0d5e4ba799 vf_rotate: use option parser 2013-12-04 00:07:40 +01:00
wm4
fabfb23232 vf_pp: use option parser 2013-12-04 00:07:40 +01:00
wm4
a605fae6fa vf_ilpack: use option parser 2013-12-04 00:07:40 +01:00
wm4
e92f4d4726 vf_eq: use option parser 2013-12-04 00:07:39 +01:00
wm4
3201a40234 vf_dsize: use option parser
Mostly backwards compatible, we don't change much because we just want
to get rid of the legacy option string handling.

You can't pass an aspect as first argument anymore.
2013-12-04 00:07:39 +01:00
wm4
43a6dd1ed5 vf_divtc: use option parser 2013-12-04 00:07:39 +01:00
wm4
5b7351ee3a video/filter: remove vf_down3dright
Apparently you can get this with: stereo3d=ab[2]{l,r}:sbs[2]{l,r}

So it seems the filter is redundant and can be removed.

Also see FFmpeg commit 2f11aa141a01.
2013-12-04 00:07:39 +01:00
wm4
66f74d031d vf: remove unneeded field
This was once required for padding, because many filters didn't use
designated initializers, and initialized a removed field with NULL.
2013-12-04 00:07:39 +01:00
wm4
5b48204e84 vf_pullup: change options, reroute to vf_lavfi
The options are probably mostly backwards compatible.
2013-12-04 00:07:39 +01:00
wm4
b21cb279d7 vf_unsharp: change options, reroute to vf_lavfi 2013-12-04 00:07:39 +01:00
wm4
1acb32201b vf_phase: change options, reroute to vf_lavfi
The option change is probably backwards compatible.
2013-12-04 00:07:39 +01:00
wm4
6a2eeedc4c vf_noise: reroute to vf_lavfi
Unfortunately, this forces filtering both luma and chroma, because
otherwise we'd have to deal with libavfilter's vf_noise weird handling
of YUV vs. RGB formats. Would we e.g. filter luma only, it would filter
red in RGB mode only, because it goes by component and there's no way to
distinguish YUV and RGB by just using the filter's options.
2013-12-04 00:07:39 +01:00
wm4
ad950be415 vf_stereo3d: reroute to vf_lavfi 2013-12-04 00:07:39 +01:00
wm4
54d67581d7 vf_hqdn3d: change options, reroute to vf_lavfi 2013-12-04 00:07:39 +01:00
wm4
7d04327e71 vf_gradfun: reroute to vf_lavfi
Also update the manpage. We changed defaults and added a suboption quite
some time ago, and we forgot to update the manpage at all.
2013-12-04 00:07:39 +01:00
wm4
5064ef87c3 vf_delogo: reroute to vf_lavfi
The ``file`` suboption is unsupported on lavfi.
2013-12-04 00:07:39 +01:00
wm4
86ba9a7f24 vf_yadif: change options, reroute to vf_lavfi
Also remove the ability to disable deinterlacing at runtime. You can
still disable deinterlacing at runtime by using the ``D`` key and its
automatical filter insertion/removal.
2013-12-04 00:07:38 +01:00
wm4
25635a62c3 vf_lavfi: export a wrapper function
This will allow old filter to run libavfilter instead by calling
vf_lw_set_graph(), which turns the filter into a wrapper, using a given
libavfilter graph.

Later commits use that to automatically "reroute" a bunch of filters to
libavfilter. We want to get rid of the old MPlayer filter code, because
it's bad an unmaintained, but we still don't want to force everyone to
use vf_lavfi, so this solution will do for a while.
2013-12-04 00:07:38 +01:00
wm4
733c2369d3 video: remove VFCAP_POSTPROC
This wasn't used anymore, not even until recently.
2013-12-04 00:07:38 +01:00
wm4
1176ca9465 vf_screenshot: remove unnecessary code 2013-12-04 00:07:38 +01:00
Stefano Pigozzi
ca956af446 gl_video: change internal API for hwdec mp_image download
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.
2013-12-02 21:26:17 +01:00
wm4
14d92a4685 manpage: mention that vda can work with vo_opengl
Also, with the addition of VDA, all hardware decoding backends work with
vo_opengl now.
2013-12-02 19:24:18 +01:00
wm4
391035d857 gl_video: use hwdec download_image call only if hwdec is active
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.
2013-12-02 19:22:45 +01:00
Vivek Jain
6fb020f5de options: add option to disable using right Alt key as Alt Gr
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
2013-12-02 09:03:31 +01:00
Stefano Pigozzi
a74d9c1803 vo_opengl: support for vda hardware decoding
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 :)
2013-12-02 09:03:31 +01:00
Stefano Pigozzi
36eebc231e gl_video: support packed YUV formats with Apple extensions
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.
2013-12-02 09:03:30 +01:00
wm4
cb45ea371f build: reject broken roaraudio sndio emulation
roaraudio has some sort of sndio emulation, but apparently its header
file is either blatantly broken, or an old version from the past. The
sio_onvol() function has the wrong return type (void instead of int),
and the SIO_DEVANY symbol is missing entirely. This broke the build,
because the configure check was successful anyway.
2013-12-02 00:21:59 +01:00
wm4
dc582f2505 vo_opengl: add support for rectangle textures
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.
2013-12-01 23:39:13 +01:00
wm4
f30c2c99d1 mp_image: deal with FFmpeg PSEUDOPAL braindeath
We got a crash in libavutil when encoding with Y8 (GRAY8). The reason
was that libavutil was copying an Y8 image allocated by us, and expected
a palette. This is because GRAY8 is a PSEUDOPAL format. It's not clear
what PSEUDOPAL means, and it makes literally no sense at all. However,
it does expect a palette allocated for some formats that are not
paletted, and libavutil crashed when trying to access the non-existent
palette.
2013-12-01 20:51:38 +01:00
wm4
1136a8b6ac input: don't emit command when using multiple mouse buttons at once
This is for key bindings that use multiple mouse buttons at once. (Yes,
this is weird, but MPlayer always had this feature, and apparently
there are people using it!)

Before this commit, clicking another mouse button while still holding
the previous mouse button forced the command bound to the previous
mouse button to be emitted. This is usually needed to make sure the
input consumer (the player and the OSC) stays in sync with the actual
mouse button state. If there's no command sent, the OSC in particular
would think the button is still held down. However, sending the command
is undesired behavior if you want to use these multiple-key binds.

Solve this by emitting commands in this situation only if a key down
command was sent earlier. Since mouse button key bindings are normally
executed on key-up only, this happens with special commands like
script_dispatch only (used by the OSD to track mouse buttons, but
also used for other OSC bindings).

See github issue #390.
2013-12-01 18:05:08 +01:00
wm4
071ae5613f input: improve some comments
I have the feeling some of these were written before everything was
changed all over again.
2013-12-01 17:34:43 +01:00
wm4
b5d7c95e36 vo_null: don't reject hwaccel formats
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.)
2013-12-01 15:18:06 +01:00
wm4
48e10da501 command: add a revert_seek command
As discussed on IRC.
2013-12-01 02:07:32 +01:00
wm4
b18f02d1ad options: add options that set defaults for af/vf/ao/vo
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.
2013-12-01 00:12:10 +01:00
wm4
aaddcb702e old-configure: delete pre-waf config.h and config.mak 2013-11-30 23:17:44 +01:00
wm4
fafa2f4b85 osdep/io: also include unistd.h
Might be needed by fcntl() usage.
2013-11-30 23:17:20 +01:00
wm4
9d8573cfe8 Prevent creating zombies
The "run" input command does fork+exec to spawn child processes. But it
doesn't cleanup the child processes, so they are left as zombies until
mpv terminates. Leaving zombie processes around is not very nice, so
employ a simple trick to let pid 1 take care of this: we fork twice, and
when the first fork exits, the second fork becomes orphaned and becomes
pid 1's child. It becomes pid 1's responsibility to cleanup the process.
The advantage is that we don't need extra logic to cleanup the spawned
process, which could have an arbitrary lifetime.

This is e.g. described here: http://yarchive.net/comp/zombie_process.html

Also use _exit() instead of exit(). It's not really sane to run cleanup
handlers (atexit() etc.) inside a forked process.
2013-11-30 22:47:26 +01:00
wm4
95cfe58e3d Use O_CLOEXEC when creating FDs
This is needed so that new processes (created with fork+exec) don't
inherit open files, which can be important for a number of reasons.

Since O_CLOEXEC is relatively new (POSIX.1-2008, before that Linux
specific), we #define it to 0 in io.h to prevent compilation errors on
older/crappy systems. At least this is the plan.

input.c creates a pipe. For that, add a mp_set_cloexec() function (which
is based on Weston's code in vo_wayland.c, but more correct). We could
use pipe2() instead, but that is Linux specific. Technically, we have a
race condition, but it won't matter.
2013-11-30 22:40:51 +01:00