summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DOCS/man/options.rst: replace some legacy single-hyphen syntaxLeo Izen2022-09-201-3/+3
| | | | | Replace some occurrences of ``-option`` with ``--option`` to coincide with the current option sytnax.
* vo_gpu_next: support error diffusion ditheringNiklas Haas2022-09-201-6/+14
| | | | One step closer to vo_gpu_next feature parity with vo_gpu!
* sub: use Unicode linebreaking for non-ASS subs and OSDOneric2022-09-192-1/+7
| | | | | | | | | | | | ASS must only automatically break at ASCII spaces (\x20), but other subtitle formats might expect more breaking oppurtinities. Especially non-ASS subs in scripts, which typically do not use (ASCII) spaces to seperate words, like e.g. CJK, might overflow the screen if the conversion didn't insert additional linebreaks (ffmpeg does not). Thus try to enable Unicode linebreaking for converted subs and the OSD if libass is new enough. The feature may still be unavailable at runtime if libass wasn't build with Unicode linebreaking support.
* ao_audiounit: get the channel layout from the AU itselfrcombs2022-09-151-13/+77
| | | | | | | Fixes 5.1/7.1 output mapping on tvOS 16, and also makes the AC3-layout hack unnecessary. Also adds some diagnostic log messages.
* mac: avoid unnecessary unsafe conversions; fixes crash in debug buildsrcombs2022-09-142-22/+14
| | | | | | | | | | | | | | | Previously, running a debug build of mpv would crash with this output when preinit() at vo_libmpv.c:732 calls control(vo, VOCTRL_PREINIT, NULL): Swift/Optional.swift:247: Fatal error: unsafelyUnwrapped of nil optional This comes from this line of code: var data = UnsafeMutableRawPointer.init(bitPattern: 0).unsafelyUnwrapped Unsafely unwrapping a UnsafeMutableRawPointer.init has always been UB, but the Swift runtime began asserting on it in debug builds a couple macOS versions ago.
* TOOLS/lua/autoload: add `m2ts` extensionDeadNews2022-09-141-1/+1
| | | | * `.m2ts` used for the Blu-ray disc container file format
* ytdl_hook: simplify exclude option parsingChristoph Heinrich2022-09-141-5/+2
| | | | | The parsing used to be unnecessarily complicated, now it's easier to read and understand.
* vo_gpu_next: only require full pixel byte alignmentNiklas Haas2022-09-121-3/+3
| | | | | The current code also rejects e.g. rgb30, even though this format is perfectly valid, because it only checks for alignment of the used bits.
* vo_gpu_next: implement ICC 3DLUT cachingNiklas Haas2022-09-121-0/+65
| | | | | | | Relies on a new upstream API for adding save/load callbacks to the ICC 3DLUT generation parameters. Closes: https://github.com/mpv-player/mpv/issues/10252
* vo_gpu_next: use correct pixel size when mapping formatsNiklas Haas2022-09-121-1/+1
| | | | | `total_bits` may be less than the true pixel stride (`bpp`) for formats which contain extra ignored components (e.g. rgb0).
* ao_pipewire: listen to hotplug eventsThomas Weißschuh2022-09-111-1/+100
|
* ao_pipewire: use proper hotplug init APIsThomas Weißschuh2022-09-111-8/+13
|
* ao_pipewire: create is_sink_node helperThomas Weißschuh2022-09-111-8/+16
|
* audio: list devices for all AOs with hotplug_initThomas Weißschuh2022-09-111-4/+7
| | | | | | | | | | | | | | Previously we would only call list_devs() on available AOs if an AO *did not* have a hotplug_init() callback or for the first one that *did* have it. This is problematic when multiple fully functional hotplug-capable AOs are available. The second one would not be able to contribute discovered devices. This problem prevents ao_pipewire from introducing full hotplug support with hotplug_init().
* audio: try to use playback AO as hotplug AO firstThomas Weißschuh2022-09-114-10/+26
| | | | | | | | | | | | | | | | | | | | | When a platform has multiple valid AOs that can provide hotplug events we should try to use the one that also provides playback. Concretely this will help when introducing hotplug support for ao_pipewire. Currently ao_pulse is probed by ao_hotplug_get_device_list() before ao_pipewire and on the common setups where both AOs could work pulse will be selected for hotplug handling. This means that hotplug_init() of ao_pipewire will never be called and list_devs() has to do its own initialization. But if ao_pulse is non-functional or not compiled-in suddenly ao_pipewire *must* implement hotplug_init() for hotplugging events to work for all. Also if the hotplug ao_pulse connects to a PulseAudio instance that is not emulated by the same PipeWire instance as the playback ao_pipewire the hotplug events are useless.
* ta: increase size of names printedThomas Weißschuh2022-09-111-1/+1
| | | | | | | 30 characters are not a lot. Also when the name is calculated from the allocation site the line number will be the at the end of the name, so truncating it is especially inconvenient.
* ao_pipewire: handle AOCONTROL_UPDATE_MEDIA_ROLEThomas Weißschuh2022-09-101-2/+22
|
* audio: add AOCONTROL_UPDATE_MEDIA_ROLEThomas Weißschuh2022-09-104-0/+37
| | | | | | This is used to notify an AO about the type of media that is being played. Either a movie or music.
* ao_pipewire: fix indentThomas Weißschuh2022-09-101-7/+7
|
* repack: add repacker for ccc16x16 formatsPhilip Langdale2022-09-101-9/+12
| | | | | | | | | | | | I'm adding support in ffmpeg for the XV36 format which will be used by VAAPI for 12bit 4:4:4 content. It's an undefined-alpha channel variant of Y412 which is itself a 12bit+4bits padding variant of Y416. We currently have a repacker for full four channel cccc16, and for three channel ccc16, but nothing for ccc16x16 with the undefined alpha channel. It's simple enough to add one using the existing macros.
* mpv.metainfo.xml: add XDG appstream metadata manifestVitaly Zaitsev2022-09-093-0/+34
|
* DOCS: Mention "mono" audio channels optionCairn2022-09-091-3/+3
|
* DOCS/libmpv: fix typo in linkage section257924312022-09-031-1/+1
|
* w32: fix typo in F23 mappingThomas Weißschuh2022-09-031-1/+1
|
* vo_gpu_next: fix typo affecting --target-trc optionTillmann Karras2022-09-021-1/+1
|
* macos: add support for F13-F20 keysThomas Weißschuh2022-09-021-0/+3
|
* w32: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+4
| | | | Fixes #10595
* x11: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+4
|
* wayland: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+6
|
* input: add function keys F13-F24Thomas Weißschuh2022-09-021-0/+12
|
* ad_lavc: strip non-normalized floatsNiklas Haas2022-09-023-0/+35
| | | | | | | `opus` codec likes returning denormalized floats in some cases, causing wacky issues. Fixes #10290
* vo_gpu_next: display subtitles without video streamNiklas Haas2022-08-311-1/+2
| | | | Fixes https://github.com/mpv-player/mpv/issues/10594
* DOCS/options: update vd-lavc-skiploopfilter, skipidct and related descriptionssfan52022-08-311-5/+7
| | | | Cross-checked the current functionality of these with the FFmpeg source.
* DOCS/mpv: remove spaces at EOL, ensure 80 colsAvi Halachmi (:avih)2022-08-291-4/+5
| | | | These are fixes for the previous commit.
* DOCS/mpv: added COMMAND INTERFACE refs to INTERACTIVE CONTROLenly12022-08-291-3/+5
| | | | Added COMMAND INTERFACE references to make it easier for new users.
* ao_pipewire: for_each_sink(): report errorsThomas Weißschuh2022-08-281-9/+32
|
* meson: fix condition for enabling vaapi-eglOwen Rafferty2022-08-271-1/+1
|
* meson: fix libplacebo checkNiklas Haas2022-08-261-1/+1
| | | | | | Missing waf quivalent, and doesn't necessarily output a good error message. But I might as well submit this rather than sitting on it unnecessarily.
* audio: fix lack of reinitialization on format change with pull AOsPhilip Langdale2022-08-231-0/+1
| | | | | | | | | | | | uau did some investigation and noticed that we do not send a wakeup event when we encounter end-of-stream in ao_read_data(), in contrast to the equivalent logic for push AOs in ao_play_data(). Inserting that wakeup fixes the original problem of lack of reinitialization on a format change without the problems we saw with the previous attempted fix. Fixes #10566
* player/audio: remove explicit drain on EOFPhilip Langdale2022-08-231-2/+0
| | | | | | | | | | | | | | | We have previously had a problem where pull AOs (such as pipewire) would not reinitialize on a format change when going between two audio-only files. In such a situation, playback would stop after the first file. We initially attempted to fix this by explicitly draining on EOF, which solves that problem but introduces a blocking step where we don't actually want one, breaking gapless audio, and causing dropped frames at the end of playback for files with video in them too. So, let's undo these changes and do something better in the next commit.
* ao_pipewire: make sure not to exceed the available bufferThomas Weißschuh2022-08-211-1/+1
| | | | | | | | | | The error description in #10545 could indicate that we are overflowing we are corrupting the buffer metadata ourselves through out-of-bound writes. This check is also present in pw-cat so it seems to be expected for b->requested to exceed the actual available buffer space. Potential fix for #10545
* audio: don't try to drain non-existent AOThomas Weißschuh2022-08-211-1/+2
| | | | | | | | 52aed495cb ("audio: drain ao on EOF") introduced logic to drain an AO when EOF of the input has been reached. When no AO however is present this leads to a NULL-dereference. Fixes #10556
* vo_gpu_next: pass GL get_proc_addr pointer to libplaceboNiklas Haas2022-08-193-0/+11
| | | | | | | | | | | | | | | | | Facing down the multitude of ways to somehow wrangle the get_fn pointer out of the GL environment and into libplacebo, I decided the easiest is to just store it inside the GL struct itself. The lifetime of this get_fn function is a bit murky, since it's not clear on whether or not it survives the VO init call (especially in the case of the GL render API, which explicitly states that parameters do not need to survive the call they're passed to), so just add a disclaimer. (It's fine for us to use like this because `gpu_ctx_create` is still part of VO init) Closes https://code.videolan.org/videolan/libplacebo/-/issues/216
* ao_pipewire: test on FreeBSDThomas Weißschuh2022-08-182-0/+3
|
* mpv.desktop: add RIST protocol to desktop entryThe-head-obamid2022-08-181-1/+1
|
* osxbundle: add RIST protocol support to app metadataThe-head-obamid2022-08-181-0/+1
|
* stream_lavf: enable RIST protocol support via ffmpegThe-head-obamid2022-08-181-1/+1
|
* ao_pipewire: restructure logic a bitThomas Weißschuh2022-08-171-4/+3
|
* ao_pipewire: only try to read requested dataThomas Weißschuh2022-08-171-0/+4
|
* ao_pipewire: report all available info about chunkThomas Weißschuh2022-08-171-1/+5
| | | | | This allows the audio server better to make sense of the data instead of having to use heuristics.
* ytdl_hook: improve track detectionChristoph Heinrich2022-08-171-13/+12
| | | | | | | | | | | | | | | | Every format that was not detected as a video format was added to the audio tracks. This resulted in e.g. YouTube storyboards from ending up in the list of audio tracks. Now formats that are already known to be neither video formats nor audio formats, will also not end up in any track list. Formats where it is unknown if they are video or audio get added to tracks if `force_all_formats` is used, otherwise only formats that are known to contain video or audio become video or audio tracks respectively. https://github.com/yt-dlp/yt-dlp/issues/4373#issuecomment-1186637357
* misc/random: add xoshiro random number implementationLeo Izen2022-08-178-5/+124
| | | | | | | Add xoshiro as a PRNG implementation instead of relying on srand() and rand() from the C standard library. This, in particular, lets us avoid platform-defined behavior with respect to threading.
* meson: fix the build-date optionDudemanguy2022-08-161-1/+1
| | | | Rewrites are hard.
* meson: fix building without glDudemanguy2022-08-151-0/+1
| | | | This needs to be unconditionally added.
* meson: consistently use feature['foo']Dudemanguy2022-08-151-267/+246
| | | | | | | | | | Since the previous commit introduced the notion of a features dictionary that conveniently tells us whether or not to use a feature in a simple yes/no, we can make use of this everywhere in the build. Instead of doing something like 'if foo.()', change it to 'if feature['foo'] instead. This enforces a consistent standard instead of having a lot of different possible combinations of booleans that may or may not do something.
* meson: refactor generating config.hDudemanguy2022-08-152-413/+239
| | | | | | | | | | | | | | mpv has a ton of defines that are generated during building. Previously, the meson build just had this as a big giant wall of text that manually set each one but we can do this smarter. Instead, change the "features" object to a dictionary and have it hold the name of the feature and its value (true/false on whether it is enabled). Then at the end, just loop through it and reformat the name of the feature so it becomes HAVE_FEATURE. A side effect of this is that a lot of extra defines are generated that aren't actually used in the code, but the waf build worked like this for years anyway. A nice result of this is that the use of foo['use'] internally can be completely eliminated and replaced with feature['foo'] instead when needed.
* meson: disable dvdnav by defaultDudemanguy2022-08-151-1/+1
| | | | | It turns out that this is disabled in waf. Go ahead and copy this in meson for consistency.
* meson: reduce dictionary usageDudemanguy2022-08-151-98/+61
| | | | | | | The build was a bit overzealous with using dictionaries. These are fine for when the feature checking is more complicated, but there's no point in having them for the simplier things. This also eliminates the usage of the 'name' key completely.
* meson: add comment clarifying windows-internal-pthreadsDudemanguy2022-08-151-0/+5
|
* ytdl_hook: consistant behavior for single formatChristoph Heinrich2022-08-141-1/+17
| | | | | | | | | | | | | | One would expect that e.g. `--script-opts=ytdl_hook-all_formats=no --ytdl-format=bestaudio` and `--script-opts=ytdl_hook-all_formats=yes --ytdl-format=bestaudio` to play the exact same tracks without manual intervention. This already worked when two formats were requested. For a single format with `all_formats=yes` it would also play a track that was not requested when available. This was inconsistant with the behavior of `all_formats=no` (default), which would not play a second track when only a single one was requested. This combined with #10395 now plays the exact same tracks with `all_formats=yes` as without, even when only one format is requested.
* wayland: add support for configure boundsDudemanguy2022-08-144-2/+41
| | | | | | | | | | | | | | | In wayland-protocols 1.25, xdg-shell got a version bump which added the configure_bounds event. The compositor can send this to clients to indicate that they should not resize past a certain size. For mpv, we'll choose to only listen to this on reconfig events (i.e. when the window first appears and if the video resolution changes later in the playlist). However, this behavior is still exposed as a user option (default on) because it will neccesarily conflict with a user setting a specific geometry size and/or window scale. Presumably, if someone is setting a really large size that goes beyond the bounds of their monitor, they actually want it like that. The wayland-protocols version is newer-ish, but we can get around having to poke the build system by just using a define that exists in the generated xdg-shell header.
* x11: fix display-{width,height} calculationDudemanguy2022-08-141-3/+9
| | | | | | | | | | | | Unexpectedly, x11->screenrc actually doesn't update with randr events. In a multimonitor configuration it could easily be wrong depending on the user's layout. While it's tempting to modify the logic so screenrc changes with randr events, this rectangle is currently used everywhere and as far as we know, this pretty much works fine. Instead, just loop over the randr displays that we have and select it if it overlaps with the winrc. This follows the same logic as the fps selection in the case of the mpv window overlapping multiple monitors (the last one is selected).
* DOCS/options: correct wayland-disable-vsync optionDudemanguy2022-08-121-4/+3
| | | | | This is actually dated. It works on all wayland outputs/VOs and has for some time now.
* ytdl_hook: fix default track for single formatChristoph Heinrich2022-08-121-2/+2
| | | | | | | | | | | | | | | | | Tracks are marked as default tracks based on what yt-dlp/youtube-dl returns in the field `requested_formats`. The problem is that this field only exists when there is more then one requested format. So `ytdl-format=bestvideo+bestaudio` would have that field, but `ytdl-format=bestaudio` would not, leading to no tracks being marked as default tracks. The requested formats can also be found under `requested_downloads`, which exists regardless of the number of requested formats. However when there is more then one requested format, `requested_downloads` doesn't contain those formats directly and instead has a field `requested_formats` that is identical to the other `requested_formats`. Therefore use `requested_downloads` as a fallback for when `requested_formats` doesn't exist.
* github/workflows: auto-update freebsd-vm within major versionJan Beich2022-08-121-1/+1
| | | | Reduce the churn by transparently picking up bustage fixes.
* drm_common: remove hard dependency on drmIsKMS()sfan52022-08-113-5/+30
| | | | | | ae768a1e141eb88243e46757d41ca0cada9502b4 forgot to bump the required libdrm version however Debian 11 just barely misses the requirement, which is a good reason not to require it unconditionally anyway.
* context_drm_egl: skip page flip wait on errorHo Ming Shun2022-08-111-1/+1
| | | | | Any error in page flipping caused mpv to wait indefinitely for a page flip callback.
* gpu/hwdec: reorder `drmprime` below `drmprime_drm`Philip Langdale2022-08-091-1/+1
| | | | | | | | | | | | | | The older overlay based drmprime hwdec should be preferred to the new texture mapping one. This is for a few reasons: 1. In any situation where both hwdecs work, it's probably right to use the more mature one by default, for now. 2. It seems like the overlay path primarily works on older SoCs where the texture path is less performant, and in at least one tested case is visually buggy, so you definitely want it to be tried first. 3. In situations where the old hwdec doesn't work, it will fall through to the new one.
* video/drmprime: fix use-after-freePhilip Langdale2022-08-091-1/+2
| | | | Same thing as in hwdec/drmprime.
* hwdec/drmprime: fix buildPhilip Langdale2022-08-091-1/+1
| | | | I accidentally included an adjustment for a pending change.
* hwdec/dmabuf_interop: Properly prefix `priv` structPhilip Langdale2022-08-095-14/+14
| | | | | Obviously, this should be dmabuf_interop_priv as it's declared in a header file that could get included anywhere.
* hwdec/drmprime: Fix small issuesPhilip Langdale