Commit Graph

41256 Commits

Author SHA1 Message Date
wm4 a7ecb11ddd cocoa: remove unused macro 2015-05-11 22:56:15 +02:00
wm4 4858c47e1c Always block SIGPIPE globally
OpenSSL and GnuTLS are still causing this problem (although FFmpeg could
be blamed as well - but not really). In particular, it was happening to
libmpv users and in cases the pseudo-gui profile is used. This was
because all signal handling is in the terminal code, so if terminal is
disabled, it won't be set. This was obviously a questionable shortcut.

Avoid further problems by always blocking the signal. This is done even
for libmpv, despite our policy of not messing with global state.

Explicitly document this in the libmpv docs. It turns out that a version
bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so
document that change as part of 1.16.
2015-05-11 17:38:35 +02:00
wm4 a5aa58c63c TOOLS/stats-conv.py: add another event type 2015-05-11 17:20:30 +02:00
rrooij 47ee67b8a2 DOCS/man/options.rst: Remove trailing whitespaces 2015-05-10 12:36:55 +02:00
rrooij 5d7468a06e DOCS/man/opions.rst: Elaborate on --no-video
When --no-video is set, the ytdl-format is set to "bestaudio/best". This
wasn't documented in the man page yet.
2015-05-10 12:30:24 +02:00
wm4 9438f811ae ytdl_hook: remove tabs
We don't allow tabs in normal source code.
2015-05-09 21:41:44 +02:00
wm4 27f7489adc build: exclude -Wredundant-decls
It's useless, and creates a bogus warning in subprocess-posix.c.

Since I don't know which compilers might have it by default, just change
it to -Wno-redundant-decls.
2015-05-09 19:59:52 +02:00
wm4 0f063a5011 old-configure: hide
It shouldn't be used, but it's still in the repo because I say so.
2015-05-09 19:55:11 +02:00
wm4 1f389b05fc old-configure: bump libbluray version
Fixes #1927.
2015-05-09 19:50:13 +02:00
wm4 5fe2c19029 player: reuse a function
This has the side-effect that now all encoding-profiles.conf files are
loaded. It's not clear if not doing this was intended or not.
2015-05-09 16:48:08 +02:00
wm4 e9963139da path: improve verbose logging 2015-05-09 16:48:08 +02:00
wm4 6d93dd8969 path: use mp_path_join in one more place 2015-05-09 16:48:08 +02:00
wm4 b6346cd0ba player: make resuming playlists less noisy in verbose mode
mp_find_config_file() will print the filename lookup and its result in
verbose mode. This is wanted, but gets inconvenient when it is done for
every playlist entry (for resuming).

Lookup the watch_later subdir only once and cache the result instead.

