summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.27.2v0.27.2release/0.27Kevin Mitchell2018-02-122-2/+11
|
* ytdl_hook: whitelist subtitle URLs as wellRicardo Constantino2018-02-121-2/+4
| | | | | This was overlooked when doing the whitelisting for video and audio to fix #5456.
* Release 0.27.1v0.27.1Kevin Mitchell2018-02-102-1/+10
|
* ytdl_hook: fix safe url checking with EDL urlsRicardo Constantino2018-02-101-11/+11
|
* ytdl_hook: move url_is_safe earlier in codeRicardo Constantino2018-02-101-9/+9
| | | | lua isn't javascript.
* ytdl_hook: whitelist protocols from urls retrieved from youtube-dlRicardo Constantino2018-02-101-7/+48
| | | | | | Not very clean since there's a lot of potential unsafe urls that youtube-dl can give us, depending on whether it's a single url, split tracks, playlists, segmented dash, etc.
* Release 0.27.0v0.27.0Martin Herkt2017-09-133-2/+103
|
* vo_opengl: always initialize uniforms on first useNiklas Haas2017-09-121-1/+3
| | | | | | Even if the contents are entirely zero. In the current code, these entries were left uninitialized. (Which always worked for nvidia - but randomly blew up for AMD)
* vo_opengl: generalize UBO packing/handlingNiklas Haas2017-09-126-70/+122
| | | | | | This is simultaneously generalized into two directions: 1. Support more sc_uniform types (needed for SC_UNIFORM_TYPE_PUSHC) 2. Support more flexible packing (needed for both PUSHC and ra_d3d11)
* vo: avoid putting large voctrl_performance_data on stackNiklas Haas2017-09-113-12/+19
| | | | | | This is around 512 kB, which is just way too much. Heap-allocate it instead. Also cut down the max pass count to 64, since 128 was unrealistically high even for vo_opengl.
* vo_opengl: refactor timer_pool_measure (again)Niklas Haas2017-09-112-5/+7
| | | | | | | Instead of relying on power-of-two buffer sizes and unsigned overflow, make this code more robust (and also cleaner). Why can't C get a real modulo operator?
* vo_opengl: fix out-of-bounds access in timer_pool_measureNiklas Haas2017-09-111-1/+2
| | | | | | This was there even before the refactor, but the refactor exposed the bug. I hate C's useless fucking modulo operator so much. I've gotten hit by this exact bug way too many times.
* vo_opengl: fix out-of-bounds read in update_uniformNiklas Haas2017-09-111-2/+1
| | | | | | | | | | Since the addition of UBOs, the assumption that the uniform index corresponds to the pass->params.inputs index is no longer true. Also, there's no reason it would even need this - since the `input` is also available directly in sc_uniform. I have no idea how I've been using this code for as long as I have without any segfaults until earlier today.
* vo_opengl: refactor/fix mp_pass_perf codeNiklas Haas2017-09-114-27/+19
| | | | | | | | | | | | | This was needlessly complicated and prone to breakage, because even the references to the ring buffer could end up getting invalidated and containing garbage data on e.g. shader cache flush. For much the same reason why we can't keep around the *timer_pool, we're also forced to hard-copy the entire sample buffer per pass per frame. Not a huge deal, though. This is, what, a few kB per frame? We have more pressing CPU performance concerns anyway. Also simplified/fixed some other code.
* vo_opengl: add a gamut warning featureNiklas Haas2017-09-105-4/+24
| | | | | | | | This clearly highlights all out-of-gamut/clipped pixels. (Either too bright or too saturated) Has some (documented) caveats. Also make TONE_MAPPING_CLIP stop actually clamping the value range (it's unnecessary and breaks this feature).
* man: correct default for --audio-file-autoMartin Herkt2017-09-101-4/+3
| | | | Fixes #4851
* osx: fix media keys input when other Apps steal the priorityAkemi2017-09-073-0/+27
| | | | | | | | | | | other Apps do the same as mpv and tap into the global event chain. events that are handled are not being propagated down the event chain. that can lead to mpv not getting any media key events anymore when they are held back by other Apps. we will just move mpv back to the top of the event list when mpv is refocused and is not at the top of the list any more. Fixes #4834
* vo_opengl: add support for vulkan GLSL dialectNiklas Haas2017-09-044-12/+31
| | | | | | | | | | Redefining texture1D / texture3D seems to be illegal, they are already built-in macros or something. So just use tex1D and tex3D instead. Additionally, GL_KHR_vulkan_glsl requires using explicit vertex locations and bindings, so make some changes to facilitate this. (It also requires explicitly setting location=0 for the color attachment output)
* vo_opengl: use rgba16 for 3DLUTs instead of rgb16Niklas Haas2017-09-042-6/+6
| | | | | | | Vulkan compat. rgb16 doesn't exist on hardware anyway, might as well just generate the 3DLUT against rgba16 as well. We've decided this is the simplest way to do vulkan compatibility: just make sure we never actually need 3-component textures.
* vo_opengl: refactor scaler LUT weight packing/loadingNiklas Haas2017-09-044-36/+24
| | | | | | | | This is mostly done so we can support using textures with more components than the scaler LUTs have entries. But while we're at it, also change the way the weights are packed so that they're always sequential with no gaps. This allows us to simplify pass_sample_separated_get_weights as well.
* vo_opengl: scale deband-grain to the signal rangeNiklas Haas2017-09-033-4/+8
| | | | | This prevents blowing up for high dynamic range sources, where a noise level of 48 can suddenly mean 4800.
* filter_kernels: correct spline64 kernelJames Ross-Gowan2017-09-031-4/+4
| | | | | | This seems to have had some copy/paste errors. It should now match the implementation in fmtconv: https://github.com/EleonoreMizo/fmtconv/blob/00453a86dd73/src/fmtcl/ContFirSpline64.cpp#L58-L76
* ytdl_hook: resolve relative paths when joining segment urlsRicardo Constantino2017-09-031-1/+21
| | | | | FFmpeg/mpv don't do it automatically. See #4827
* audio: fix format change regressionwm42017-09-031-3/+3
| | | | | | | | Ever since the mp_aframe change, audio mid-stream format changes crash. I have no idea why the recent mp_aframe change triggers this. Didn't look too deeply into it either. It appears to work now, though. Fixes #4828.
* input: fix error in MP_KEY_IS_WHEELJames Ross-Gowan2017-09-031-1/+1
| | | | Whoops.
* input: merge mouse wheel and axis keycodesJames Ross-Gowan2017-09-0316-117/+102
| | | | | | | | | | | | | | | | | | | | | | Mouse wheel bindings have always been a cause of user confusion. Previously, on Wayland and macOS, precise touchpads would generate AXIS keycodes and notched mouse wheels would generate mouse button keycodes. On Windows, both types of device would generate AXIS keycodes and on X11, both types of device would generate mouse button keycodes. This made it pretty difficult for users to modify their mouse-wheel bindings, since it differed between platforms and in some cases, between devices. To make it more confusing, the keycodes used on Windows were changed in 18a45a42d524 without a deprecation period or adequate communication to users. This change aims to make mouse wheel binds less confusing. Both the mouse button and AXIS keycodes are now deprecated aliases of the new WHEEL keycodes. This will technically break input configs on Wayland and macOS that assign different commands to precise and non-precise scroll events, but this is probably uncommon (if anyone does it at all) and I think it's a fair tradeoff for finally fixing mouse wheel-related confusion on other platforms.
* cocoa: fix button numbering for back/forwardJames Ross-Gowan2017-09-031-4/+7
| | | | | | It seems like the Cocoa backend used to return the same mpv keycodes for mouse back/forward as it did for scrolling up and down. Fix this by explicitly mapping all Cocoa button numbers to the right mpv keycodes.
* input: use mnemonic names for mouse buttonsJames Ross-Gowan2017-09-0313-171/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mpv's mouse button numbering is based on X11 button numbering, which allows for an arbitrary number of buttons and includes mouse wheel input as buttons 3-6. This button numbering was used throughout the codebase and exposed in input.conf, and it was difficult to remember which physical button each number actually referred to and which referred to the scroll wheel. In practice, PC mice only have between two and five buttons and one or two scroll wheel axes, which are more or less in the same location and have more or less the same function. This allows us to use names to refer to the buttons instead of numbers, which makes input.conf syntax a lot easier to remember. It also makes the syntax robust to changes in mpv's underlying numbering. The old MOUSE_BTNx names are still understood as deprecated aliases of the named buttons. This changes both the input.conf syntax and the MP_MOUSE_BTNx symbols in the codebase, since I think both would benefit from using names over numbers, especially since some platforms don't use X11 button numbering and handle different mouse buttons in different windowing system events. This also makes the names shorter, since otherwise they would be pretty long, and it removes the high-numbered MOUSE_BTNx_DBL names, since they weren't used. Names are the same as used in Qt: https://doc.qt.io/qt-5/qt.html#MouseButton-enum
* stream_lavf: use avio_read_partial()wm42017-09-011-0/+4
| | | | Possibly improves latency and such things.
* vo_opengl: fix overlay mode (again)wm42017-08-301-7/+8
| | | | Did I mention yet that I regret this overlay mode thing?
* vd_lavc: change auto-probe order to prefer cuda over vdpau-copywm42017-08-301-5/+7
| | | | | This aims at making --opengl-hwdec-interop=cuda --hwdec=yes select the correct decoding mode: cuda instead of vdpau-copy.
* DOCS/contribute.md: coding style exceptionwm42017-08-301-0/+2
|
* vo_opengl: don't discard buffered video on redundant resize callswm42017-08-293-1/+8
| | | | | | | | | | If a VO-area option changes, gl_video_resize() is called unconditionally. This function does something even if the size does not change (at least it discards buffered frames for interpolation), which can lead to stutter when you keep firing option change events during playback. Check for an actual resize, and if nothing changes, exit early.
* vo_opengl: don't assume imgfmt=0 is validwm42017-08-291-1/+1
| | | | | | Could cause a crash if anything called ra_get_imgfmt_desc(imgfmt=0). Let it fail correctly. This can happen if a hwdec backend does not set hw_subfmt correctly.
* vo_opengl: fix the renderpass target format at creation timeNiklas Haas2017-08-273-4/+19
| | | | Required for vulkan.
* vo_opengl: fix misleading comment in ra.hNiklas Haas2017-08-271-6/+6
| | | | tex_upload is not just for buffers
* vo_opengl: use UBOs where supported/requiredNiklas Haas2017-08-274-14/+167
| | | | | | | | | | | | This also introduces RA_CAP_GLOBAL_UNIFORM. If this is not set, UBOs *must* be used for non-bindings. Currently the cap is ignored though, and the shader_cache *always* generates UBO-using code where it can. Could be made an option in principle. Only enabled for drivers new enough to support explicit UBO offsets, just in case... No change to performance, which is probably what we expect.
* vo_opengl: add support for UBOsNiklas Haas2017-08-275-11/+33
| | | | | Not actually used by anything yet, but straightforward enough to add to the RA API for starters.
* vo_opengl: clarify RA_CAP_DIRECT_UPLOADNiklas Haas2017-08-271-1/+2
| | | | | | This no longer concerns the API user except in as much as the API user probably wants to know whether or not PBOs are active, so keep around the CAP field even though it's mostly useless now.
* vo_opengl: refactor shader_cache bindingNiklas Haas2017-08-273-22/+40
| | | | | There's no reason to be needlessly wasteful with our binding points here. Just add a CAP for it.
* vo_opengl: be explicit about IMG_RWNiklas Haas2017-08-273-8/+13
| | | | | | | | | | | | Both vulkan and opengl distinguish between rendering to an image and using an image as a storage attachment. So make this an explicit capability instead of lumping it in with render_dst. (That way we could support, for example, using an image as a storage attachment without requiring a framebuffer) The real reason for this change is that you can directly use the output FBO as a storage attachment on vulkan but you can't on opengl, which makes this param structly separate from render_dst.
* vo_opengl: use size_t offset for vertex offsetsNiklas Haas2017-08-272-1/+2
| | | | | | | | I don't like the feeling of "reusing" the int binding for this. It feels... wrong, somehow. I'd prefer to use an explicit "offset" field. (Plus, I might re-use this for uniform buffers or something) YMMV
* osx: fix build on macOS 10.11 and earlierAkemi2017-08-262-2/+8
| | | | | | | | 98f5579 added a safeguard for the deactivation of the automatic tab bar but it still needs a compile time guard. add a forward declaration for the setAllowsAutomaticWindowTabbing method of NSWindow. Fixes #4783
* mp_image: include config.h directlyJames Ross-Gowan2017-08-262-1/+1
| | | | | | | | | This is needed for HAVE_SSE4_INTRINSICS. config.h used to be included as a transitive dependency of vf.h, but the include statement was removed from vf.h in 8f2ccba71bb4. Also silence an unused variable warning that was introduced in the same commit.
* video: increase --monitorpixelaspect rangeJames Ross-Gowan2017-08-261-1/+1
| | | | | | | | | | | | | | | | | Some people use very wide display modes such as 3840x240 with their CRT televisions because it lessens scaling artifacts in video game emulators. When using a 3840x240 display mode on a 4:3 CRT television, the pixel aspect ratio is 1:12, so in order to watch a video with mpv on the same television without changing the display mode, the user should use --monitorpixelaspect=1:12. Unfortunately, 1:12 (or 0.083) was out of range for the --monitorpixelaspect option. There was no good reason for this, so extend the range of the option to 1:32-32:1 (0.03125-32,) which should be more than enough to support "super-wide" display modes like these. This is related to #4483, but it doesn't fix the issue (which was to do with subtitle rendering.)
* vo_opengl: allow selection of true 32 bit float if float16 unavailablewm42017-08-241-13/+9
| | | | | Shouldn't make a difference for OpenGL (even with the weird duplication of these functions removed). Might be useful for the WIP vulkan backend.
* vd_lavc: work around some more idiotic FFmpeg nonsensewm42017-08-241-0/+4
| | | | | | Like in commit bd356333c713, but for the other hwaccels as well. Fixes #4794.
* command: restore OSD marker for video equalizer propertieswm42017-08-232-12/+8
| | | | | | | Commit 03cf150ff3516 accidentally dropped these. Readd them in a simpler way (so only a property_osd_display[] entry is enough). This commit doesn't actually touch the video equalizer properties, because the default value of 0 for the marker is what they require anyway.
* vd_lavc: fix mid-stream hwdec fallbackwm42017-08-231-0/+3
| | | | | | Not resetting hwdec_request_reinit caused it to flush on every packet, which not only caused it to fail triggering the actual fallback, and let it never decode a new frame, but also to get stuck on EOF.
* audio: fix spdif modewm42017-08-231-2/+2
| | | | | Not sure how this was not caught before. It crashed when trying to use spdif mode.
* DOCS/interface-changes.rst: don't suggest @deinterlace labelwm42017-08-231-2/+2
| | | | | --vf-defaults always applies, and the label is ignored. So don't suggest using it, it would be misleading.
* video: change --deinterlace behaviorwm42017-08-2212-135/+34
| | | | | | | | | | | | This removes all GPL only code from it, and that's the whole purpose. Also happens to be much simpler. The "deinterlace" option still sort of exists, but only as runtime changeable option. The main change in behavior is that the property will not report back the actual deint state. Or in other words, if inserting or initializing the filter fails, the deinterlace property will still return "yes". This is in line with most recent behavior changes to properties and options.
* manpage: video equalizer properties now behave differentlywm42017-08-221-4/+0
| | | | No more special behavior.
* manpage: remove removed "osd" commandwm42017-08-221-4/+0
| | | | Someone pointed this out on github.
* vo_direct3d: fix buildwm42017-08-221-5/+0
| | | | Broken by previous commit. Fix completely untested.
* video: redo video equalizer option handlingwm42017-08-2223-569/+83
| | | | | | | | | | | | | | | | | | | | | | | I really wouldn't care much about this, but some parts of the core code are under HAVE_GPL, so there's some need to get rid of it. Simply turn the video equalizer from its current fine-grained handling with vf/vo fallbacks into global options. This makes updating them much simpler. This removes any possibility of applying video equalizers in filters, which affects vf_scale, and the previously removed vf_eq. Not a big loss, since the preferred VOs have this builtin. Remove video equalizer handling from vo_direct3d, vo_sdl, vo_vaapi, and vo_xv. I'm not going to waste my time on these legacy VOs. vo.eq_opts_cache exists _only_ to send a VOCTRL_SET_EQUALIZER, which exists _only_ to trigger a redraw. This seems silly, but for now I feel like this is less of a pain. The rest of the equalizer using code is self-updating. See commit 96b906a51d5 for how some video equalizer code was GPL only. Some command line option names and ranges can probably be traced back to a GPL only committer, but we don't consider these copyrightable.
* vf_eq: remove this filterwm42017-08-226-478/+1
| | | | | | | | | Both the video equalizer command/option glue, which drives this filter, as well as the filter itself are slightly GPL contaminated. So it goes. After this commit, "--vf=eq" will actually use libavfilter's vf_eq (if FFmpeg was compiled in GPL mode), but it has different options and will not listen to the equalizer VOCTRLs.
* options: add a thread-safe way to notify option updateswm42017-08-2210-23/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we had a thread-safe way to read options, but no option update notification mechanism. Everything was funneled though the main thread's central mp_option_change_callback() function. For example, if the panscan options were changed, the function called vo_control() with VOCTRL_SET_PANSCAN to manually notify the VO thread of updates. This worked, but's pretty inconvenient. Most of these problems come from the fact that MPlayer was written as a single-threaded program. This commit works towards a more flexible mechanism. It adds an update callback to m_config_cache (the thing that is already used for thread-safe access of global options). This alone would still be rather inconvenient, at least in context of VOs. Add another mechanism on top of it that uses mp_dispatch_queue, and takes care of some annoying synchronization issues. We extend mp_dispatch_queue itself to make this easier and slightly more efficient. As a first application, use this to reimplement certain VO scaling and renderer options. The update_opts() function translates these to the "old" VOCTRLs, though. An annoyingly subtle issue is that m_config_cache's destructor now releases pending notifications, and must be released before the associated dispatch queue. Otherwise, it could happen that option updates during e.g. VO destruction queue or run stale entries, which is not expected. Rather untested. The singly-linked list code in dispatch.c is probably buggy, and I bet some aspects about synchronization are not entirely sane.
* build: pick a main-fn source file only if cplayer is builtwm42017-08-221-5/+6
| | | | libmpv does not need this.
* vo_opengl: refactor tex_upload to ra_buf_poolNiklas Haas2017-08-227-84/+124
| | | | | | | | | | Also refactors the usage of tex_upload to make ra_tex_upload_pbo a RA-internal thing again. ra_buf_pool has the main advantage of being dynamically sized depending on buf_poll, so for OpenGL we'll end up only using one buffer (when not persistently mapping) - while for vulkan we'll use as many as necessary, which depends on the swapchain depth anyway.
* TOOLS/lua/autodeint: update to lavfi-bridgeRicardo Constantino2017-08-212-28/+38
| | | | | Also use lavfi setfield instead of removed field-dominance. Remove missing remainder of field-dominance in docs.
* win32: fix massive memory corruption (take 2)wm42017-08-211-3/+4
| | | | | | <