Commit Graph

50260 Commits

Author SHA1 Message Date
Niklas Haas 862be6c237 vo_gpu_next: tag screenshots with correct colorspace
When taking window screenshots with a colorspace override, tag them
appropriately, based on the best-known colorspace info. Note that this
is imperfect, we should ideally also attach the output ICC profile if
one exists. But this is better than nothing.

Also force 1:1 PAR in this case. In all other cases, default to sRGB.
2023-02-13 21:53:41 +01:00
Niklas Haas 5078132b28 vo_gpu_next: only apply target options in window screenshot mode
When taking an unscaled screenshot, always render to an unspecified
SDR-like space. (Subject to change) Apply output-specific options (ICC
profile, color space overrides, custom LUT) only in window screenshot
mode.

I decided to split this off from subsequent refactors because it is IMO
a bug fix deserving of its own commit.
2023-02-13 21:53:41 +01:00
Niklas Haas 4f84d91df2 vo_gpu_next: be explicit about screenshot repr
Screenshots are currently always RGB. Subject to change, but needs to be
communicated clearly if changed. This commit is not a functional change,
it's merely for code clarity.
2023-02-13 21:53:41 +01:00
rcombs 2e0bdbfe9c m_property: avoid using a small stack buffer in m_property_do_bstr
This allows operations on properties with longer names (e.g. deeply-nested user-data sub-props).
2023-02-13 14:39:41 -06:00
Niklas Haas 2d4a243810 vo_gpu_next: expose --tone-mapping=st2094-40 and st2094-10 2023-02-13 17:52:35 +01:00
Niklas Haas 79b093f210 vo_gpu_next: support mapping HDR10+ dynamic metadata
Based on the new upstream helper function `pl_map_hdr_metadata` and the
existing AV_FRAME_DATA_DYNAMIC_HDR_PLUS. This allows us to use SMPTE
2094-40 dynamic HDR tonemapping in mpv, albeit with the limitation of
requiring `--tone-mapping=auto` in order to pick this curve upstream.
2023-02-13 17:52:35 +01:00
Thomas Weißschuh a40958cdf8 ao_pipewire: allow usage of global volume control
PipeWire supports a global volume control for streams that works on top
of the per-channel volumes.
As mpv only supports a single volume with ao-volume it can make sense to
use the single global volume from PipeWire for it.
This allows the user to also specify per-channel volumes and not have
mpv trample over them.

This mode is not the default as pulseaudio does not support this
global volume control and all tooling controlling PipeWire via
pipewire-pulse (like pavucontrol) will not be able to see this channel.
2023-02-11 10:00:46 -08:00
Christoph Heinrich 8f76673608 command: only avoid redrawing when old and new osd are both hidden
The `osd-overlay` command didn't trigger a redraw when the overlay was
set to hidden.
This is fine when the overlay was already hidden before that, but
transitioning from not hidden to hidden requires a redraw.
2023-02-11 14:51:14 +01:00
Dudemanguy 180b4faed0 DOCS/options: remove testing note in video-sync-max-factor
This option is a bit obscure, but some people do use it and it can be
useful. The actual code that implements this is very simple, so there's
really no need to have a scary note in the docs about it possibly
changing or being removed.
2023-02-11 00:50:11 +00:00
Dudemanguy 1126df0d80 vf_sub: undeprecate
3a9e661e92 officially made this video
filter deprecated roughly 6 years ago. Every other video filter in that
commit has actually been removed since then except for vf_sub. ffmpeg
does have its own subtitles filter, but it doesn't have the same control
over scale like vf_sub does. That's probably why wm4 never actually
removed it. Let's stop scaring users with a warning since this filter
probably won't ever get removed. Closes #9254.
2023-02-11 00:50:11 +00:00
Aaron Boxer 49fd6caa43 vo_dmabuf_wayland: reject hw formats not supported by compositor 2023-02-11 00:46:46 +00:00
Leo Izen 8ba7b8f0d2 video/image_writer: change screenshot-tag-colorspace default to yes
With significant improvements to the color tagging support in various
screenshot formats, e.g. cICP in FFmpeg, and JPEG XL's generally robust
color support, it's safe to default this to yes.
2023-02-09 21:03:28 +01:00
Aaron Boxer a3340645be vo_dmabuf_wayland: add purgatory list to buffer pool to avoid memory leaks 2023-02-05 23:27:08 +00:00
Aaron Boxer 6803903e0c vo_dmabuf_wayland: ensure buffer pool is cleaned at start of uninit 2023-02-05 23:27:08 +00:00
Aaron Boxer ce6efc782f vo_dmabuf_wayland: simplify buffer pool reset 2023-02-05 23:27:08 +00:00
Aaron Boxer f1f6eaa3de vo_dmabuf_wayland: only resize when a new frame is about to be drawn 2023-02-05 23:27:08 +00:00
Max Dunbar 5bd991f338 DOCS/input: remove experimental note from sub-text 2023-02-05 16:23:29 +00:00
Thomas Weißschuh e439ddc051 ao_pipewire: report linking errors from init() 2023-02-03 12:33:09 -08:00
Thomas Weißschuh 83681de3c1 ao_pipewire: add support for exclusive mode 2023-02-03 12:33:09 -08:00
Thomas Weißschuh c29692d81d ao_pipewire: move stream flags to dedicated variable 2023-02-03 12:33:09 -08:00
Thomas Weißschuh 888a7c963f ao_pipewire: adjust message level based on probing
Use the ao->probing property to upgrade the status message when the AO
is explicitly selected.

