Commit Graph

39924 Commits

Author SHA1 Message Date
wm4 185e95ee3d video: remove internal QP passing
This was required by vf_pp, which was just removed.

vf_dlopen has this stuff in its API. This API is considered stable, so
the related fields are not removed from it. But the fields are always 0
now, so there's no point in keeping the example program around.

vf_pullup.c did some extremely awkward passthrough of this information,
but didn't actually use it.
2014-12-03 23:01:20 +01:00
wm4 809936fdb9 video/filter: kill vf_pp (libpostproc)
This is an ancient filter, and we assume it's not useful anymore.

If you really want this, it's still available in libavfilter (e.g. via
--vf=lavfi=[pp...]). The disadvantage is that mpv doesn't pass through
QP information to libavfilter. (This was probably the reason vf_pp still
was part of mpv - it was slightly easier to pass QP internally.)
2014-12-03 23:01:19 +01:00
wm4 8fc3d7dc39 lua: fully cleanup removed key bindings
This is basically cosmetic; it was leaking the old handler functions.
2014-12-03 23:01:19 +01:00
wm4 19f9a7066e vo_opengl: make uninit idempotent 2014-12-03 23:01:19 +01:00
wm4 920512d358 vo_opengl: move hwdec parts into their own files
This wasn't done before because there was no advantage in "abstracting"
it. This changed, and putting this into its own files is better than
messing it into gl_common.c/h.
2014-12-03 23:01:19 +01:00
wm4 63377744f3 vdpau/GLX: don't access VO backend
Same as with the previous commits.

In theory, vdpau/x11 GL interop doesn't assume GLX. It could use EGL as
well. But since it's always GLX in practice, so we're fine with this.

Remove the gl_hwdec.mpgl field - it's unused now.
2014-12-03 21:13:59 +01:00
wm4 031aef9be9 vaapi/GLX: don't access VO backend
Same as with the VDA change.
2014-12-03 21:07:18 +01:00
wm4 bfa7893fe9 vda: make independent from cocoa backend
Basically, don't access the vo field.

There's also no reason anymore to access MPGLContext. We still need to
access loaded GL functions though, so add a field for that to gl_hwdec.

Untested.
2014-12-03 21:02:33 +01:00
Stefano Pigozzi 82afc0f343 vda: use implicit current GL context
Removes the dependency from the Cocoa backend in case we are not using
it but still wanna use VDA GL introp.
2014-12-03 20:40:06 +01:00
wm4 0c6d85f6c3 input, lua: make removing key bindings work
This just kept adding bindings to the input section, rather than
defining it. One bad effect was that mp.remove_key_binding() in Lua
didn't work.
2014-12-03 15:46:55 +01:00
Stefano Pigozzi 10bc277984 cocoa: remove urlencoding for url open events
This fixes using the mpv:// custom protocol on Yosemite were apparently
we receive an url which is automatically urlencoded by the system.

