Commit Graph

39802 Commits

Author SHA1 Message Date
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
wm4 4ce7a2ede9 vo_opengl: disable fancy-downscaling for anamorphic video
Includes some arbitrary minor refactoring.
2014-11-29 00:04:00 +01:00
wm4 3295caca3d lua: add a function that formats Lua values as strings
Yep, Lua is so crappy that the stdlib doesn't provide anything like
this.

Repurposes the undocumented mp.format_table() function and moves it to
mp.utils.
2014-11-29 00:03:46 +01:00
wm4 9666d48aa3 TOOLS/lua: add script that pauses playback when minimizing the window
Uses functionality that was added a month ago for exactly this purpose.

Fixes #1237.
2014-11-29 00:03:46 +01:00
wm4 a72a4b28a0 build: don't install some files if only libmpv is built
encoding-profiles.conf can be used by libmpv, but it won't load it
from this path by default, so exclude it as well.

Fixes #1293.
2014-11-29 00:03:42 +01:00
wm4 4af24daf2c win32: add screen offset when handling overlarge windows
MS Windows doesn't allow windows larger than the screen, so we include
a hack to make the window smaller. This hack recenters the window (what
else would it do?).

It didn't account for the virtual offset of the current screen, and it
was reported that it forces the window to the first screen.

Should fix #1292.
2014-11-28 22:11:54 +01:00
wm4 70630fb803 player: simplify and fix ordered chapter EOF handling
Ordered chapter EOF was handled as special-case of ending the last
segment. This broke --kee-open, because it set AT_END_OF_FILE in an
"inconvenient" place (after checking for --keep-open, and before the
code that exits playback if EOF is reached).

We don't actually need to handle the last segment specially. Instead, we
remain in the same segment if it ends. The normal playback logic will
recognize EOF, because the end of the segment "cuts off" the file.

Now timeline_set_from_time() never "fails", and we can remove the old
segment EOF handling code in mp_seek().
2014-11-28 22:07:46 +01:00
wm4 9a3333e765 demux_mkv: remove ancient codec mapping leftovers
All of this is basically due to how MPlayer's codecs.conf worked. It
had a demuxer-interface based an AVI, using FourCCs and data structures
found in AVI. FourCCs were used to map streams to decoders. For codecs
not supported by AVI, "MPlayer internal" FourCCs were made up.

codec_tags.c is there to bridge demuxers written against the old API to
the mpv one. By now, only demux_mkv.c needs this (because demux_mkv is
the only serious demuxer left - preferably, we should use libavformat
for mkv too, but I can't see this happening any time soon, because
libavformat _still_ doesn't support segment linking). But the codec
tables are full of weird stuff automatically extracted from the old
codecs.conf tables. Most of it isn't needed for mkv.

Remove all custom tags, readd those used by demux_mkv.c internally
(see vinfo and mkv_audio_tag tables). The rest is handled by the
tables provided by libavformat, which includes AVI and QT tags.
2014-11-28 20:54:51 +01:00
Kevin Mitchell 77f675a151 ao/wasapi: handle VistaBlob failure more gracefully 2014-11-28 10:52:48 -08:00
Kevin Mitchell b83e447e2b ao/wasapi: remove unnecessary check of audio thread input
it would have caused a deadlock if it fired anyway.
2014-11-28 10:52:48 -08:00
Kevin Mitchell b0854bc42c ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size 2014-11-28 10:52:48 -08:00
Kevin Mitchell 8908b80b77 ao/wasapi: more missed cleanup on failure 2014-11-28 10:52:43 -08:00
Kevin Mitchell 7b5baf3b53 ao/wasapi: check return values
Only issue a warning for failure of wasapi_enumerate_devices and
wasapi_fill_VistaBlob.
2014-11-28 10:52:12 -08:00
Kevin Mitchell 14f9719a65 ao/wasapi: make functions return bool that were acting like it
this involved inverting the logic of find_formats, enumerate_devies
and wasapi_fill_VistaBlob. The latter two were trivial as their return
values were not actually checked (to be fixed in a later
commit).
2014-11-28 10:48:36 -08:00
Kevin Mitchell 4f208e6f68 ao/wasapi: check full GUID of KSDATAFORMAT to determine float 2014-11-28 10:48:36 -08:00
Kevin Mitchell 239c880fe2 ao/wasapi: expose GUID and PKEY convenience functions
Give them the prefix mp_ and make them nonstatic.
2014-11-28 10:48:36 -08:00
Kevin Mitchell e2bc1c5f17 ao/wasapi: remove unused variable 2014-11-28 10:48:36 -08:00
Kevin Mitchell fb5d88a287 ao/wasapi: safely define PKEY constants
Before these definitions were incorrectly guarded by and #ifdef
but since they aren't macros, this would never be true so that
if they were ever added to mingw headers we would have problems.

rename KSDATAFORMAT constants with the same mp prefix for consistency.
also use DEFINE_GUID rather than defining the bare structure
2014-11-28 10:48:36 -08:00
Kevin Mitchell 81464780e9 ao/wasapi: avoid redundant passing of ao and wasapi_state as arguments
also drop some useless const declaraitons
2014-11-28 10:48:36 -08:00
Kevin Mitchell 3b0b89c0af ao/wasapi: just return 0 unconditionally from the thread
We weren't actually checking this value anyway. We only really
cared about init failure, which was checked another way.
2014-11-28 10:48:36 -08:00
Kevin Mitchell d40c0d4f90 ao/wasapi: fix unmatched CoUninitialize() on init failure 2014-11-28 10:48:36 -08:00
Kevin Mitchell d0c37f0731 ao/wasapi: more debugging messages 2014-11-28 10:48:07 -08:00
Kevin Mitchell ecb491fd95 ao/wasapi: simplify the init retry 2014-11-28 08:02:16 -08:00