Suggested-by: uau on #mpv-devel
2023-02-03 12:32:45 -08:00
Thomas Weißschuh 771c8a165a f_hwtransfer: fix leak of framesconstraints 2023-02-03 09:23:09 -08:00
Thomas Weißschuh c7c92240a9 image_pool: properly free frames
av_frame_unref() only frees the buffers, not the frame data itself.
2023-02-03 09:23:09 -08:00
Thomas Weißschuh b0fb6999a4 ao_pipewire: remove unneeded goto 2023-02-03 09:18:37 -08:00
Thomas Weißschuh c8d9155c56 ao_pipewire: replace opencoded talloc() 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 79795b8378 ao_pipewire: print stream states as string 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 24504418fc ao_pipewire: remove unnecessary empty lines 2023-02-03 09:18:37 -08:00
Thomas Weißschuh 69fb378575 ao_pipewire: remove opencoded spa_zero() 2023-02-03 09:18:37 -08:00
Thomas Weißschuh af3c7f3d31 ao_pipewire: remove some unnecessary linebreaks 2023-02-03 09:18:37 -08:00
Thomas Weißschuh c2c36c0d57 ao_pipewire: reduce message level of unsuccessful connection
As ao_pipewire is probed first if a user does not have PipeWire running
they will see a scary warning message even if another AO afterwards is
probed fine.
Tone down the error message so as not to confuse users.
2023-02-03 09:18:37 -08:00
Thomas Weißschuh 469f7af210 ao_pipewire: remove unnecessary braces 2023-02-03 09:18:37 -08:00
Kacper Michajłow bc7a126237 sws_utils: add check for HAVE_ZIMG to suppress warnings 2023-02-02 14:23:02 +00:00
Kacper Michajłow 87fb254deb vo_gpu_next: add check for PL_HAVE_LCMS 2023-02-02 14:23:02 +00:00
Kacper Michajłow a97dd423c8 hwdec_cuda: fix enum type for semaphore 2023-02-02 14:23:02 +00:00
Kacper Michajłow 68c1338d56 vo_d3d11: do not call MAKEINTRESOURCEW twice 2023-02-02 14:23:02 +00:00
Kacper Michajłow 3a28dbb711 osdep/io: add void to mp_penviron 2023-02-02 14:23:02 +00:00
Kacper Michajłow ebf34ffad3 demux: remove unused code 2023-02-02 14:23:02 +00:00
Kacper Michajłow 2048125f0c ao_lavc: remove unused code 2023-02-02 14:23:02 +00:00
Kacper Michajłow 0a4b139ddf osdep: add MP_FALLTHROUGH 2023-02-02 14:23:02 +00:00
Kacper Michajłow 08cd7c1e29 libplacebo: fix enum type cast 2023-02-02 14:23:02 +00:00
dyphire 070287aebb stats.lua: display HDR peak in nits
The value of `sig-peak` is relative to the SDR peak. This is not
a problem when used inside the player, but the `HDR peak` in stats
should display human-readable information.
So change to return the actual nits value of HDR.
Closed https://github.com/mpv-player/mpv/issues/10127
2023-02-02 14:22:40 +00:00
Dudemanguy cc87a25f7d meson: move vector check inside of meson.build
It's three lines. There's no real reason to have this as a separate file
when we've removed every other compile check sourced from outside files.
2023-02-02 14:22:09 +00:00
Dudemanguy a9c5414b86 meson: check macos touchbar with has_header 2023-02-02 14:22:09 +00:00
Dudemanguy bf32281425 meson: check pthread provider with has_function
Previously, we did this doing code fragments, but we can be a bit more
clever and use has_function as well as the platform we're on.
2023-02-02 14:22:09 +00:00
Leo Izen 7990dd8f3f video/image_writer: avoid stripping colorspace info when writing image
Writing an image either with vo_image or with a screenshot will strip
the colorspace info because it allocates a new mp_image that contains
the same data as the old image after calling mp_image_params_guess_csp.
However, mp_image_params_guess_csp cannot always guess the appropriate
colorspace, so it picks a "sane default." Since this function also
changes parameters so the space always makes sense, this extra info
isn't harmful and allows screenshots and vo_image outs to be properly
tagged with the correct colorspace.

Fixes #10988.
2023-01-31 12:39:04 -05:00
Alby 88918411f3 stream: accept webdav:// and webdavs:// urls
Treat them as http:// and https:// respectively. This allows to play files
on webdav archives directly on KDE, avoiding the (extremely slow) local
copying performed by kio.
2023-01-31 12:03:41 -05:00
Kacper Michajłow e4e3a8fc0b ci: pack mingw64 meson build instead of waf 2023-01-31 14:50:26 +00:00
Kacper Michajłow 7151b5122a ci: separate meson/waf build dirs 2023-01-31 14:50:26 +00:00
Kacper Michajłow 08d11e8c5d ci: use meson compile instead of ninja directly 2023-01-31 14:50:26 +00:00
Kacper Michajłow 2868ecf2ac ci: do not print compile commands
It only shadows warnings/errors and makes log files bloated.
2023-01-31 14:50:26 +00:00