/cc mpv-player/stable
2014-12-02 22:27:33 +01:00
Stefano Pigozzi d7adb818b0 build: give precedence to Lua52 over LuaJIT
LuaJIT ships with a broken .pc file on OS X (see #1110), and leaving
Lua52 last was done only to improve libquvi interoperability.
2014-12-02 22:10:13 +01:00
Stefano Pigozzi e7145ae24d cocoa: add https:// url scheme to bundle's plist 2014-12-02 20:55:19 +01:00
Nyx0uf 84866cac2d cocoa: add mk3d UTI to bundle's plist
This should allow lauching a mk3d file directly from the Finder.

Fixes #1311
2014-12-02 20:48:19 +01:00
wm4 f984b79720 client API: allow multiple mpv instances with terminal=yes
This is simply not allowed, and doing it triggered an assertion. It's
still not allowed, because the terminal and related functionality is a
global resource, and there doesn't seem to be a sane way to manage the
signal handlers.

But be a bit nicer, and just the terminal if it's already in use.

Note that terminal _output_ happens anyway. This becomes usable with
this commit. To facilitate logging-only usage further, also explicitly
disable terminal input, so that "terminal=yes" can be used for logging
without much interference with other things. (It'll still overwrite some
signal handlers, though.)
2014-12-02 20:36:55 +01:00
wm4 ef1c7563c5 vo_opengl: minor changes
Always set the viewport on entry. The way the viewport is tracked is a
bit complicated in my opinion, and in fact it doesn't even reduce the
number of GL calls. Setting it on entry is actually redundant if video
covers the screen fully, because the handle_pass() unconditionally sets
it anyway, but avoiding it would complicate the cases gl->Clear() is
actually needed.

Add a fbo argument to gl_video_render_frame(). This allows you to render
into a FBO rather than the default framebuffer. It will be useful for
providing an API to render on an external GL context. (If that will
actually be added.)
2014-12-02 20:36:55 +01:00
wm4 33a6b8df46 vo_opengl: print error number if framebuffer creation fails
Seems like a waste not to print this.

Anyone with enough technical knowledge to have use for the exact error
can map the number back to the GL symbol, so don't bother to convert it
to a symbol.
2014-12-02 20:36:55 +01:00
wm4 b6ca4a48e1 osc: always force mouse_move binding
So the OSC will still appear when using --no-input-default-bindings. It
also means it may override a user's mouse_move binding, but I guess
users who don't want the OSC should just use the --no-osc option.
2014-12-02 20:36:55 +01:00
wm4 29bc781b68 lua: fix broken error message
luaL_error() doesn't support %.*s, because it uses Lua's own format
string mechanism that just looks like the C one. Just drop this part.
2014-12-02 20:36:55 +01:00
wm4 c65bce0738 vd_lavc: use avcodec_is_open()
This is "better", although nobody seems to know how this API is supposed
to work at all.
2014-12-02 20:36:55 +01:00
wm4 d650fd21b1 player: don't signal an error if --stream-dump is used
The player thinks an error happened because no audio or video was played
after finishing the file, but this obviously makes no sense with stream
dumping. (error_playing follows the client API convention that negative
values are errors.)
2014-12-02 20:36:55 +01:00
wm4 980f3ea071 client API: print version on initialization
A rather big oversight, because a log produced with the client API will
not contain the mpv version at all otherwise.
2014-12-02 20:36:55 +01:00
wm4 16025a07bb DOCS/client-api-changes: mark release 0.7.0 2014-12-02 20:36:55 +01:00
Nyx0uf f008bbb484 cocoa: split mkv/webm for imported UTI in plist 2014-12-01 21:34:31 +01:00
Stefano Pigozzi 198fbba655 cocoa: fix opening reference URLs (.file/id=)
Fixes #1202

/cc @mpv-player/stable
2014-12-01 21:31:53 +01:00
wm4 4be7bdcc0f audio: fix one of the previous commits
Fixes commit 52c51149. It broke multichannel (or possibly everything)
for ao_alsa, ao_oss, ao_sndio.
2014-12-01 18:28:00 +01:00
Stefano Pigozzi 586c9e7155 cocoa: allow to black out other display when going fs
fixes #1302
2014-12-01 18:05:30 +01:00
Stefano Pigozzi 1c0920a8dd ao_coreaudio: initialize fetched properties to zeros
Should hopefully fix #1249 and #1279
2014-12-01 16:51:19 +01:00
wm4 52c51149db options: fix channel map options sometimes failing
Channel amp otpions were not copied correctly: it copied the size of a
pointer to struct chmap, not the struct itself. Since mp_chmap is
currently 9 bytes, this meant the last channel entry was not copied
correctly on 64 bit systems, leading to very strange failures. It could
be triggered especially when using the client API, because the client
API always copies options on access (mpv command line options tend to
work directly on options).
2014-12-01 16:09:25 +01:00
wm4 62998e9709 options: fix swapped deprecated/replacement in warning
This was relevant for --af and --vo (both use this option type, and have
deprecated aliases).
2014-12-01 15:30:24 +01:00
wm4 8c2b78ea5a options: simplify channel map validation
The min=-1 case was never used, and the channel map must always be valid
(or in some cases, invalid but empty).
2014-12-01 15:29:02 +01:00
wm4 b0ed93d87d audio: allow more than 20 channel map entries
This could trigger an assertion when using ao_alsa or ao_coreaudio. The
code was simply assuming the number of channel maps was bounded
statically (which was true at first in both AOs).

Fix by using dynamic memory allocation. It needs to be explicitly
enabled by the AOs by setting a temp context, because otherwise the
memory couldn't be freed. (Or at least this seems to be the most elegant
solution.)

Fixes #1306.
2014-12-01 15:28:06 +01:00
wm4 98da9afb8f vo_opengl: remove redundant GL state initialization
All of these are already the defaults.

