summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_lavf: by default probe info for HLS againwm42017-06-121-1/+1
| | | | | | | | | | | | | This switches back the --demuxer-lavf-probe-info default for HLS from "no" to "yes". Apparently the old default caused problems with the FFmpeg MediaCodec wrapper. I'm not sure whether it's due to the extradata (which would not make any sense as MediaCodec takes in Annex B formatted h264 data), or something else. Reportedly, enabling probing fixes it though, so enable it again. Add disparaging comment about Google software/APIs here.
* options: change license of most files to LGPL (except options.c/.h)wm42017-06-129-56/+63
| | | | | | | | | | | | | | | | | | | | | | | All authors of the current code have agreed (as far as this commit requires). options.c/options.h will take more effort, because it contains all the option declarations, and thus is touched extremely often. m_option.c is technically still GPL, because of commit 2c82d5a1d85378dd0 (michael has agreed to LGPL, but only once the core of mpv is LGPL). The geometry parsing code in m_option.c was originally by someone who could not be reached. However, it was heavily rewritten anyway, and only the syntax remains (i.e. not copyright-relevant). parse_commandline.c contains a change by "adland" (commit 1d0ac71ae8ba), who could not be reached - this this specific part is GPL only. Fortunately, it matters only for DVD (and even then is more like a hack, but whatever). There are some other relevant changes, but they have all been reverted, moved somewhere else, deleted, or replaced.
* m_option: revert commit 2793a70e0fb3wm42017-06-121-3/+2
|
* mpv.rc, mpv.exe.manifest: change license to LGPLwm42017-06-122-11/+9
| | | | | | | | | All authors have agreed. mpv.exe.manifest probably can't have a copyright header, so it doesn't. These files don't add license info to the executables. And of course the executable license is still GPL.
* m_property: change license to LGPLwm42017-06-123-15/+15
| | | | All involved authors have agreed.
* path: change license to LGPLwm42017-06-123-26/+21
| | | | | | | | The history goes back to 2001 or so, but everyone involved with still existing code has agreed. One person who could not be reached yet (elevengu) has changes in this, which as far as I can tell were overwritten anyway at a later point.
* vo_opengl: change default tone mapping algorithmNiklas Haas2017-06-101-1/+1
| | | | | d8a3b10f4 was supposed to change this (as reflected in the man page and commit message), I just forgot.
* scripting: expand --script filename for C pluginsHoyon Mak2017-06-092-6/+7
|
* vo_opengl: add new HDR tone mapping algorithmNiklas Haas2017-06-094-4/+41
| | | | | | | | | | | | | | | | | I call it `mobius` because apparently the form f(x) = (cx+a)/(dx+b) is called a Möbius transform, which is the algorithm this is based on. In the extremes it becomes `reinhard` (param=0.0 and `clip` (param=1.0), smoothly transitioning between the two depending on the parameter. This is a useful tone mapping algorithm since the tunable mobius transform allows the user to decide the trade-off between color accuracy and detail preservation on a continuous scale. The default of 0.3 is already far more accurate than `reinhard` while also being reasonably good at preserving highlights, without suffering from the overall brightness drop and color distortion of `hable`. For these reasons, make this the new default. Also expand and improve the documentation for these tone mapping functions.
* ytdl_hook: don't override start time set by saved stateMartin D2017-06-091-1/+7
| | | | This affects resuming playback from a watch_later directory so that you can resume playback even for URLs that have a start parameter.
* mp_image: refuse to convert frames of unknown format to AVFramewm42017-06-081-0/+2
| | | | | This could happen with some "special" hwaccel formats, that exist in mpv, but not libavutil.
* d3d: add support for new libavcodec hwaccel APIwm42017-06-0812-13/+399
| | | | | | Unfortunately quite a mess, in particular due to the need to have some compatibility with the old API. (The old API will be supported only in short term.)
* m_option: fix leaks with OPT_KEYVALUELIST optionswm42017-06-081-0/+3
| | | | | For example, specifying --script-opts multiple times could leak some data.
* ytdl_hook: don't override user-set start timeRicardo Constantino2017-06-081-1/+2
|
* vo_drm: fallback to vo_wait_default if VT switcher is not availablerslovers2017-06-081-0/+2
| | | | | | | | | | | | | | | | | | | When the drm video output is used under VT with a terminal multiplexer like screen, the VT_SETMODE ioctl call will fail since the controlling terminal is a pseudoterminal instead of a real one, thus the VT switcher will be unavailable. The problem is, the wait_events function inside vo_drm.c will test for this, and will do nothing if the switcher is not active. Normally, this would not be noticed, however, when you pause a video, or if you're playing multiple image files, mpv will suddenly start busy waiting on a single core. I confirmed this by building mpv with gprof support, in a few seconds, wait_events got called about 90 million times. So I added a fallback, when the VT switcher is not availble, just use the vo_wait_default function. I tested it and it's working well so far.
* options: another missed --sub-ass-style-override usewm42017-06-071-1/+1
| | | | Dammit.
* build: enable cplugins by defaultwm42017-06-071-1/+1
| | | | | | | | | | There's probably no reason to keep this disabled. The -rdynamic (and the approach we use) is probably a bit scary, but should not break anything. Just to be sure I'm hard-disabling this on win32 anyway. We know it can't work there in its current form. Fixes #4491.
* options: fix some missing --sub-ass-style-override renameswm42017-06-072-2/+2
| | | | | The option was renamed not to include "-style", but not all uses were updated.
* demux_lavf: disable various other special behavior if hacks disabledwm42017-06-071-1/+2
| | | | | | This affects in particular the heuristic that enables byte seeks in some cases with .ts input. --demuxer-lavf-hacks=no should disable this behavior now.
* options: slight cleanup of --sub-ass-style-overrideNiklas Haas2017-06-074-22/+28
| | | | | | | | | | | | | | | | | | List of changes: 1. Rename `signfs` to `scale`, to better match what it actually does (force --sub-scale to apply to ASS subtitles), and fix the blatantly wrong documentation (it actually specifically does *not* apply to signs) 2. Rename `--sub-ass-style-override` to `--sub-ass-override` to help reduce confusion between it and `--sub-ass-force-style`, as well as pointing out that it doesn't necessarily actually override styles. (The new `scale` option, for example, only sets ASS_OVERRIDE_BIT_FONT_SIZE, but not ASS_OVERRIDE_BIT_STYLE) 3. Mention that `--sub-ass-override` is generally sort of smart about only overriding dialog, not signs.
* encoding-profiles.conf: add faststart to enc-f-mp4Ricardo Constantino2017-06-061-1/+3
| | | | | | | | | Usually a good idea to do this when encoding to mp4, but it's commented since usefulness is arguable nowadays. Equivalent to running qt-faststart tool on the resulting mp4. Adds a bit of delay at the end of encoding.
* options: change --sub-fix-timing defaultwm42017-06-062-5/+4
| | | | | | Why? Better than wasting time by arguing with idiots. Fixes #4484.
* demux_mkv: remove incorrect commentwm42017-06-031-1/+0
| | | | | | | | | | | In the previous commit, I claimed that this GUID stuff was a libavformat extension, but that seems to be completely wrong. (LATM might be an extension of some kind, though.) I don't know what Microsoft calls this GUID "suffix" though. It's generally used to wrap wav format tags and video FourCCs as GUIDs. I guess you could grep Microsoft headers for it to find its name, or something.
* demux_mkv: support FFmpeg A_MS/ACM extensionswm42017-06-032-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | Indeed, FFmpeg found a way to maximize the misery around VfW/AVI-style muxing. It appears it can mux a number of random codecs by using random format tags. To make this even more stranger, it has a probably custom GUID for signaling them, although for unknown reasons this is done only "sometimes" (judging from FFmpeg's riffenc.c). Whatever, it's not too hard to support it. Also apparently fix the incorrect interpretation of extended formats - there's absolutely no reason to assume they're always PCM. Instead, check for the correct GUIDs. Also while we're at it, move the channel mask handling also to codec_tag.c, so all WAVEFORMATEXTENSIBLE handling is in one place. (With the normal wav header handling strangely still in demux_mkv.c.) The case I was looking at (aac_latm muxing) decodes now. While I'm not entirely sure about its correctness (libavformat has a weird special-case for SBR), it certainly doesn't try to play it as PCM, which is much of an improvement. The extradata mess in the demux_mkv.c A_MS/ACM code path is unfortunate and ugly, but has less impact than refactoring all the code to make this specific case nicer. Did I mention yet that I hate VfW-style mkv muxing?
* vo_opengl: hwdec_cuda: Support separate decode and display devicesPhilip Langdale2017-06-035-12/+66
| | | | | | | | | | | | | | | | | In a multi GPU scenario, it may be desirable to use different GPUs for decode and display responsibilities. For example, if a secondary GPU has better video decoding capabilities. In such a scenario, we need to initialise a separate context for each GPU, and use the display context in hwdec_cuda, while passing the decode context to avcodec. Once that's done, the actually hand-off between the two GPUs is transparent to us (It happens during the cuMemcpy2D operation which copies the decoded frame from a cuda buffer to the OpenGL texture). In the end, the bulk of the work is around introducing a new configuration option to specify the decode device.
* README: add example compilation commandswm42017-06-021-0/+7
| | | | Not sure if that helps.
* af, vf: improvements to libavfilter bridgewm42017-05-316-5/+28
| | | | | | Add the "lavfi-" prefix (details see manpage additons). Tag the filter name as "(lavfi)" in the verbose filter list output.
* external_files: parse ~ in --{sub,audio}-pathsrr-2017-05-311-3/+7
|
* OSD message: "Drop files or URLs to play here."nodiscc2017-05-311-1/+1
| | | | Add "or URLs" to the default OSD message when mpv is launched without parameters. Since this works flawlessly with youtube-dl integration, the fact that you can drop URLs directly to the window should be advertised more.
* demux_mkv: vp9 alpha, second trywm42017-05-301-1/+4
| | | | | The parser is used to split superframes, and the decoder didn't like when the blockadditional was duplicated on the second split packet.
* demux_mkv: fix alpha with vp9 + libvpxwm42017-05-301-0/+3
| | | | | The blockadditional side data gets lost because vp9 has to go through the parser.
* video/out/wayland/buffer.c: Add missing free()Raúl Peñacoba2017-05-261-1/+4
|
* ipc-unix: don’t truncate the message on EAGAINSebastian Reuße2017-05-241-4/+1
| | | | Fixes #4452.
* videotoolbox: support new libavcodec APIwm42017-05-245-3/+107
| | | | | | | | | | | The new API has literally no advantages (other than that we can drop mp_vt_download_image and other things later), but it's sort-of uniform with the other hwaccels. "--videotoolbox-format=no" is not supported with the new API, because it doesn't "fit in". Probably could be added later again. The iOS code change is untested (no way to test).
* vd_lavc: check for missing device_ctx refwm42017-05-241-0/+5
| | | | | | It's not really guaranteed that other components always set this (e.g. on subtle errors), so check it explicitly. Although I'm not aware of a failing case.
* hwdec: fix 2 commentswm42017-05-241-2/+1
| | | | The first is outdated, the second was always wrong.
* player: make sure version information is always included in --log-filewm42017-05-223-0/+19
| | | | | | | If --log-file was used in config files, this could be missing due to the exact timing when the messages are print, and when the options are applied. Fix this by always dumping the version again when a log file is opened.
* man/options: further document --chapters-file accepted filesRicardo Constantino2017-05-221-0/+4
|
* ad_spdif: change license to LGPLwm42017-05-212-8/+8
| | | | | All authors have agreed. (Even the main author, if you wonder about the entry in the Copyright file.)
* ao_pcm: change license to LGPLwm42017-05-202-8/+8
| | | | | | | | | | | | | | | | | | | | | All relevant authors have agreed to the relicensing. Problem cases: eca47b1a5edae: someone else gets credited for the "idea" of this change, but it doesn't seem like it was a patch (otherwise reimar would have said "patch"). Also, the associated code got essentially removed again anyway. (The option parsing was rewritten fully.) ffb529e4eb2a9: anonymous/unknown author, but the code was fully removed anyway. The struct was removed, and the modern code does explicit read/write calls. 40789473d215b: author was not contacted, but this code was removed anyway. The magic number (0x7ffff000) is still in the new code, but I don't think that is copyright relevant. c750b8ab2d3c8: the message was entirely removed.
* TOOLS/lua/autoload.lua: ignores all files starting with "."Yue Zhu2017-05-201-0/+3
|
* audio/out: change license of some core files to LGPLwm42017-05-205-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All contributors of the current code have agreed. ao.c requires a "driver" entry for each audio output - we assume that if someone who didn't agree to LGPL added a line, it's fine for ao.c to be LGPL anyway. If the affected audio output is not disabled at compilation time, the resulting binary will be GPL anyway, and ootherwise the code is not included. The audio output code itself was inspired or partially copied from libao in 7a2eec4b59f4 (thus why MPlayer's audio code is named libao2). Just to be sure we got permission from Aaron Holtzman, Jack Moffitt, and Stan Seibert, who according to libao's SVN history and README are the initial author. (Something similar was done for libvo, although the commit relicensing it forgot to mention it.) 242aa6ebd40: anders mostly disagreed with the LGPL relicensing, but we got permission for this particular commit. 0ef8e555735: nick could not be reached, but the include statement was removed again anyway. 879e05a7c17: iive agreed to LGPL v3+ only, but this line of code was removed anyway, so ao_null.c can be LGPL v2.1+. 9dd8f241ac2: patch author could not be reached, but the corresponding code (old slave mode interface) was completely removed later.
* demux_raw: drop "mp-rawvideo" usewm42017-05-204-11/+18
| | | | | | This is an old pseudo codec to pass through the pixel format. Setup a suitable AVCodecParameter directly instead, so the "rawvideo" codec can be used.
* cocoa: properly unhide Dock when quitting during System fs animationAkemi2017-05-192-0/+64
| | | | | | | | when quitting mpv during the System fullscreen animation cocoa can't reset some flags properly and won't reset the Dock hiding behaviour to it's previous state. Fixes #4400
* vdpau: crappy hack to allow initializing hw decoding after preemptionwm42017-05-193-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If vo_opengl is used, and vo_opengl already created the vdpau interop (for whatever reasons), and then preemption happens, and then you try to enable hw decoding, it failed. The reason was that preemption recovery is not run at any point before libavcodec accesses the vdpau device. The actual impact was that with libmpv + opengl-cb use, hardware decoding was permanently broken after display mode switching (something that caused the display to get preempted at least with older drivers). With mpv CLI, you can for example enable hw decoding during playback, then disable it, VT switch to console, switch back to X, and try to enable hw decoding again. This is mostly because libav* does not deal with preemption, and NVIDIA driver preemption behavior being horrible garbage. In addition to being misdesigned API, the preemption callback is not called before you try to access vdpau API, and then only with _some_ accesses. In summary, the preemption callback was never called, neither before nor after libavcodec tried to init the decoder. So we have to get mp_vdpau_handle_preemption() called before libavcodec accesses it. This in turn will do a dummy API access which usually triggers the preemption callback immediately (with NVIDIA's drivers). In addition, we have to update the AVHWDeviceContext's device. In theory it could change (in practice it usually seems to use handle "0"). Creating a new device would cause chaos, as we don't have a concept of switching the device context on the fly. So we simply update it directly. I'm fairly sure this violates the libav* API, but it's the best we can do.
* ao_wasapi: set name of event threadJames Ross-Gowan2017-05-181-0/+2
|
* win32: pthread: use the new thread naming APIJames Ross-Gowan2017-05-183-1/+27
| | | | | | | Windows, as of the Creators Update, finally has a sane API for giving a name to a thread that can be used by debuggers. This is similar to pthread_setname_np on Linux and some Unixes. Expose it in the pthread wrapper and use it for mpthread_set_name().
* context_angle: fix fallback to D3D9 deviceJames Ross-Gowan2017-05-161-30/+56
| | | | | | | | | This was broken in e0250b9604b2. In some cases, device creation will succeed, but creating an EGL context on the device will fail. With --angle-renderer=auto, it should try to create the context again on a D3D9 device. This fixes mpv in Windows Vista on VirtualBox for me.
* manpage: document tricky issue with IPC observe_property commandwm42017-05-161-0/+8
| | | | Seems like people get confused by this.
* manpage: better description for --external-filewm42017-05-161-3/+8
|
* w32_common: drop TLS usageJames Ross-Gowan2017-05-161-20/+21
| | | | | | | | | | | This was added in 3f268cc4f2a4 because it wasn't clear whether WM_NCCREATE could be used to send a context pointer from CreateWindowEx to the window procedure. WM_NCCREATE isn't always the first message sent to a window, but this seems to be because of an undocumented but well-known bug where, for top-level overlapped windows, a spurious WM_GETMINMAXINFO arrives first instead. The WM_GETMINMAXINFO can be safely ignored, so it is still okay to pass the context struct in WM_NCCREATE.
* demux_mkv: read headers at the end of the file sorted by positionwm42017-05-151-6/+30
| | | | | | | | | | | | | Try to read header elements stored at the end of the file in the order of their position. (It would be nicer if mkv simply told us a range of elements to parse, but it doesn't do that.) This can potentially reduce seek elements, although I didn't check if any real files trigger this. The real contribution by this change is that it does not defer reading the CUE index if we need to seek to the end of the file anyway. This can actually avoid 2 seeks when opening a file and --start is used, and the file has other headers elements at the end of the file (like tags).
* cache: move duplicated condition to a functionwm42017-05-151-6/+12
| | | | | While subtly duplicating such checks happens a lot in this file, this particular case can be easily factored into a function.
* cache: fix unnecessary seek blocking from f4d62dc4a0Uoti Urpala2017-05-151-9/+18
| | | | | | | | | | | | | | | | | | | | | Commit 374600cec0 ("cache: propagate seek failures") changed stream-level seeks to be done in the calling thread so possible errors could be reported. This commit included some rationale why doing the stream-level seeks synchronously was not a big issue. However, the following fixup commit f4d62dc4a0 changed the seek code to always synchronize with the cache thread and do seek handling there. This is a problem because it affects even seeks within already cached data (which require no stream-level seek). With a network server that sends data in bursts, the cache thread can be blocked in a read call for a long time; the added synchronization means that seeking within already downloaded data can have unnecessary long delays. Change cache_seek() to check whether the seek is expected to result in a stream-level seek, and skip synchronization if it is not. This means that seeks within the cached portion of the file now again happen immediately without possibly waiting for network. Signed-off-by: wm4 <wm4@nowhere>
* csputils: code clarityNiklas Haas2017-05-131-5/+5
| | | | | `cmax` is more intuitive than `cmin` especially for full-range YUV, and this also explains the behavior of `anyfull` better.
* w32_common: use the proper keycodes for XBUTTON1/2James Ross-Gowan2017-05-121-2/+2
| | | | | | | mpv's mouse button numbering is based on X11, which means XBUTTON1 and 2 on Windows (the "back" and "forward" buttons) should map to MOUSE_BTN7 and 8 in mpv. MOUSE_BTN5 and 6 refer to the horizontal scroll buttons on mouses that have them.
* w32_common: generate MP_AXIS_* keycodes for scrollingJames Ross-Gowan2017-05-121-8/+18
| | | | | | | | | | | Windows doesn't have a way to distinguish "precise" mouse wheel events and events from regular notched mouse wheels. A notched wheel should always send events with a delta of 120, but a precise wheel could also happen to send 120 if multiple scroll events are coalesced (and to make things even harder, some buggy Microsoft drivers send deltas less than 120, even for notched wheels.) Since there is no distinction, but MP_AXIS_* keycodes can hold more information (the delta value,) send MP_AXIS_* events for both kinds of mouse wheel scrolling.
* command: use scale_units to add/cycle integer propertiesJames Ross-Gowan2017-05-124-17/+43
| | | | | | | | | | | | | | | This adds check_property_scalable, which returns true if the property is backed by a floating-point number. When the add or cycle commands operate on these properties, they can benefit from the fractional scale value in cmd->scale. When the property is not backed by a