0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

50097 Commits

Author SHA1 Message Date
Christoph Heinrich
a265da9f25 Partially revert "options: remove OPT_FLAG"
The m_option_type_flag is still needed for the CONF_TYPE_FLAG
(next commit).

Add a comment that m_option_type_flag shouldn't be used.

ref. #11373

This partially reverts commit 07545657bf.
2023-02-27 11:21:49 +01:00
rcombs
d941564d48 console: observe osc margins from user-data instead of shared-script-properties 2023-02-26 17:54:09 -06:00
rcombs
894f0c28eb osc: set values in user-data in addition to shared-script-properties 2023-02-26 17:54:09 -06:00
Christoph Heinrich
048d4d8b75 player: set playlist title to media title if not set already
The playlist title only got set when it was specified in the
playlist file.
If there is a title after opening a file, that should also be reflected
in the playlist.

ref. #4780
2023-02-26 22:39:54 +00:00
Thomas Weißschuh
ed5426c351 various: fix warning -Wimplicit-const-int-float-conversion 2023-02-26 16:45:07 +01:00
Thomas Weißschuh
8d67e891ab vo_gpu_next: fix warning -Wunused-function 2023-02-26 16:45:07 +01:00
Thomas Weißschuh
b4ae1551e4 vo_wayland: fix warning -Wvoid-pointer-to-enum-cast 2023-02-26 16:45:07 +01:00
sfan5
5a83745316 vd_lavc: sort hwdecs without hwdevices last for autoprobing
For hwdecs without devices we can't get instant feedback during probing
whether the hwdec can possibly work or not, so we definitely want to try them last.
Independently this would also have solved the issue addressed by the previous commit.
2023-02-26 16:40:59 +01:00
sfan5
1dda09b817 vd_lavc: prioritize mediacodec for hwdec autoprobe
This fixes an issue where mpv would try mediacodec (which may not
be available depending on Android version) and pick v4l2m2m next
which ends up failing even though mediacodec-copy would have been available.
2023-02-26 16:40:59 +01:00
Thomas Weißschuh
16f0cd546d video: make csp option definitions private 2023-02-24 13:55:29 +01:00
Thomas Weißschuh
fb48722234 video: make csp equalizer params float
This allows more precise adjustments.

