Commit Graph

40020 Commits

Author SHA1 Message Date
Stefano Pigozzi fab64fd3cf cocoa: bundle: use idle=once 2014-12-07 16:23:08 +01:00
Stefano Pigozzi f56fcd71bb options: add a 'once' idle mode
This allows to make mpv wait for file open events at start but close
after it is done playing the first playlist.
2014-12-07 16:22:38 +01:00
wm4 3afe76133b sub: remove assertion
This should clearly be impossible, but it seems to happen with ordered
chapters for a user.

Since I can't tell what the actual bug is and it seems impossible to
know the details without downloading possibly huge files, this is
probably the best we can do.

Should at least partially fix #1319.
2014-12-07 14:21:12 +01:00
wm4 090f6cfc30 player: when seeking past EOF with --keep-open, seek to last frame
It feels strange that seeking past EOF with --keep-open actually leaves
the player at a random position. You can't even unpause, because the
demuxer is in the EOF state, and what you see on screen is just what was
around before the seek.

Improve this by attempting to seek to the last video frame if EOF
happens. We explicitly don't do this if EOF was reached normally to
increase robustness (if the VO got a frame since the last seek, it
obviously means we had normal playback before EOF).

If an error happens when trying to find the last frame (such as not
actually finding a last frame because e.g. the demuxer misbehaves), this
will probably turn your CPU into a heater. There is no logic to prevent
reinitiating the last-frame search if the last-frame search reached EOF.
(Pausing usually prevents that EOF is reached again after a successful
last-frame search.)

Fixes #819.
2014-12-07 02:47:54 +01:00
wm4 6adaddbe63 vo_opengl: extend filter size to 64
For better downscaling.

Maybe the list of filter sizes shouldn't be static...
2014-12-06 23:59:54 +01:00
wm4 309c5fee59 vo_opengl: clamp filters to their size
This gives better results with fancy-downscaling. The issue here is that
fancy-downscalign "extends" the filter radius by some amount, which
requires using a larger filter size and shader. Then most of the filter
is "unused", but some filters still return non-0 coefficients, which
create heavy artifacts. Just clamp them off.

I'm not sure if this is the right solution, but at least it's better
than before.
2014-12-06 23:59:54 +01:00
Stefano Pigozzi 2833670b71 cocoa: fix view leak in uninit when fullscreen 2014-12-06 21:55:36 +01:00
reimar 13b4fb9d28 af_hrtf: Fix out-of-range read.
Based on patch by Yuriy Kaminskiy [yumkam gmail].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37330 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: wm4 <wm4@nowhere>
2014-12-06 17:09:57 +01:00
Stefano Pigozzi 685b8b7a00 cocoa: use --idle when running inside bundle
Previously when using the bundle we used a custom bizarro thing to wait for
events. Just use `--idle` and greatly simplify the code.
2014-12-06 14:16:13 +01:00
wm4 429fe85c48 demux_mkv: reject 0 TimecodeScale
Also reject anything over INT_MAX; no particular reason for this upper
bound.

Fixes #1317.
2014-12-06 13:47:03 +01:00
Stefano Pigozzi 73b7d4516b cocoa: don't change app activation policy in libmpv
/cc @mpv-player/stable
2014-12-06 10:13:11 +01:00
wm4 f9799ff342 demux_playlist: fix negated condition
Fuck.
2014-12-06 01:50:54 +01:00
wm4 0641c7b783 vo_opengl: disable fancy-downscaling for opengl-hq again
Seems it's actually buggy, beyond the problem that large filter sizes
are required.
2014-12-06 01:46:34 +01:00
wm4 115b165b98 vo_opengl: extend filter size to 32
Also replace the weights calculations for 8/12/16 with the generic
weight function definition macro. (The weights 2/4/6 follow slightly
different rules.)
2014-12-06 01:45:39 +01:00
wm4 df36470611 vaapi/GLX: remove a direct reference to an GL symbol
Instead go through our function loader.
2014-12-06 01:40:23 +01:00
wm4 7df2632f71 demux: silence unseekable message
This message was added in commit a0acb6ea. But it showed up in all sorts
of inappropriate contexts, such as when opening m3u from an unseekable
http URL, or playing DVDs. So I guess this didn't work out. Disabling it
again.
2014-12-05 23:58:04 +01:00
wm4 09c701b797 demux_playlist: detect headerless m3u files by extension
m3u files are normally just text files with a list of filenames. Nothing
actually mandates that there is a header. Until now, we've rejected such
files, because there's absolutely no way to detect them.

