summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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 floating-point number, cmd->scale_units is used instead, so for axis events, the property is only incrmented when the user scrolls one full unit. This solution isn't perfect, because in some cases integer-backed properties could benefit from accurate scrolling. For example, if an axis is bound to "cycle audio 5", the cycle command could be made to change the audio track by one when the user scrolls 1/5th of a unit, though this behaviour would require more changes to the options system.
* input: pre-process MP_AXIS_* inputJames Ross-Gowan2017-05-121-6/+101
| | | | | | | | | | | | | | | | | | | | | This adds some logic for pre-processing MP_AXIS_* events before the corresponding input command is generated. Firstly, the events are filtered. A lot of touchpad drivers and operating systems don't seem to filter axis events, which makes it difficult to use the verical axis (MP_AXIS_UP/MP_AXIS_DOWN) without accidentally triggering commands bound to the horizontal axis (MP_AXIS_LEFT/MP_AXIS_RIGHT) and vice-versa. To fix this, a small deadzone is used. When one axis breaks out of the deadzone, events on the other axis are ignored until the user stops scrolling (determined by a timer.) Secondly, the scale_units value is determined, which is the integer number of "units" the user has scrolled, as opposed to scale, which is the fractional number of units. It's determed by accumulating the fractional scale values. If an axis is bound to a "non-scalable" command that doesn't understand fractional units, interpret_key() will queue that many commands, each with scale = 1.0.
* command: mark some commands as "scalable"James Ross-Gowan2017-05-122-2/+14
| | | | | | | | | | Scalable commands (seek, cycle and add) understand the cmd->scale parameter and will "scale" their action accordingly, for example, a seek with scale = 0.5 will only seek half the specified amount and a seek with scale = 2.0 will seek twice as much. Mark these commands so in the next commit, input.c will be able to synthesize input with cmd->scale = 1 for non-scalable commands.
* input: add MP_KEY_IS_AXIS and treat MP_AXIS_* as mouse eventsJames Ross-Gowan2017-05-121-2/+8
| | | | | MP_AXIS_* events are semantically equivalent to scroll button events (eg. MP_MOUSE_BTN{3,4,5,6}). They depend on the mouse position.
* vo_opengl: drop TLS usagewm42017-05-118-47/+33
| | | | | | | | | | | TLS is a headache. We should avoid it if we can. The involved mechanism is unfortunately entangled with the unfortunate libmpv API for returning pointers to host API objects. This has to be kept until we change the API somehow. Practically untested out of pure laziness. I'm sure I'll get a bunch of reports if it's broken.
* cache: clarify that copyright will be changed to LGPL v2.1 if possiblewm42017-05-112-1/+9
| | | | | | Clearly the licensing situation isn't confusing enough. I don't know why that guy insists on LGPLv3.
* vf.c, vf.h: change license to LGPLwm42017-05-113-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most authors have agreed. Like with vo.c, we don't take module declarations into consideration (see 0e09533c73dc0). Notable issues: 115bfb9762: the author has (probably) not agreed. The vf.c changes were removed with the removal of filter DR, though (see c54fc507da8e). 7b25afd742: the same author adds VOCTRLs for deinterlacing switching at runtime. Put them under a HAVE_GPL ifdef just to be sure. (It looks like we could remove the VOCTRLs immediately, as they're needed only for some compatibility things, but no need to do that yet.) 02b199e5e9: the author had a conditional agreement to LGPL, which doesn't allow us to change it just yet, but the code added here was completely removed anyway. (These days, the pts is passed as mp_image field, and put_image is gone.) 3532cd532e: same author, but code removed with DR removal. f0626e2f8d: same author, but code was moved to mp_image.c. e5b4b495c3: agreed to LGPLv3+ only, but the code was removed in cfa1f9e082 anyway. 086c324692: author was not asked - minor warning fix, but no mpv includes malloc.h anymore. e9d0a1d609: author was not asked - removed again in 33b62af947. c260a1139d: author could not be reached - but this code was removed when mpv changed the image allocation code to essentially use FFmpeg's pixdesc.
* af_format: change license to LGPLwm42017-05-112-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This case is a bit weird, because MPlayer certainly also has a file named af_format.c. Both appear to have the function of converting audio data between sample formats. However, mpv's af_format.c is a rewrite, and doesn't actually do conversion by itself. It's similar to vf_format.c, and forces the generic filter chain code to insert conversion filters, instead of doing conversion explicitly. mpv's current af_format.c started out as af_force.c in d9582ad0a41. It was renamed to af_format.c in e60b8f181d, while the old af_format.c was split into two new filters. In 943c785619 the filename was changed to af_format.c as well. The new af_format.c does not contain any libaf code, except for some potentially copy & pasted skeleton and boilerplate code. (We don't account for this in per-filter file licenses, as the old libaf code has to be removed fully, at which point the filters will have to be ported to another framework, which will removed that boilerplate code.) The old filters based on af_format.c were progressively replaced and removed. Support for non-native endian and formats with signedness different from native FFmpeg was completely removed in 831d7c3c400b. The old 24 bit conversion code was removed in 552dc0d564 (made unnecessary by 5a9f817bfde8). Also list hwdec_vaglx.c as GPL-only, which doesn't have anything to do with this commit.
* dvb: disable by defaultwm42017-05-111-0/+1
| | | | | | | | It fails building with some older kernel headers, and the current test does not auto-disable it in these cases. Since DVB isn't going to be used by many people, I think disabling it by default is reasonable.
* stream_smb: disable by default, mark as GPLv3wm42017-05-113-3/+7
| | | | | | | | | | It seems libsmbclient has been GPLv3 for years. Also, it's certainly not LGPL (unlike some of its support libs like talloc). Thus, mpv built with Samba support is GPLv3. Disable it by default, so we don't have to go through the trouble to indicate the correct license in our output, and we don't trick people into distributing stuff under the wrong license.
* stream_file: change license to LGPLwm42017-05-112-11/+9
| | | | | | | | | | | | | | | | | | | | | This has a messy history all back to the initial commit with multiple refactors, but it seems almost all authors agreed. Exceptions: 2aa6acd9747: patch by someone who could not be reached. Whether or not this code is still in mpv is unknown, but the affected code was moved to stream.c at one point anyway. 3859bbd9fef: not sure if this is a patch by the mentioned person (I assume not) or the committer (who agreed to LGPL), but it seems the change is too trivial to affect copyright. It seems even the FD check can be dropped, which I'm doing in this commit. 58846451f0e: author doesn't reply. But reverting this and letting someone who has never seen this commit before redo it would lead to exactly the same code. So I'm claiming that the change is not copyrightable.
* cookies: change license to LGPLwm42017-05-113-16/+15
| | | | | | | All authors have agreed. One minor exception is 21a9221e7bb2 (patch by someone who wasn't asked), but we just remove the added line again. It seems unneeded.
* vo.c, vo.h, vo_null.c: change license to LGPLwm42017-05-105-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most contributors have agreed. vo.c requires a "driver" entry for each video output - we assume that if someone who didn't agree to LGPL added a line, it's fine for vo.c to be LGPL anyway. If the affected video output is not disabled at compilation time, the resulting binary will be GPL anyway. One problem are the changes by Nick Kurshev (usually using "nick" as SVN username). He could not be reached. I believe all changes to his files are actually gone, but here is a detailed listing: fa1d5742bc: nick introduces a new VO API. It was removed in 64bedd9683. Some of this was replaced by VOCTRLs are introduced in 7c51652a1b, obviously replacing at least some functionality by his API. b587a3d642: nick adds a vo_tune_info_t struct. Removed in 64bedd9683 too. 9caad2c29a: nick adds some VOCTRLs, which were silently removed in 8cc5ba5ab8 (they became unused probably with the VIDIX removal). 340183b0e9: nick adds VO-based screenshots, which got removed in 2f4b840f62. Strangely the same name was introduced in 01cf896a2f again, but this is a coincidence and worked differently (also it was removed yet again in 2858232220). 104c125e6d: nick adds an option for "direct rendering". It was renamed in 6403904ae9 and fully removed in e48b21dd87. 5ddd8e92a1: nick adds code to check the VO driver preinit arg to every single VO driver. The argument itself and any possibly remaining code associated with it was removed in 1f5ffe7d30. f6878753fb: nick adds header inclusion guards. We assume this is not relevant for copyright. Some of nick's code was merely moved to other files, such as the equalizer stuff added in 555c676683 and moved in 4db72f6a80 and 12579136ff, and don't affect copyright of these files anymore. Other notes: fef7b17c34: a patch by someone who wasn't asked for relicensing added a symbol that was removed again in 1b09f4633. 4a8a46fafd: author probably didn't agree to LGPL, but the function signature was changed later on anyway, and nothing of this is left. 7b25afd742: the same author adds a symbol to what is vo.h today, which this relicensing commit removes, as it was unused. (It's not clear whether the mere symbol is copyrightable, but no need to take a risk.) 3a406e94d7, 9dd8f241ac: slave mode things by someone who co