Fixes #11316
2023-02-24 13:55:29 +01:00
sfan5
0d991eba72 vo_gpu: fix newline in log message 2023-02-24 13:33:45 +01:00
sfan5
3e85df3b2d demux: constify a struct member
Fixes a segfault when an invalid demuxer is given due to
uninitialized use of `filename` after goto.
2023-02-24 13:22:03 +01:00
Kacper Michajłow
84f6d7a97e vo_gpu_next: fix color space hint with target peak override
Fixes: #11339
2023-02-23 10:14:53 +01:00
sfan5
985a253f84 DOCS: clarify that GLX is deprecated 2023-02-22 23:25:47 +01:00
Christoph Heinrich
c0807e98fb options: remove explicit initialization of integers to 0 2023-02-21 17:15:17 +00:00
Christoph Heinrich
07545657bf options: remove OPT_FLAG 2023-02-21 17:15:17 +00:00
Christoph Heinrich
17d91b9d4d options: transition properties from flag to bool 2023-02-21 17:15:17 +00:00
Christoph Heinrich
4ebfe9851c options: transition commands from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
Christoph Heinrich
91cc0d8cf6 options: transition options from OPT_FLAG to OPT_BOOL
c784820454 introduced a bool option type
as a replacement for the flag type, but didn't actually transition and
remove the flag type because it would have been too much mundane work.
2023-02-21 17:15:17 +00:00
Christoph Heinrich
b9850a6e8c input: remove unused struct member 2023-02-21 17:15:17 +00:00
llyyr
d0eae60d67 DOCS/client-api-changes.rst: move mpv_del_property to 0.36.0
incorrectly placed under 0.35.0 by 2cfaa820e5
2023-02-21 17:07:57 +00:00
Thomas Weißschuh
9efce6d4ae various: drop unused #include "config.h"
Most sources don't need config.h.
The inclusion only leads to lots of unneeded recompilation if the
configuration is changed.
2023-02-20 14:21:18 +00:00
Thomas Weißschuh
a90355660c ao_pipewire: drop unused #include "generated/version.h" 2023-02-20 14:21:18 +00:00
rcombs
d1cf89b655 Vulkan: add configure check for VK_KHR_display extension
This allows building directly against ICDs that don't implement this extension.
2023-02-20 00:05:26 -06:00
Niklas Haas
9a752e8b26 vo_gpu_next: add --tone-mapping-visualize 2023-02-19 21:01:40 +01:00
quietvoid
41ad51bda2 vo_gpu_next: parse Dolby Vision metadata for dynamic scene brightness
Improves playback for Dolby Vision video files as the metadata can be
used instead of requiring `hdr-compute-peak=yes`.
2023-02-19 20:50:37 +01:00
quietvoid
0d82afbc7f mp_image: forward AV_FRAME_DATA_DOVI_RPU_BUFFER side data
When available, and ignored if `vf=format:dolbyvision=no`.
2023-02-19 20:50:37 +01:00
Leo Izen
2955a0759c
DOCS: document JPEG XL default effort change
Document the change in 7607432127.
2023-02-18 06:16:21 -05:00
Dudemanguy
e2cdc23af0 Revert "vo_dmabuf_wayland: drop support for linux-dmabuf-v2"
This was originally dropped because it was thought to be unneeded at the
time, but at least some devices (rockchip) apparently are still on old
compositors that use linux-dmabuf v2. It's not much code, and for
testing purposes it's good to have around since it's hard to test
drmprime otherwise. Some minor additions are here to support the newly
added vaapi-format mapping in v2 of the protocol.

This reverts commit a5b9d529ee.
2023-02-18 02:21:54 +00:00
Leo Izen
7607432127 video/image_writer: use effort=4 default for JXL screenshots
effort=4 has a significant increase in quality/bpp compared to effort=3
with a very minor increase in encoding time. It's worth the trade-off
as a default setting for lossy encoding.
2023-02-17 17:40:11 -05:00
Thomas Weißschuh
c3f326bc13 ao_pipewire: fix removal of zeroed hooks on old pipewire
Older versions of pipewire segfault when calling spa_hook_remove() on
hooks that are zeroed.
Add a backfill for the logic added by pipewire 0.3.57.

Being able to remove zeroed hooks makes errorhandling much easier.

See #11309
2023-02-15 16:37:20 -08:00
Niklas Haas
16ef237da5 vo_gpu_next: allow native CSP screenshots
Useful for getting native screenshots of non-sRGB content, such as HDR
etc.
2023-02-13 21:53:41 +01:00
Niklas Haas
c975888584 player/screenshot: pass on ability to output native CSP
Fixes: #10988
2023-02-13 21:53:41 +01:00
Niklas Haas
ff26024496 screenshot: explicitly default VOCTRL_SCREENSHOT csp
This allows the logic in `convert_image` to fast-path if the image
params are equal. Without this check, the image params are basically
never equal, because that path goes through `mp_image_params_guess_csp`
while the `mp_image` itself does not.

Force it here for consistency across VOs.
2023-02-13 21:53:41 +01:00
Niklas Haas
6d9e72cd89 video/image_writer: force sRGB for unsupported formats
After commit c98e7353, we blindly pass the screenshot colorspace to the
image writer. But since we want to introduces the ability to save images
in HDR and other exotic formats, we should strip this for unsupported
formats.

See-Also: #10988
2023-02-13 21:53:41 +01:00
Niklas Haas
01351a6412 video/image_writer: add image_writer_flexible_csp
PNG only supports this since the introduction of cICP, so put a version
check on the next API version bump after the cICP writing patch got
merged.
2023-02-13 21:53:41 +01:00
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