summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* path: make mp_path_join accept normal C stringswm42015-05-0918-28/+34
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* lua: remove deprecated "lua" sub directorieswm42015-05-092-29/+9
| | | | | The compatibility code and the deprecation warning were at least in releases 0.8 and 0.9 - time to get rid of them.
* path: unify the two config file lookup functionswm42015-05-091-83/+60
| | | | | | | | | | | 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.
* vo_drm: allow changing video rectangle settingswm42015-05-081-0/+6
| | | | | | | | | 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.
* vo_drm: don't mutate the current frame when clamping for panscanwm42015-05-081-3/+4
| | | | | | 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.
* input: filter out redundant mp_input_set_mouse_pos() callswm42015-05-081-1/+3
| | | | Prevents the OSC from showing up on start on Cocoa.
* player: add --force-window=immediate modewm42015-05-083-3/+8
| | | | | | | 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.
* audio: simplify furtherwm42015-05-083-28/+11
| | | | | | 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.)
* audio: remove mp_chmap_contains()wm42015-05-083-36/+0
| | | | It's unsued now.
* ao: log reordered versions of channel mapswm42015-05-081-3/+10
| | | | Useful for debugging cases when no standard orders are used.
* audio: redo channel map fallback selectionwm42015-05-082-60/+34
| | | | | | | | | | | | | | | | | | | | 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.
* audio: add chmap utility functionwm42015-05-082-0/+10
|
* test: simplify chmap_sel testswm42015-05-081-121/+44
|
* ao_alsa: log requested numbers of channels if ALSA rejects themwm42015-05-081-2/+3
|
* audio: fix messed up assert()wm42015-05-071-1/+1
| | | | This made no sense and always evaluated to true.
* audio: remove UNKNOWN pseudo speakerswm42015-05-073-14/+9
| | | | | | 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.
* audio: define only a single NA speaker IDwm42015-05-075-34/+16
| | | | | Remove the requirement from mp_chmap that speaker entries must be unique. Use this to get rid of all the redundant NA speaker IDs.
* player: use profiles for libmpv and encoding defaultswm42015-05-073-24/+34
| | | | | | | | 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).
* m_config: make m_config_set_profile() use a namewm42015-05-073-13/+18
| | | | Is simpler and avoids exposing profile structs to a degree.
* DOCS: add a link to LIRC wiki entrywm42015-05-071-0/+1
|
* ao_coreaudio_utils: don't list some formats as "unusable"wm42015-05-071-1/+1
| | | | | While mpv has no internal equivalent representation, they can still be used as physical CoreAudio formats. Thus this label is confusing.
* ytdl_hook: Escape EDL URLsChrisK22015-05-071-1/+3
| | | | | Should prevent the EDL parser from tripping over = and , in the URL.
* ao_sndio: add notice about padding channelswm42015-05-061-1/+3
| | | | (I won't do this, but someone else seeing this might.)
* ao_alsa: use new padding channels supportwm42015-05-061-21/+26
| | | | | | | | | | | | 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.
* ao_alsa: move ALSA -> mp channel map to a functionwm42015-05-061-11/+18
| | | | | One side effect is that the warning about too many channels goes away, and is replaced with printing the ALSA channel map as "unknown".
* manpage: do not use deprecated syntax in examplewm42015-05-061-1/+1
|
* cocoa: remove an unused parameterwm42015-05-063-3/+3
|
* ao_coreaudio_exclusive: check new format before waiting for changewm42015-05-061-12/+13
| | | | | It seems if the format was already set, setting the same format will not cause a property change.
* ao_coreaudio_exclusive: use atomics instead of volatilewm42015-05-061-19/+16
| | | | | | | | | | | 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).
* ao_coreaudio_exclusive: rename "digital" -> "compressed"wm42015-05-061-22/+20
| | | | PCM is digital too.
* ao_coreaudio_exclusive: explicitly check for spdif formatswm42015-05-061-8/+5
|
* ao_coreaudio_exclusive: merge init_digital() functionwm42015-05-061-15/+3
| | | | | | 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.
* cocoa: lock cocoa main thread on uninitwm42015-05-061-1/+9
| | | | | | | | | | | | | | | | | | 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.
* ao_coreaudio_utils: decide formats by comparing raw bitswm42015-05-051-5/+6
| | | | | | | | | | | | | | | | 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.
* ao_coreaudio: log considered physical formatswm42015-05-051-0/+4
|
* ao_coreaudio: restore old physical format if format was changedwm42015-05-051-0/+16
|
* af: don't attempt to remove last filter for spdif filter removalwm42015-05-051-1/+1
| | | | | | | | | | | | | | | Some time ago, a mechanism was added for automatically removing PCM-only filters if the input format is spdif. This could cause an infinite loop if the AO did not support spdif, but was falling back to some PCM format. Then this code tried to remove the last filter, which is a dummy filter for receiving and queuing filter output. af_remove() simply fails gracefully in this case, so this happens over and over again. Fix by explicitly checking whether the filter to remove is a dummy filter. (af_remove() also fails only if the dummy filters are attempted to be removed - checking this directly is simpler.)
* audio: minor cosmeticswm42015-05-051-16/+16
| | | | | These ( ) were probably not removed when the format constants were changed from defines to an enum.
* ao_coreaudio: move channel mapping code to a separate filewm42015-05-054-255/+298
| | | | | | | | | | Move all of the channel map retrieval/negotiation code to a separate file. This will (probably) be helpful when extending ao_coreaudio_exclusive.c. Nothing else changes, other than some minor cosmetics and renaming, and changing some details for decoupling it from the ao_coreaudio.c internals.
* ao_coreaudio_utils: don't require talloc for fourcc_repr()wm42015-05-053-17/+13
| | | | | Instead, apply a trick to make the caller allocate enough space on the stack.
* ao_coreaudio_utils: unbreak default device selectionwm42015-05-051-4/+3
| | | | | | It appears this is the reason coreaudio-exclusive does not work without explicitly specifying a device, even if the default device maps to something passthrough-capable.
* ao_coreaudio_exclusive: fix latency calculation non-sensewm42015-05-051-1/+1
| | | | Didn't use the properties it was supposed to use.
* ao_coreaudio_utils: refine format selectionwm42015-05-051-19/+25
| | | | | | | | | | | Instead of always picking a somehow better format over the previous one, select a format that is equal to or better the requested format, but is also reasonably close. Drop the mFormatID comparison - checking the sample format handles this already. Make sure to exclude channel counts that can't be used.
* ao_coreaudio: change physical format before channel negotiationwm42015-05-051-4/+10
| | | | | | If for example the physical format is set to stereo, the reported multichannel layout will actually be stereo. It fixes itself only after the physical format is changed.
* vo_opengl: change default FBO formatwm42015-05-052-3/+3
| | | | | | | | Reduces (but likely does not remove) the danger of rounding intermediate values down to 8 bit. This is important for cscale, or any other processing that might store raw YUV values in framebuffers. Fixes #1918.
* manpage: fix typowm42015-05-051-1/+1
|
* ao_coreaudio: add an option for changing the physical formatwm42015-05-052-0/+63
| | | | | | | | | | | | ao_coreaudio uses AudioUnit - the OSX software mixer. In theory, it supports multichannel audio just fine. But in practice, this might be disabled by default, and the user is supposed to select a multichannel base format in the "Audio MIDI Setup" utility. This option attempts to change this setting automatically. Some possible disadvantages and caveats are listed in the manpage additions. It is off by default, since changing this might be rather bad behavior for a normal application.
* ao_coreaudio_utils: add a format negotiation helper functionwm42015-05-052-0/+37
|
* af_lavrresample: remove dead undefswm42015-05-051-3/+0
|
* ipc: silence some common info messageswm42015-05-051-3/+3
| | | | | | They are not really interesting. At least one user complained about the noise resulting from use with shell scripts, which connect and disconnect immediately.
* ao_coreaudio: support padded channel layoutswm42015-05-051-2/+6
| | | | | | | If for example the audio settings are set to 5.1 output, but the hardware does 8 channels natively (HDMI), the reported channel layout will have 2 dummy channels. To avoid falling back to stereo, we have to write audio in this format to the device.
* audio: introduce support for padding channelswm42015-05-053-56/+142
| | | | | | | | | | | | | | | | | | | Some audio APIs explicitly require you to add dummy channels. These are not rendered, and only exist for the sake of the audio API or hardware strangeness. At least ALSA, Sndio, and CoreAudio seem to have them. This commit is preparation for using them with ao_coreaudio. The result is a bit messy. libavresample/libswresample don't have good API for this; avresample_set_channel_mapping() is pretty useless. Although in theory you can use it to add and remove channels, you can't set the channel counts. So we do the ordering ourselves by making sure the audio data is planar, and by swapping the plane pointers. This requires lots of messiness to get the conversions in place. Also, the input reordering is still done with the "old" method, and doesn't support padded channels - hopefully this will never be needed. (I tried to come up with cleaner solutions, but compared to my other attempts, the final commit is not that bad.)
* audio: introduce mp_audio readonly bitwm42015-05-042-1/+3
| | | | Convenience for the following commit.
* audio: chmap: explicitly drop channels not supported by lavcwm42015-05-041-2/+5
| | | | Basically as before, but avoid undefined behavior.
* audio: drop unused functionwm42015-05-042-10/+0
|
* ao_coreaudio: fix out of bounds accesswm42015-05-041-0/+2
| | | | | | ca_label_to_mp_speaker_id() checked whether the last entry was >= 0, but actually this condition was never true, and MP_SPEAKER_ID_UNKNOWN0 is not negative.
* subprocess-win: use the correct pipe namespaceJames Ross-Gowan2015-05-041-1/+1
| | | | | | This was a mistake, it should definitely be using the device namespace rather than the file namespace. As it says in the docs, all pipe names must start with \\.\pipe\
* sws_utils: re-use avcolorspace for sws colorspacesNiklas Haas2015-05-041-6/+3
| | | | | This lets us avoid having to maintain two separate copies of the colorspace mapping functions.
* win32: fix desktop directorywm42015-05-031-1/+1
| | | | The folder argument wasn't used, so it always returned the APPDATA dir.
* vo_opengl: gl_lcms: fix cache dir creation with path expansionwm42015-05-031-9/+9
| | | | | | Path expansion (like "~/dir/" in config file) was used inconsistently, so the cache directory wasn't always created correctly. Fix this by moving the path expansion from load_file() to its callers.
* path: start special espansion with ~~name instead of ~namewm42015-05-033-11/+11
| | | | | | | Since commit 7381db60, strings like "~desktop/" were expanded as platform-specific paths by mpv. Apparently this similarity to standard Unix shell expansion caused confusion, so change it to "~~desktop/". The shell doesn't expand this, so it should be better.
* options: fix typo in variable namewm42015-05-033-3/+3
|
* options: remove --leak-reportwm42015-05-023-17/+4
| | | | Use the environment variable instead.
* win32: move platform specifics to osdepwm42015-05-022-25/+28
| | | | | This will probably disable this code for Cygwin. I don't know if this matters, since Cygwin should strictly behave like a Unix anyway.
* build: move main-fn files to osdepwm42015-05-0211-29/+31
| | | | | | And split the Cocoa and Unix cases. Simplify the Cocoa case slightly by calling mpv_main directly, instead of passing a function pointer. Also add a comment explaining why Cocoa needs a special case at all.
* cocoa: always compile OSX application code with cocoawm42015-05-027-26/+20
| | | | | | | | | | | | | | This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case.
* player: handle hotplug events in idle mode toowm42015-05-021-0/+1
|
* screenshots: create screenshot dirwm42015-05-022-2/+5
| | | | Minor user convenience.
* vo_opengl: gl_lcms: create cache dirwm42015-05-021-0/+2
| | | | Minor user convenience.
* vo_opengl: gl_lcms: make sure win32 unicode fopen() wrapper is enabledwm42015-05-021-0/+2
|
* vo_opengl: gl_lcms: minor simplificationwm42015-05-021-2/+1
|
* vo_opengl: gl_lcms: use mp_path_join()wm42015-05-021-3/+3
| | | | | | | Maybe this fixes the win32 problems a user had, or maybe not. Also, check if cache_dir is set at all. An empty string should be equivalent to "unset".
* path: update path descriptionswm42015-05-021-1/+2
|
* path: fix user path resolutionwm42015-05-011-2/+2
| | | | Forgot to add the remainder to the path.
* manpage: fix typowm4</