If nothing else claims the file, the extension is ".m3u", and if the
contents of the file look like text, then load it as m3u playlist. The
text heuristic is pretty cheap, but at least it should prevent trying
to load binary data as playlist. (Which would "work", but result in a
catastrophic user experience.)

Due to the text heuristic, UTF-16/32 files will be rejected (unless they
have a header), but I don't care.
2014-12-05 23:50:56 +01:00
Stefano Pigozzi f911ef08ab cocoa: save screenshots to desktop when using app bundle
Fixes #947
2014-12-05 23:30:23 +01:00
Stefano Pigozzi ed76d22b22 cocoa: don't create Dock icon for audio only files
fixes #635
2014-12-05 23:13:21 +01:00
ChrisK2 4ced724ffd DOCS, OSC: Un-document removed seektooltip option 2014-12-05 19:42:54 +01:00
ChrisK2 f299debaa0 osc: improve slimbox layout and minor code cleanups 2014-12-05 19:37:31 +01:00
ChrisK2 58d49a2311 DOCS, OSC: Document layout option 2014-12-05 19:37:31 +01:00
ChrisK2 e883c48caa assdraw: Properly approximate circle for rounded box
source: http://spencermortensen.com/articles/bezier-circle/
2014-12-05 19:37:31 +01:00
wm4 020897b5d3 ao_alsa: minor simplification
Whether we print it as warning or error doesn't really matter; we
continue anyway. (I don't actually know what the implications of running
in non-blocking mode are; for what's it worth, when I tested with
explicitly changing to non-blocking, it seemed to work fine anyway, so
don't change that part.)
2014-12-05 16:04:05 +01:00
wm4 c6deee3801 ao_alsa: hackfix mono playback
ALSA returns "FL" as channel layout when trying to play mono. mpv and
libavresample don't like this; in particular, using libavresample to
convert stereo to "FL" fails.
2014-12-05 16:04:05 +01:00
wm4 f95a4bceaa osc, dvd, bd: fix mouse state when changing menu modes
The flags weren't correctly set, and the mouse cursor remained visible
after leaving menu mode.

This was apparently broken in 0.7.0 too.

Fixes #1316.
2014-12-05 16:04:04 +01:00
Stefano Pigozzi 254c60e608 coreaudio: don't output too many channel descriptions
for #1279 and #1249
2014-12-05 12:35:34 +01:00
James Ross-Gowan b967e94589 Merge pull request #1314 from rossy/win-waf-gitignore
gitignore: ignore waf directory on Windows
2014-12-05 22:29:53 +11:00
James Ross-Gowan 3ee952fe89 gitignore: ignore waf directory on Windows
In native Windows, waflib is kept in /waf-1.8.4-* or /waf3-1.8.4-*
instead of /.waf-1.8.4-* and /.waf3-1.8.4-*
2014-12-05 21:51:16 +11:00
Stefano Pigozzi f5ac80ea88 coreaudio: add missing \n in log line 2014-12-05 09:57:40 +01:00
Stefano Pigozzi 8e6f3bef36 coreaudio: don't print layout a second time
For #1279
2014-12-05 09:57:06 +01:00
wm4 d6606bcfff ao_alsa: simplify, remove no-block suboption
If no-block was given, the device would be opened with SND_PCM_NOBLOCK.
Also, after opening, blocking mode was unconditionally enabled anyway
with snd_pcm_nonblock(). Further, if opening with SND_PCM_NOBLOCK
failed, opening was retried without this flag.

This doesn't make any sense to me, and I've never heard of someone using
this suboption. I suspect it has to do with ancient ALSA bugs or API
caveats. Remove it and simplify the code.
2014-12-05 01:23:09 +01:00
Stefano Pigozzi bc1b9aa984 cocoa: don't async redraw when waiting for VO redraw
This fixes the very annoying glitch where the black bars disappear for
a single frame when going fullscreen.
2014-12-04 22:53:50 +01:00
wm4 c1e97161f4 ao_alsa: try to fallback to "default" device if device is busy
ALSA is crap. It's impossible to make multichannel playback just do the
right thing. dmix (the default on most distros) can do stereo only, and
will refuse to play multichannel. On the other hand, if you try like mpv
(and mplayer) to open a multichannel device (like "surround51" etc.),
this will actually open a hardware device, which will either fail if
dmix is active, or block out dmix if opening succeeds.

This commit falls back to "default" (i.e. dmix) if opening a
multichannel device fails, which is a tiny step towards the right
behavior. (Although fixing it fully is impossible.)
2014-12-04 22:42:07 +01:00
wm4 e1788384cc demux: explicitly wake up playback thread on metadata change etc.
Probably doesn't matter much in practice.
2014-12-04 22:42:07 +01:00
wm4 b723cab19d demux: don't print message if replaygain tags were not found
Even thouhg it was printed in verbose mode only, it was annoying.
2014-12-04 22:42:07 +01:00
wm4 a4feecce4e discnav: remove redundant call
This was made the default a while ago.
2014-12-04 22:42:07 +01:00
wm4 c3d6f4b63b dvd, bd: don't unnecessarily block on demuxer/stream all the time
This was completely breaking any low-level caching. Change it so that at
least demuxer caching will work.

Do this by using the metadata cache mechanism to funnel through the menu
commands.

For some incomprehensible reason, I had to reorder the events (which
affects their delivery priority), or they would be ignored. Probably
some crap about the event state being cleared before it could be
delivered. I don't give a shit.

All this code sucks. It would probably be better to let discnav.c access
the menu event "queue" directly, and to synchronize access with a mutex,
instead of going through all the caching layers, making things
complicated and slow.
2014-12-04 22:42:07 +01:00
wm4 6e7942af50 input: add a hack to fix keyboard navigation with dvd/bd menu
If the user has LEFT/RIGHT/etc. bound in his input.conf, then these were
overriding the menu keys in dvdnav mode.

This hack works because the dvdnav crap happens to be the only user of
MP_INPUT_ON_TOP. If it finds a default key binding in the dvdnav menu
section, it will use that, instead of continuing search and possibly
finding the user key bindings meant for normal playback.
2014-12-04 22:42:06 +01:00
Stefano Pigozzi 4979f2f452 build: update to waf 1.8.4 2014-12-04 21:55:00 +01:00
Stefano Pigozzi 9faf482d89 coreaudio: reject descriptions with too many channels
This is a fix attempt for #1279 and #1249.
2014-12-04 21:51:06 +01:00
Stefano Pigozzi c070d16093 coreaudio: fix more layout prints 2014-12-04 21:51:03 +01:00
Stefano Pigozzi 4db97d3303 coreaudio: fix prints of uint32_t in log_layout 2014-12-04 21:33:38 +01:00
wm4 7aa91af8a7 dvd, bd, osc: disable OSC while a menu is active
They interfere.

It turns out that commit b6ca4a48 actually broke this in weird ways, but
this solution is better anyway.
2014-12-04 18:32:14 +01:00
wm4 231d5a32a9 build: showqscale was removed 2014-12-04 10:39:11 +01:00
wm4 44edb13443 video: remove things forgotten in previous commit
Oops.
2014-12-03 23:12:22 +01:00
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