Commit Graph

11694 Commits

Author SHA1 Message Date
m154k1 cbb1af64d5 stats.lua: set sans-serif as default font
sans is deprecated and unsupported on some platforms.
2023-07-10 16:58:54 +02:00
Christoph Heinrich f266eadf1e demux_playlist: add option to control recursive directory loading
Directories were always loaded recursively, which can be slow
(e.g. one of the subdirectories is a mounting point to a slow device)
and can unexpectedly expand into a massive playlist.

Due to the problems described in 503dada42f,
this defaults to recursive loading.

ref. https://github.com/mpv-player/mpv/issues/9652
2023-07-06 18:17:45 +00:00
Dudemanguy ee69d99bd4 various: correctly ignore cache files with --no-config
--no-config should prevent loading user files of any type: configs,
cache, etc. For cache files, this case wasn't properly handled and it
was assumed they would always get something. vo_gpu's shader cache
actually already handles this, so it was left untouched. In theory,
demuxer cache should never have this issue because saving it to disk is
disabled by default (and likely that will never change), but go ahead
and change it for consistency's sake. Fixes some segfaults with
--no-config and various combinations of settings (particularly
--vo=gpu-next).
2023-07-06 13:08:23 +00:00
Dudemanguy 48e0ee9979 vo_gpu/vo_gpu_next: enable gpu shader and icc cache by default
4502522a7a changed the way mpv handled and
saved cached files. In particular, it made a separate boolean option for
actually enabling cache and left the *-dir options as purely just a path
(i.e. having a dir set didn't mean you save cache). This technically
regressed people's configs, so let's just turn the cache on by default.
Linux users already expect random stuff in ~/.cache and well everyone
else can just live with some files possibly appearing in their config
directory.
2023-07-04 22:14:43 +00:00
Dudemanguy dbc0fcea1b player: add --input-cursor-passthrough option
Add an option for allowing pointer events to pass through the mpv
window. This could be useful in cases where a user wants to display
transparent images/video with mpv and interact with applications beneath
the window. This commit implements this functionality for x11 and
wayland. Note that whether or not this actually works likely depends on
your window manager and/or compositor. E.g. sway ignores pointer events
but the entire window becomes draggable when you float it (nothing under
the mpv window receives events). Weston behaves as expected however so
that is a compositor bug. Excuse the couple of completely unrelated
style fixes (both were originally done by me).
2023-07-04 19:16:43 +00:00
Dudemanguy f76c441ba2 win32: add support for drag-and-drop option 2023-07-01 02:06:02 +00:00
Dudemanguy 6625a94608 options: add no to drag-and-drop
Suggested by @sfan5. Naturally, "no" disables all drag and drop
behavior.
2023-07-01 02:06:02 +00:00
cloud11665 de7f4fb1ee video/image_writer: add avif screenshot support
Notes:
- converts the (image) write() api to filenames, because using avio
with FILE* is a pain.
- adds more debug logs for screenshots.

build: rename av1 dependency to avif_muxer
wscript: unify lavf dependency with meson
2023-07-01 02:05:23 +00:00
Philip Langdale 9ff8c9e780 vd_lavc: let the user provide a priority list of hwdecs to consider
Today, the only way to make mpv consider multiple hwdecs and pick the
first one that works is to use one of the `auto` modes. But the list
that is considered in those cases is hard-coded. If the user wants to
provide their own list, they are out of luck.

And I think that there is now a significant reason to support this -
the new Vulkan hwdec is definitely not ready to be in the auto list,
but if you want to use it by default, it will not work with many codecs
that are normally hardware decodable (only h.264, hevc and av1 if you
are very lucky). Everything else will fall back to software decoding.

Instead, what you really want to say is: use Vulkan for whatever it
supports, and fall back to my old hwdec for everything else.

One side-effect of this implementation is that you can freely mix
hwdec names and special values like `auto` and `no`. The behaviour will
be correct, so I didn't try and prohibit any combinations. However,
some combinations will be silly - eg: sticking any further values after
`no` will result in them being ignored. On the other hand, a
combination like `vulkan,auto` could be very useful as that will use
Vulkan if possible, and if not, run the normal auto routine.

Fixes #11797
2023-06-29 11:58:51 -07:00
rcombs 5c4852d173 command: add sub-forced-only-cur prop 2023-06-25 11:01:58 +02:00
rcombs ba7cc07106 sub: rewrite auto-forced-only support
- No longer has a fake "option" used only internally (which didn't always get propagated properly)
- Always overrideable during playback
2023-06-25 11:01:58 +02:00
rcombs 991a2f79ce player: add more precise sub fallback options 2023-06-25 11:01:58 +02:00
rcombs 5dfa3f7f08 options: default slang to auto 2023-06-25 11:01:58 +02:00
rcombs 5f146e742a loadfile: support "auto" as a language option
This uses the user's OS-level preferred set of languages
2023-06-25 11:01:58 +02:00
rcombs 76009bf7a6 loadfile: use mp_match_lang_single
This adds basic support for IETF language tags,
as well as matching 2-letter language codes against 3-letter ones (and vice versa).
2023-06-25 11:01:58 +02:00
rcombs 1669c4698d options: set subs-with-matching-audio to off by default
This means that subtitles won't be displayed unless the user asks for them
2023-06-25 11:01:58 +02:00
Niklas Haas 0af81b16d8 vo_gpu_next: add --corner-rounding option
For better or worse.
2023-06-21 23:52:35 +02:00
Niklas Haas f1600ea9cf vo_gpu_next: add missing --gamut-mapping-mode options
Adds the missing upstream values that were exposed by the new gamut
mapping API.
2023-06-21 23:52:35 +02:00
Leo Izen d16f971df5
DOCS: fix admonition typo
Fix missing second : in DOCS/man/options.rst after a .. admonition::
2023-06-15 12:28:18 -04:00
Dudemanguy 8ecf2d37eb player: add drag-and-drop option
Some platforms (wayland) apparently have a lot of trouble with drag and
drop. The default behavior is still the same which is basically obeying
what we get from the window manager/compositor, but the --drag-and-drop
option allows forcibly overriding the drag and drop behavior. i.e. you
can force it to always replace the playlist or append at the end. This
only implements this in X11 and Wayland but in theory windows and macos
could find this option useful (both hardcode the shift key for
appending). Patches welcome.
2023-06-12 20:50:08 +00:00
Guido Cella 1fbaf4602e DOCS/mpv: add an example for applying profiles to certain paths
It is worth adding this example because it has been asked multiple times
in the issue tracker and the IRC channel.

string.find() is used because it's 20 times faster than string.match().
2023-06-07 19:04:21 -04:00
Philip Langdale 61e685594d hwdec_vulkan: add Vulkan HW Interop
Vulkan Video Decoding has finally become a reality, as it's now
showing up in shipping drivers, and the ffmpeg support has been
merged.

With that in mind, this change introduces HW interop support for
ffmpeg Vulkan frames. The implementation is functionally complete - it
can display frames produced by hardware decoding, and it can work with
ffmpeg vulkan filters. There are still various caveats due to gaps and
bugs in drivers, so YMMV, as always.

Primary testing has been done on Intel, AMD, and nvidia hardware on
Linux with basic Windows testing on nvidia.

Notable caveats:
* Due to driver bugs, video decoding on nvidia does not work right now,
  unless you use the Vulkan Beta driver. It can be worked around, but
  requires ffmpeg changes that are not considered acceptable to merge.
* Even if those work-arounds are applied, Vulkan filters will not work
  on video that was decoded by Vulkan, due to additional bugs in the
  nvidia drivers. The filters do work correctly on content decoded some
  other way, and then uploaded to Vulkan (eg: Decode with nvdec, upload
  with --vf=format=vulkan)
* Vulkan filters can only be used with drivers that support
  VK_EXT_descriptor_buffer which doesn't include Intel ANV as yet.
  There is an MR outstanding for this.
* When dealing with 1080p content, there may be some visual distortion
  in the bottom lines of frames due to chroma scaling incorporating the
  extra hidden lines at the bottom of the frame (1080p content is
  actually stored as 1088 lines), depending on the hardware/driver
  combination and the scaling algorithm. This cannot be easily
  addressed as the mechanical fix for it violates the Vulkan spec, and
  probably requires a spec change to resolve properly.

All of these caveats will be fixed in either drivers or ffmpeg, and so
will not require mpv changes (unless something unexpected happens)

If you want to run on nvidia with the non-beta drivers, you can this
ffmpeg tree with the work-around patches:

* https://github.com/philipl/FFmpeg/tree/vulkan-nvidia-workarounds
2023-05-28 15:46:05 -07:00
Niklas Haas dc13d47c73 vo_gpu_next: remove --tone-mapping-crosstalk
Removed upstream, to be replaced by constant 0.04.
2023-05-24 21:32:00 +02:00
Kacper Michajłow 9e716d6303 vo_gpu_next: allow to use ICC profile luminance value
Also while at it respect target-peak option when ICC profile is used.

Fixes #11449
2023-05-13 17:08:37 +02:00
Dudemanguy 4502522a7a player: use XDG_CACHE_HOME by default
This adds cache as a possible path for mpv to internally pick
(~/.cache/mpv for non-darwin unix-like systems, the usual config
directory for everyone else). For gpu shader cache and icc cache,
controlling whether or not to write such files is done with the new
--gpu-shader-cache and --icc-cache options respectively. Additionally,
--cache-on-disk no longer requires explicitly setting the --cache-dir
option. The old options, --cache-dir, --gpu-shader-cache-dir, and
--icc-cache-dir simply set an override for the directory to save cache
files. If unset, then the cache is saved in XDG_CACHE_HOME.
2023-05-09 20:37:17 +00:00
Dudemanguy 7c4c9bc86f player: use XDG_STATE_HOME for watch_later
A pain point for some users is the fact that watch_later is stored in
the ~/.config directory when it's really not configuration data. Roughly
2 years ago, XDG_STATE_DIR was added to the XDG Base Directory
Specification[0] and its description, user-specific state data, actually
perfectly matches what watch_later data is for. Let's go ahead and use
this directory as the default for watch_later. This change only affects
non-darwin unix-like systems (i.e. Linux, BSDs, etc.). The directory
doesn't move for anyone else.

Internally, quite a few things change with regards to the path
selection. If the platform in question does not have a statedir concept,
then the path selection will simply return "home" instead (old
behavior). Fixes #9147.

[0]: 4f2884e16d
2023-05-09 20:37:17 +00:00
Nick Hanley a1580b6424 DOCS/options: document required parameter for --x11-name 2023-05-06 21:26:50 +00:00
Guido Cella c5211dbf4a console.lua: add a script-opt for the border size
Because I find the console log easier to read with a thicker border.
2023-04-26 16:30:01 +00:00
Thomas Weißschuh 71f9e97fc0 ao_pipewire: clarify --pipewire-buffer=native 2023-04-23 21:03:58 -07:00
Thomas Weißschuh 993553e138 ao_pulse: clarify --pulse-buffer=native 2023-04-23 21:03:58 -07:00
Dudemanguy 3c1686488b meson: use the new build_options method
This finally allows us to put any user defined options into the
CONFIGURATION variable like what waf does. The arbitrary hardcoded
fallback is left in place for old meson versions. Also update the
documentation in regards to the mpv-configuration variable to be
relevant to meson.
2023-04-11 20:05:36 +00:00
Guido Cella 41372c5e1f auto_profiles.lua: apply profiles when conditions are truthy
Instead of erroring when values returned by profile-cond expressions
aren't booleans, apply the relative profiles as long as the return
values are truthy. This allows shortening conditions like

profile-cond=path:match('foo') ~= nil

to

profile-cond=path:match('foo')
2023-04-05 18:32:18 +00:00
feltcat 0f13c38e72 DOCS/input: fix typo 2023-03-30 13:57:08 +00:00
Alexander Seiler bdf7b5c3b8 various: fix various typos in the code base
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
2023-03-28 19:29:44 +00:00
Harri Nieminen 292a5868cb various: fix typos
Found by codespell
2023-03-28 19:29:44 +00:00
cloud11665 664f197746 player/screenshot: add filename return field
DOCS/input: add screenshot return value description
2023-03-25 16:24:21 +00:00
Christoph Heinrich 34a04d0567 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.
2023-03-24 02:28:49 +00:00
Ameer Taweel 892ca9f5d9 DOCS/lua: fix typo 2023-03-21 15:49:42 +02:00
Dudemanguy 9880b06a37 wayland: make wayland-edge-pixels-pointer default to 16
10 is ludicrously small. How did no one on an CSD compositor complain
about this?
2023-03-08 14:06:22 +00:00
Dudemanguy 9db818279a test: integrate unittests with meson
This reworks all of mpv's unit tests so they are compiled as separate
executables (optional) and run via meson test. Because most of the tests
are dependant on mpv's internals, existing compiled objects are
leveraged to create static libs and used when necessary. As an aside, a
function was moved into video/out/gpu/utils for sanity's sake (otherwise
most of vo would have been needed). As a plus, meson multithreads
running tests automatically and also the output no longer pollutes the
source directory. There are tests that can break due to ffmpeg changes,
so they require a specific minimum libavutil version to be built.
2023-03-02 15:45:27 +00:00
Dudemanguy 3535e326dc player: remove unittest option
Since meson has its own unit testing system, let's rework mpv's tests so
they integrate nicely with this. To prepare for this, start off by
dropping the unittest option. Of course, this means that tests will no
longer be supported in the waf build at all but it will be dropped
anyway. Note that the tests option is preserved for the meson build. We
will still make use of this in the future commits.
2023-03-02 15:45:27 +00:00
Dudemanguy c31e145e1f DOCS/options: mention default value of cursor-autohide
Closes #11358.
2023-03-01 23:17:33 -06:00
Dudemanguy 7bd528dbeb DOCS/options: clarify hidpi-window-scale description
It's enabled by default everywhere. The sentences about macOS is
misleading and may imply it's disabled by default on the other
platforms.
2023-03-01 23:13:57 -06:00
Dudemanguy c993d5c0ce player: add --auto-window-resize option
mpv's window resizing logic always automatically resized the window
whenever the video resolution changed (i.e. advancing forward in a
playlist). This simply introduces the option to make this behavior
configurable. Every windowing backend would need to implement this
behavior in their code since a reconfigure event must always be a
resize. The params of the frame changed so you either have to resize the
window to the new size of the params or make the params the same size as
the window. This commit implements it for wayland, win32, and x11.
2023-03-02 02:55:36 +00:00
Frédéric Brière 779d4f99a7 sub: add --sub-fonts-dir and --osd-fonts-dir options
These options make it possible to specify the directory that will be
passed to ass_set_fonts_dir(), akin to VLC's `--ssa-fontsdir` and
FFmpeg's `fontsdir`.

Fixes #8338
2023-03-01 02:09:46 +00:00
Dudemanguy 80feac62f1 command: add platform property
This returns the value of the target OS that mpv was built on as
reported by the build system. It is quite conceivable that script
writers and API users would need to make OS-dependent choices in some
cases. Such people end up writing boilerplate/hacks to guess what OS
they are on. Assuming you trust the build system (if you don't, we're in
really deep trouble), then mpv actually knows exactly what OS it was
built on. Simply take this information at configuration time, make it a
define, and let mp_property_platform return the value.

Note that mpv has two build systems (waf and meson), so the names of the
detected OSes may not be exactly the same. Since meson is the newer
build system, the value of this property follows meson's naming
conventions*. In the waf build, there is a small function to map known
naming deviations to match meson (i.e. changing "win32" to "windows").
waf's documentation is a nightmare to follow, but it seems to simply
take the output of sys.platform in python and strip away any trailing
numbers if they exist (exception being win32 and os2)*.

*: https://mesonbuild.com/Reference-tables.html#operating-system-names
*: https://waf.io/apidocs/Utils.html#waflib.Utils.unversioned_sys_platform
2023-02-27 17:13:21 +00: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 fb48722234 video: make csp equalizer params float
This allows more precise adjustments.

Fixes #11316
2023-02-24 13:55:29 +01:00
sfan5 985a253f84 DOCS: clarify that GLX is deprecated 2023-02-22 23:25:47 +01: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
Niklas Haas 9a752e8b26 vo_gpu_next: add --tone-mapping-visualize 2023-02-19 21:01:40 +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
Niklas Haas 2d4a243810 vo_gpu_next: expose --tone-mapping=st2094-40 and st2094-10 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
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
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
Max Dunbar 5bd991f338 DOCS/input: remove experimental note from sub-text 2023-02-05 16:23:29 +00:00
Thomas Weißschuh 83681de3c1 ao_pipewire: add support for exclusive mode 2023-02-03 12:33:09 -08:00
Dudemanguy da81a6d532 wayland: add auto choice to wayland-configure-bounds
Previously, this defaulted to yes and configure-bounds from the
compositor would always apply. In the case where the user explicitly set
autofit or geometry, this could be confusing because configure-bounds
would take precedence over it. Instead, let's add an auto choice and
make that the default. If we detect that the option is on auto and that
there is autofit/geometry being set, then ignore the event. This should
be more intuitive since someone who bothers to explicitly set mpv's
geometry would naturally expect that geometry to actually apply.
2023-01-30 03:59:40 +00:00
Avi Halachmi (:avih) 86093fcae7 lua/js: remove user-data helpers
This reverts:
  3fb4140c lua/defaults: add user_data helpers
  68a20e7a javascript/defaults: add user_data helpers
  00510379 lua/js: fix user_data_del util function

As well as the lua/js parts of:
  3ec2a098 docs: document new user-data property

user-data and its sub-properties can be set/get/observed/deleted
via the standard properties interface, so there's no need for
additional helpers specific to user-data, which only added maintenance
burden.
2023-01-29 01:52:31 +02:00
rcombs 0f3a041796 doc: correct spelling of user-data/user_data JS/lua helpers 2023-01-28 14:55:24 -06:00
rcombs 3ec2a0988a docs: document new user-data property 2023-01-28 14:37:24 -06:00
rcombs 94e1659b6c javascript: add mp.del_property() 2023-01-28 14:20:20 -06:00
rcombs 51c6784df7 lua: add mp.del_property() 2023-01-28 14:20:20 -06:00
rcombs 2cfaa820e5 libmpv: add mpv_del_property() convenience function 2023-01-28 14:20:20 -06:00
rcombs 04241ab731 player/command: add "del" command 2023-01-28 14:20:20 -06:00
Oxan van Leeuwen 91ba71b09f DOCS: Add missing 'not' 2023-01-28 11:59:59 -05:00
Kacper Michajłow 9d659ed847 DOCS/compile-windows.md: update MSYS2 packages 2023-01-28 01:03:12 +00:00
Dudemanguy 879824a47f wayland: add wp-fractional-scale-v1 support
This protocol is pretty important since it finally lets us solve the
longstanding issue of fractional scaling in wayland (no more mpv doing
rendering over the target resolution and then being scaled down). This
protocol also can completely replace the buffer_scale usage that we are
currently using for integer scaling so hopefully this can be removed
sometime in the future. Note that vo_dmabuf_wayland is omitted from the
fractional scale handling because we want the compositor to handle all
the scaling for that VO.

Fixes #9443.
2023-01-24 00:04:39 +00:00
sfan5 c7ea0cd68f vd_lavc: add "auto" choice for vd-lavc-dr
--vd-lavc-dr defaulted to "yes", which caused issues on certain
hardware. Instead of disabling it, add a new "auto" value and
make it the default.

The "auto" choice will enable DR only when we can request host-cached
buffers (as signalled by the new VO_DR_FLAG_HOST_CACHED).

Co-authored-by: Nicolas F. <ovdev@fratti.ch>
Co-authored-by: Niklas Haas <git@haasn.dev>
2023-01-23 14:13:34 +01:00
LaserEyess 50169e05d8 DOCS/compile-windows.md: update with meson instructions
No need to encourage waf here.

Note: minor edits by Dudemanguy to update some dead links and such.
2023-01-15 16:46:11 +00:00
sfan5 9196abf111 DOCS: clarify wid casting on Windows
The situation here is that HWND is always a 32-bit value but the
win32 API also accepts sign-extended values as valid. The trouble
starts when the numeric value is negative, as mpv ignores those.
Apparently this only happens after a while (related to uptime
or number of handles created), which meant this problem was rare.

addresses #10189
2023-01-12 22:02:07 +01:00
Dudemanguy 6471afecd0 player: don't force saving start in watch-later-options
The watch-later mechanism has always unconditionally wrote start to
files to save the playback position. When this was later expanded to
watch-later-options, this logic was kept in place. But we don't actually
have to unconditionally write this and can allow users to remove the
option from the list if they want to. The start value still requires
some special handling; it should always be written if possible
regardless of the value changing. However, we can just place it within
the default set of options for watch-later-options so it can be removed
like any other.
2023-01-09 16:37:14 +00:00
Christoph Heinrich c4ec47a65e player: add video-sync=display-tempo
So far there was no way to sync video to display and have audio sync to
video without changes in pitch.

With this option the audio does not get resampled (pitch change) and
instead the corrected audio speed is applied to audio filters.
2023-01-09 15:17:09 +00:00
Sultan Alsawaf eb29aa4839 demux: add --demuxer-hysteresis-secs option to save power with caching
Buffering ahead nonstop into the cache results in nonstop disk or network
activity to read stream data from wherever it may originate. Currently,
there's no way to configure the demuxer to back off once it's buffered
ahead enough data, since the cache limit will be perpetually not-reached as
a stream continues to play, until the entire stream is eventually buffered.

On a laptop with an i9-12900H with decoding performed by the iGPU,
watching a locally-saved 1080p video which hasn't been buffered into the
page cache consumes approximately 15 W even with caching enabled. When
configuring a hysteresis to make the demuxer back off, power consumption
drops to 9 W when watching the same video, resulting in a whopping 6 W of
power savings.

To make it possible to attain significant power savings via caching, add
a --demuxer-hysteresis-secs option to configure a hysteresis to make the
demuxer back off until there's only the configured number of seconds
remaining in the cache from the current playback position.

This feature is disabled by default.
2022-12-30 10:30:22 +01:00
Mia Herkt 874e28f4a4
vo_kitty: Introduce modern sixel alternative
See https://sw.kovidgoyal.net/kitty/graphics-protocol/

This makes no attempt at querying terminal features or handling
terminal errors, as it would require mpv to pass the response codes
from the terminal to the vo instead of interpreting them as
keystrokes made by the user and acting very unpredictably.

Tested with kitty and konsole.

Fixes #9605
2022-12-21 19:39:30 +01:00
Mia Herkt d5c3b9d989
man/vo: Typo 2022-12-20 11:12:23 +01:00
Mia Herkt 383ca54fc5
man/vo: Correct --vo-sixel-buffered 2022-12-20 11:10:28 +01:00
Mia Herkt 125fd4c2f9
vo_sixel: Rename draw-clear -> config-clear 2022-12-20 10:29:49 +01:00
Mia Herkt a4cac2ddc6
vo_sixel: Alias/deprecate exit-clear -> alt-screen
Also update documentation to reflect actual behavior.
2022-12-20 10:22:51 +01:00
Mia Herkt 12c3203e98
vo_sixel: Make buffering optional
It can be slower than unbuffered.
2022-12-20 10:06:49 +01:00
Mia Herkt aa3e9b706f
man/vo: Fix rendering error due to non-printables 2022-12-20 06:57:12 +01:00
Mia Herkt 67bdda27f7
DOCS/interface-changes: Add --vo-sixel-draw-clear 2022-12-20 03:54:38 +01:00
Mia Herkt 68ae603e75 vo_sixel: Add option to skip clear while drawing 2022-12-19 13:48:49 +01:00
NRK 25b66256d7 player: add window-id property
currently only supported on x11.

one practical use-case of this is wanting to embed something (such as
dmenu) into the mpv window to use as a menu/selection. there might be
other use-cases as well (e.g doing some shenanigans with `xdotool` or
whatnot).

it's currently possible to:

* listen for 'current-window-scale' change (to check if the
  window has been created or not)
* call an external tool like `xdo` or `xdotool` and grab the xid
  from mpv's pid.

however it adds unnecessary dependency on external tools when mpv is
fully capable of easily providing this information.

closes: #10918
2022-12-05 02:03:25 +00:00
LaserEyess ba20f60add drm: remove legacy API
The legacy DRM API adds some complexity to the DRM code. There
are only 4 drivers that do not support the DRM Atomic API:

1. radeon (early GCN amd cards)
2. gma500 (ancient intel GPUs)
3. ast (ASPEED SoCs)
4. nouveau

Going forward, new DRM drivers will be guaranteed to support the atomic
API so this is a safe removal.
2022-11-16 09:32:55 +01:00
Dudemanguy 6623efb142 wayland: add support for content-type protocol
The content-type protocol allows mpv to send compositor a hint about the
type of content being displayed on its surface so it could potentially
make some sort of optimization. Fundamentally, this is pretty simple but
since this requires a very new wayland-protocols version (1.27), we have
to mess with the build to add a new define and add a bunch of if's in
here. The protocol itself exposes 4 different types of content: none,
photo, video, and game.

To do that, let's add a new option (wayland-content-type) that lets
users control what hint to send to the compossitor. Since the previous
commit adds a VOCTRL that notifies us about the content being displayed,
we can also add an auto value to this option. As you'd expect, the
compositor hint would be set to photo if mpv's core detects an image,
video for other things, and it is set to none for the special case of
forcing a window when there is not a video track. For completion's sake,
game is also allowed as a value for this option, but in practice there
shouldn't be a reason to use that.
2022-11-15 23:18:55 +00:00
Dudemanguy 38a626650a player: add --force-render option
mpv has an internal optimization on a couple of platforms where it will
not render any frames if the window is minimized or hidden. There's at
least once possible use case for wanting to force a render anyway
(screensharing with pipeware) so let's just add a simple switch for
this that always forces mpv to render. Closes #10846.
2022-11-15 15:31:21 +00:00
sfan5 1e9a2cbebf DOCS: update release policy to match reality 2022-11-13 15:01:34 +01:00
Niklas Haas 33136c276c vo_gpu_next: add tunable shader parameters
This is a very simple but easy way of doing it. Ideally, it would be
nice if we could also add some sort of introspection about shader
parameters at runtime, ideally exposing the entire list of parameters as
a custom property dict. But that is a lot of effort for dubious gain.

It's worth noting that, as currently implemented, re-setting
`glsl-shader-opts` to a new value doesn't reset back previously mutated
values to their defaults.
2022-11-11 13:58:35 +01:00
Christoph Heinrich 445a3561d3 console: add history deduplication
Deduplicate history like the fish shell. So for example
entering "cmd 1" then "cmd 2" then "cmd 3" then "cmd 1"
would result in a history of
[cmd 2][cmd 3][cmd 1]
instead of
[cmd 1][cmd 2][cmd 3][cmd 1]

Adds a function `history_add` to replace directly adding to history.
Adds an option `history_dedup` to activate the deduplication.
Defaults to on.
2022-11-03 13:30:58 +01:00
Dudemanguy adb556bf15 vo_dmabuf_wayland: use special ra_ctx_create_by_name
vo_dmabuf_wayland has its own ra and context so it can handle all the
different hwdec correctly. Unfortunately, this API was pretty clearly
designed with vo_gpu/vo_gpu_next in mind and has a lot of concepts that
don't make sense for vo_dmabuf_wayland. We still want to bolt on a
ra_ctx, but instead let's rework the ra_ctx logic a little bit. First,
this introduces a hidden bool within the ra_ctx_fns that is used to hide
the wldmabuf context from users as an option (unlike the other usual
contexts). We also want to make sure that hidden contexts wouldn't be
autoprobed in the usual ra_ctx_create, so we be sure to skip those in
that function. Additionally, let's create a new ra_ctx_create_by_name
function which does exactly what says. It specifically selects a context
based on a passed string. This function has no probing or option logic
is simplified just for what vo_dmabuf_wayland needs. The api/context
validations functions are modified just a little bit to make sure hidden
contexts are skipped and the documentation is updated to remove this
entries. Fixes #10793.
2022-10-28 02:36:46 +00:00
Aaron Boxer aeb4792cb6 vo_vaapi_wayland: remove, as it is superceded by vo_dmabuf_wayland 2022-10-26 18:41:47 +00:00
Aaron Boxer 7358b9d371 vo_dmabuf_wayland: wayland VO displaying dmabuf buffers
Wayland VO that can display images from either vaapi or drm hwdec

The PR adds the following changes:

1. a context_wldmabuf context with no gl dependencies
2. no-op ra_wldmabuf and dmabuf_interop_wldmabuf objects
   no-op because there is no need to map/unmap the drmprime buffer,
    and there is no need to manage any textures.

Tested on both x86_64 and rk3399 AArch64
2022-10-26 18:41:47 +00:00
Leo Izen 050f5e7915 DOCS: document E to cycle through Editions
Pushing E (aka Shift+e) cycles through Editions for containers
that support editions, such as Matroska, although this feature was not
documented before this commit.
2022-10-24 15:23:41 -04:00
Leo Izen b3d77397eb
DOCS: fix minor typo with keep-open description
Fix a minor typo in the description of --keep-open
in DOCS/man/options.rst
2022-10-12 10:19:09 -04:00
Philip Langdale 064059e6c3 vo_gpu/hwdec: rename and introduce legacy names for some interops
We've had some annoying names for interops, which we can't simply
rename because that would break config files and command lines. So we
need to put a little more effort in and add a concept of legacy names
that allow us to continue loading them, but with a warning.

The two I'm renaming here are:
* vaapi-egl -> vaapi (vaapi works with Vulkan too)
* drmprime-drm -> drmprime-overlay (actually describes what it does)
* cuda-nvdec -> cuda (cuda interop is not nvdec specific)
2022-10-11 10:07:48 -07:00
Thomas Weißschuh 161bdd9359 ao_pipewire: allow specification of remote name 2022-10-06 13:16:35 -07:00
Niklas Haas 7f5541fc3c vulkan: remove --vulkan-disable-events
This has had no effect since libplacebo v4.192.0, and was deprecated
upstream a year ago. No deprecation period in mpv is justified by this
being a debug / work-around option.
2022-10-05 16:35:14 +02:00