One exception is glDepthMask(), which is enabled by default. But if the
framebuffer has no depth buffer anyway, it shouldn't make a difference.
2014-12-01 14:50:00 +01:00
wm4 b57ab4bb3b vd_lavc: don't crash if codec could not be opened
Fixes #1307.
2014-12-01 13:58:30 +01:00
Kevin Mitchell 67c4117476 ao/wasapi: make set_ao_format EX/EXTENSIBLE agnostic
There is no guarantee that closestMatch returned by IsFormatSupported
is actually a WAVEFORMATEXTENSIBLE.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd370876%28v=vs.85%29.aspx

We should therefore not blindly treat it as such.
2014-12-01 03:40:24 -08:00
Kevin Mitchell 146561cc91 ao/wasapi: fix set_ao_format
Before it used whatever was in ao->format and changed the bits even
though this might have nothing to do with the actual WAVEFORMAT
negotiated with WASAPI.

For example, if the initial ao->format was a float and we had set the
WAVEFORMAT to s24, this would create a non-existent float24 format.
Worse, it might put an u16 into ao->format when WAVEFORMAT described s16.
WASAPI doesn't support unsigned at all as far as I can tell.
2014-12-01 03:40:24 -08:00
Kevin Mitchell 524cdfc3f1 ao/wasapi: show actual waveformat tried
also remove bogus ao_format
2014-12-01 03:40:23 -08:00
Kevin Mitchell bd33fa7052 ao/wasapi: don't assume 32-bits == float
This was based on old WAVEFORMATEX restrictions
http://msdn.microsoft.com/en-us/library/windows/hardware/ff538799%28v=vs.85%29.aspx

With the new WAVEFORMATEXTENSIBLE, this is no longer a problem. and we
can have s32 or float32 so we need to actually check / set these correctly.

fixes #1287
2014-12-01 03:40:23 -08:00
Kevin Mitchell 2006069ca2 ao/format: add af_fmt_is_float 2014-12-01 03:40:23 -08:00
Kevin Mitchell 96fa3ebd1a ao/wasapi: make sure that < 16-bit pcm never happens
it just sucks. noone should have to listen to that.
2014-12-01 03:40:23 -08:00
Kevin Mitchell 9a0b97d214 ao/wasapi: get rid of WAVEFMT union
It only confused the issue. Replace it's functionality with
waveformat_copy function where needed.
2014-12-01 03:40:23 -08:00
wm4 18a621ae26 demux_playlist: don't ignore last line in m3u
If EOF is reached after reading a line, the EOF flag is set. This was a
problem for the m3u code, which checked for EOF _after_ reading a line,
which will discard the last line read.

Also fix a typo in an unrelated part of the file.
2014-11-30 19:30:22 +01:00
wm4 09e5d7c1e6 manpage: rename input.conf supersection
By now, input.conf is actually just a small part of input handling.
Rename the section to something else ("command interface" was the
first reasonable thing that came to mind).

Also fix a minor typo further down.
2014-11-29 20:53:24 +01:00
wm4 aca6ec1394 manpage: lua: fix example
Oops.
2014-11-29 20:27:47 +01:00
Sergey Kvachonok 01717dcd2c vo_wayland: Add "multimedia" keyboard key bindings.
libxkbcommon keysyms are the same as X11 keysyms (sans prefix),
so I simply copied the missing subsection from x11_common.c.

Signed-off-by: Sergey Kvachonok <ravenexp@gmail.com>
Signed-off-by: wm4 <wm4@nowhere>
2014-11-29 19:13:47 +01:00
wm4 01a3e43ca9 manpage: minor fixes
Also update the Lua example. The "pause" event was declared deprecated,
so the example should use the newer API.
2014-11-29 19:11:07 +01:00
wm4 a399339b95 player: don't ignore relative seeks by 0 seconds
I don't know why this done; most likely it had no real reason.

Remove it because it breaks "refresh seeks" to the same position.
(Although the refresh seeks mpv sometimes does were fine.)
2014-11-29 01:03:37 +01:00
wm4 87f5ba6ab3 command: avoid returning invalid FPS values
It's possible that fps is sometimes 0 in case it's unset.
2014-11-29 00:37:34 +01:00
wm4 a937ba203d player: reset frame step counter on seeks
I suppose this wasn't done in order to keep the frame step counter
active even in the next file, but actually it was reset anyway.
2014-11-29 00:27:17 +01:00
wm4 9e10f8ccbb vo_opengl: enable fancy-downscaling by default for opengl-hq 2014-11-29 00:04:01 +01:00