This drops the logic for loading the resume file from other locations,
which should generally be unnecessary, though might lead to confusion if
the user has mixed old and new config paths (which the user shouldn't).

Also add a mp_find_user_config_file() function for a more
straightforward and reliable way to get actual local configpaths,
instead of possibly global and unwritable locations.

Also, for symmetry, check the resume option in mp_load_playback_resume()
just like mp_check_playlist_resume() does.
2015-05-09 16:48:05 +02:00
wm4 34ee78f2cb player: avoid undefined behavior when resumign DVD/BD playback
These device options can be NULL, and NULL can't be passed for %s.
2015-05-09 15:37:05 +02:00
wm4 04c02796bd path: make mp_path_join accept normal C strings
Instead of bstr. Most callers of this function do not need bstr. The
bstr version of this function is now mp_path_join_bstr().
2015-05-09 15:26:47 +02:00
wm4 40997b8ae5 lua: remove deprecated "lua" sub directories
The compatibility code and the deprecation warning were at least in
releases 0.8 and 0.9 - time to get rid of them.
2015-05-09 15:04:05 +02:00
wm4 2263f37dfb path: unify the two config file lookup functions
Share most of the implementation of config file lookup between
mp_find_all_config_files() and mp_find_config_file().

Also move the check for config path overrides to mp_get_platform_path()
directly. From the point of view of config file lookup, this is a bit
stupid, but on the other hand increases consistency, as user path
resolution exposes the mp_get_platform_path() functionality directly to
the user.
2015-05-09 13:57:55 +02:00
wm4 5631060569 vo_drm: allow changing video rectangle settings
Now among other things panscan can be changed during playback.

Unfortunately, it flickers. The issue is that reconfig() clears the
framebuffer. Removing the clearing shows that the "unused" parts of
the picture are not cleared - even though OSD could render there. As
such, this is a separate issue.
2015-05-08 22:38:42 +02:00
wm4 859ddc9906 vo_drm: don't mutate the current frame when clamping for panscan
When running with --panscan=1, this could crash - because the current
frame was reduced in size each time the image was redrawn, which would
result in a failed assertion the second time it's drawn.
2015-05-08 22:36:04 +02:00
wm4 51120c9c7f input: filter out redundant mp_input_set_mouse_pos() calls
Prevents the OSC from showing up on start on Cocoa.
2015-05-08 22:00:24 +02:00
wm4 f9e2d5026e player: add --force-window=immediate mode
This creates the window before the first file is loaded. This was
requested a bunch of times, but on the other hand a change to make this
behavior the default was reverted some time ago, because other users
hated it.
2015-05-08 21:47:39 +02:00
wm4 00130651da audio: simplify further
Drop mp_chmap_diff() (which is unused too now), and implement
mp_chmap_diffn() in a slightly simpler way. (Too bad there is no
standard function for counting set bits.)
2015-05-08 21:22:39 +02:00
wm4 8d5924f2c9 audio: remove mp_chmap_contains()
It's unsued now.
2015-05-08 21:14:23 +02:00
wm4 8b7035c8ff ao: log reordered versions of channel maps
Useful for debugging cases when no standard orders are used.
2015-05-08 19:45:16 +02:00
wm4 3560a50029 audio: redo channel map fallback selection
Instead of somehow having 4 different cases with each their own weight,
do it with a single function that decides which channel layout is the
better fallback.

This is simpler, and also introduces new (fixed) semantics. The new test
added to test/chmap_sel.c actually works now. This is a mixed case with
no perfect upmix or downmix, but the better choice is the one which
loses the least channels from the original layout.

One test also changes. If the input is 7.1(wide-side), and the available
layouts are 7.1 and 5.1(side), the latter is now chosen instead of the
former. This makes sense: both layouts contain 6 out of 8 channels from
the original layout, but the 5.1(side) one is smaller. This follows the
general logic. The 7.1 layout has FLC/RLC speakers instead of BL/BR,
and judging by the names, "front left center" is completely different
from "back left". If these should be exchangeable, a separate exception
would have to be added.
2015-05-08 19:33:17 +02:00
wm4 d32b71d52e audio: add chmap utility function 2015-05-08 19:33:08 +02:00
wm4 5142b0e3f3 test: simplify chmap_sel tests 2015-05-08 19:29:46 +02:00
wm4 ad9bce2a5c ao_alsa: log requested numbers of channels if ALSA rejects them 2015-05-08 14:24:20 +02:00
wm4 7b09654c33 audio: fix messed up assert()
This made no sense and always evaluated to true.
2015-05-07 23:26:33 +02:00
wm4 55e777f10b audio: remove UNKNOWN pseudo speakers
Reuse MP_SPEAKER_ID_NA for this. If all mp_chmap entries are set to NA,
the channel layout has special "unknown channel layout" semantics, which
are used to deal with some corner cases.
2015-05-07 23:20:06 +02:00
wm4 b91b4944bd audio: define only a single NA speaker ID
Remove the requirement from mp_chmap that speaker entries must be
unique. Use this to get rid of all the redundant NA speaker IDs.
2015-05-07 23:07:14 +02:00
wm4 3477088741 player: use profiles for libmpv and encoding defaults
The client API (libmpv) and encoding (--o) have slightly different
defaults from the command line player. Instead of doing a bunch of calls
to set the options explicitly, use profiles. This is simpler and has the
advantage that they can be listed on command line (instead of possibly
forcing the user to find and read the code to know all the details).
2015-05-07 21:26:11 +02:00
wm4 036a49478f m_config: make m_config_set_profile() use a name
Is simpler and avoids exposing profile structs to a degree.
2015-05-07 21:03:14 +02:00
wm4 b12ca2b980 DOCS: add a link to LIRC wiki entry 2015-05-07 21:03:06 +02:00
wm4 1bcb82ec93 ao_coreaudio_utils: don't list some formats as "unusable"
While mpv has no internal equivalent representation, they can still be
used as physical CoreAudio formats. Thus this label is confusing.
2015-05-07 20:55:00 +02:00
ChrisK2 6a0a67034d ytdl_hook: Escape EDL URLs
Should prevent the EDL parser from tripping over = and , in the
URL.
2015-05-07 20:41:46 +02:00
wm4 cd5ab98ff9 ao_sndio: add notice about padding channels
(I won't do this, but someone else seeing this might.)
2015-05-06 21:48:40 +02:00
wm4 85fc6b2a05 ao_alsa: use new padding channels support
Sometimes, ALSA will return channel layouts with padded channels (NA
speakers). Use them instead of failing.

This still includes the old "braindeath" code to retry with a layout
without NA channels. This might be helpful for performance, and also the
padded channel layout string looks confusing.

To be fair, I have not encountered a case yet which would really need
this, and for which the old "braindeath" code did not fix it.
2015-05-06 21:48:40 +02:00
wm4 d577872a28 ao_alsa: move ALSA -> mp channel map to a function
One side effect is that the warning about too many channels goes away,
and is replaced with printing the ALSA channel map as "unknown".
2015-05-06 21:48:40 +02:00
wm4 9434aa75b2 manpage: do not use deprecated syntax in example 2015-05-06 21:48:39 +02:00
wm4 f58d3591d9 cocoa: remove an unused parameter 2015-05-06 21:48:39 +02:00
wm4 0ae0e90eb5 ao_coreaudio_exclusive: check new format before waiting for change
It seems if the format was already set, setting the same format will
not cause a property change.
2015-05-06 21:48:39 +02:00
wm4 4444ff48fa ao_coreaudio_exclusive: use atomics instead of volatile
volatile barely means anything.

The polling is kind of bad too, but relatively harmless as device
opening/closing is a rare event, and the format change is not expected
to take long.

Remove the pointless talloc call too (must have been a leftover
from previous refactoring).
2015-05-06 21:48:36 +02:00
wm4 028739932b ao_coreaudio_exclusive: rename "digital" -> "compressed"
PCM is digital too.
2015-05-06 18:54:53 +02:00
wm4 1e1045b13e ao_coreaudio_exclusive: explicitly check for spdif formats 2015-05-06 18:51:31 +02:00
wm4 32bc61ae07 ao_coreaudio_exclusive: merge init_digital() function
No reason to keep them separate. It's an artifact from the old
ao_coreaudio.c, which kept usage of two different APIs in the same file.
Removes a forward reference too.
2015-05-06 18:46:51 +02:00
wm4 e777756301 cocoa: lock cocoa main thread on uninit
This should fix some crashes due to dangling pointers.

The problem was that with_cocoa_lock_on_main_thread() is asynchronous.
It will not wait until it is finished. In the uninit case, this means
the VO could be deallocated and destroyed while cocoa was still running
uninit code.

So simply wait until it is done by using dispatch_sync(). There were
concerns that this could introduce a deadlock by the main thread trying
to wait for something on the VO thread. But from what I can see, this
never happens, and even if it does, it would crash anyway since the VO
is already gone.

One remaining worry is the video_resize_redraw_callback. From what I can
see, it still can mess things up, and will need a more elaborate fix.
2015-05-06 00:36:33 +02:00
wm4 4ffcf2531b ao_coreaudio_utils: decide formats by comparing raw bits
Instead of trying to use af_format_conversion_score() (which tries to be
all kinds of clever), just compare the raw bits as a quality measure. Do
this because otherwise, weird formats like padded 24 bit formats will be
excluded, even though they might be the highest precision formats for
some hardware.

This means that for now, the user would have to check whether the format
is usable at all before calling ca_asbd_is_better(). But since this is
currently only used for ao_coreaudio.c and for the physical format, it
doesn't matter.

If coreaudio-exclusive should get PCM support, the best would be to
revert this change, and to add support for 24 bit formats directly.
2015-05-05 22:10:33 +02:00
wm4 656703e279 ao_coreaudio: log considered physical formats 2015-05-05 22:09:44 +02:00
wm4 86d65c80e1 ao_coreaudio: restore old physical format if format was changed 2015-05-05 22:09:39 +02:00