Commit Graph

48950 Commits

Author SHA1 Message Date
Niklas Haas 6265724f33 vo_gpu: placebo: keep track of texture sample mode
This fixes an issue where dithering was effectively broken on libplacebo
versions >= 103 because the dither texture was being sampled with
edge-clamped rather than repeating semantics.
2021-03-21 17:18:20 +01:00
Chris Varenhorst 5824d9fff8 stats.lua: include a filter's @label when displaying filters on page 1 2021-03-15 23:00:42 +02:00
rim 1b2e5137e0 ao_oss: add this audio output again
Changes:
- code refactored;
- mixer options removed;
- new mpv sound API used;
- add sound devices detect (mpv --audio-device=help will show all available devices);
- only OSSv4 supported now;

Tested on FreeBSD 12.2 amd64.
2021-03-15 12:42:35 +01:00
Tom Wilson e79e455a36 audio: prevent uninit_audio_out during encoding
There was a simple oversight that meant audio outputs were
uninitialized during an encoding, which is not allowed, the encoding
would stop with numerous errors.
I added a single line to prevent the call of uninit_audio_out in
reinit_audio_chain if the encoder was active and this appears to have
fixed the problem without breaking anything else.

Fixes #8568
2021-03-15 01:06:10 +01:00
parazyd 6a903a9a08 stream_lavf: add support for Gopher over TLS.
Gopher over TLS (gophers) is a community-adopted protocol and has recently
been merged in:
 - curl (a1f06f32b8603427535fc21183a84ce92a9b96f7)
 - ffmpeg (51367267c8a9f1a840f5e810f8c788e6e03712a5)
2021-03-15 00:56:11 +02:00
Thomas Weißschuh 63d71ba4ec ao/pulse: signal the mainloop when ops are done
Without the explicit signal the call to pa_threaded_mainloop_wait()
will not return as soon as possible.

Fixes 4f07607888
See #8633
2021-03-11 23:37:13 +02:00
Tom Wilson d7f6eba233 player/command: add albumart argument to video-add
Enables marking of specific video sources as album art.

Co-authored-by: Jan Ekström <jeebjp@gmail.com>
2021-03-09 23:28:21 +02:00
Jan Ekström eef281e89e player/{core,loadfile}: make cover art loading more explicit
Now loading cover art through mp_add_external_file requires an
additional argument to be set to true. This way not all video-add
commands end up being marked as cover art when they move through
mp_add_external_file, as originally changed in 55d7f9ded1 .

Additionally, this lets us clean up some logic that would otherwise be
duplicated between open_external_files and autoload_external_files, if
the logic had been kept split from mp_add_external_file.

Fixes #8358
2021-03-09 23:26:26 +02:00
Thomas Weißschuh 4f07607888 ao/pulse: wait for command completion when setting volume or mute
This makes the behavior of all control messages consistent,
fixing an inconsistency that has been with us since
4d8266c739 - which is the initial
rework of the polyaudio AO into the pulseaudio AO.

Muting the stream also directly triggers an update to the OSD.
When not waiting for the command completion this read of the mute
property may read the old state. A stale read.

Note that this somehow was not triggered on native Pulseaudio, but it is
an issue on Pipewire.

See https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/868
2021-03-09 23:08:16 +02:00
rnhmjoj 45e6804478 ytdl_hook: fix crash on missing track bitrate
Some tracks happen to lack bitrate information (ie. no tbr value).
In that case, just ignore the track while computing the max bitrate.

For an example, this is a stream in which all audio tracks
have no bitrate: https://www.raiplay.it/dirette/rai1
2021-03-08 14:01:34 +02:00
jimman2003 aac1844179 umpv: Use generator expression for files
Instead of list. potential memory savings.
2021-03-03 21:35:33 +02:00
Dudemanguy 99968e1ce5 wayland: no mouse dragging in fullscreen/maximized
The wayland code takes mouse dragging into account in order to trigger a
client-side request for a window move or window resize. According to the
xdg-shell spec*, "[t]he server may ignore move[/resize] requests
depending on the state of the surface (e.g. fullscreen or maximized)".
Since it is not actually a hard requirement, that means the compositor
could actually respond to a clientside move/resize request even if the
mpv window was fullscreen. For example, it was pointed out that in sway,
if mpv is a floating window, you could drag it around off screen even
though the window is fullscreen.

This kind of behavior does not really have any practical use. A user can
should pan a video if he/she wishes to move its orientation while
fullscreen (or maximized for that manner). Naturally, a maximized or
fullscreened window should never be manually resized (every compositor
likely ignores this anyway). The fix is to simply just not trigger the
smecial mouse dragging case if the wayland surface is fullscreened or
maximized.

*:https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/stable/xdg-shell/xdg-shell.xml
2021-03-02 16:40:13 -06:00
Guido Cella 0888e53fc4 manpage: mention rotate limitations with hwdec 2021-03-02 16:14:12 +02:00
sfan5 bbbf3571ed vd_lavc: wrap use of deprecated AVCodecContext.thread_safe_callbacks in #if
For compatibility once FFmpeg removes it entirely.
2021-03-02 15:00:37 +01:00
Guido Cella 8a7ef58b2d manpage: video-rotate supports arbitrary steps
The 90° step limitation must be a leftover from old behavior since any
value between 0 and 359 works now.
2021-03-02 14:00:12 +01:00
der richter d1be8bb606 mac: fix traditional fullscreen on macOS 11
the fullscreen style mask is not supported on macOS 11 anymore outside
of the native fullscreen animation. this can lead to a none working fs
or in the worst case a crash.

to fix this we will simulate a fullscreen window with a borderless
window with the size of the whole screen, though only on macOS 11.

Fixes #8490
2021-02-27 13:12:46 +01:00
der richter c2868bdd39 mac: remove an unused variable 2021-02-27 13:12:46 +01:00
Niklas Haas 09d7c75bfe vo_gpu: libplacebo: require v2.72.0
It's about a year old, and packaged pretty much everywhere that bothers
to package libplacebo at all. Older versions are only a thing on LTS,
which will probably also use older mpv so it works out.

Starting with v2.72.0, libplacebo validates all of its parameters
internally and turns them into function failures. Doing it twice is
awfully redundant, so we can drop the parameter validation.

Also allows us to drop some preprocessor macros.
2021-02-23 12:44:04 +02:00
Biswapriyo Nath b95c7dd6cc appveyor: Use MSYS2's spirv-cross package instead of building it 2021-02-23 01:38:39 +02:00
Biswapriyo Nath 5de72613b9 appveyor: use latest build image for fixed MSYS2 installation
As MSYS2 installer issues are fixed, remove the workaround from previous commits
b8104a013d and ea91162802
2021-02-23 01:38:39 +02:00
der richter 26ec0e3d46 msg: fix really-quiet option to only affect terminal output
if log-file and really-quiet options were used together it could lead to
a completely empty log-file. this is unexpected because we need the
log-file option to work in all cases and produces at least a log of
verbosity -v -v. this is a regression of commit
a600d152d2

move the really quiet check back up, so it's set before the evaluation
of the actual log level, where check for log file, terminal, etc take
place.
2021-02-23 00:56:21 +02:00
Evgeny Zinoviev 56669fb44e mac: add ability to toggle visibility on all workspaces from menubar 2021-02-21 13:38:53 +01:00
Evgeny Zinoviev a4204be50f command: add label for on-all-workspaces command 2021-02-21 13:38:53 +01:00
Evgeny Zinoviev f913570aad mac: support --on-all-workspaces option 2021-02-21 13:38:53 +01:00
Niklas Haas c766e47b70 vo_gpu: don't abort() if plane tex creation fails
In this case, we just treat all uploads as automatically failing. That
error path already exists and is already handled correctly.

Fixes #8566
2021-02-16 14:22:29 +01:00
Jan Ekström b0b37df31f filters/auto_filters: switch from scaletempo to scaletempo2
Part 1 of "look how well it performs, then start cleaning up the
old one."

Closes #8376
2021-02-15 00:13:03 +02:00
Dorian Rudolph 2e45a3d336 af_scaletempo2: fix crash for speed >= 16
The input buffer size was fixed, but the required size depends on the
speed. Now the buffer will be resized dynamically.

Fixes #8081
2021-02-15 00:07:27 +02:00
der richter 93066ff12f travis: fix macOS VMs with older homebrew versions
apparently travis changed the homebrew setup and that broke the build.
reasons was a different homebrew version that doesn't support the new
brew cli.
2021-02-13 15:51:32 +01:00
der richter 7f8d069087 mac: only update touch bar items when necessary
the slider on the touch bar was always updated when any of the related
properties changed their value. this is partially dependent on the
refresh rate of the video, in the case of time-pos. too many updates to
touch bar impact the render performance.

to prevent this we only update the slider when necessary, when the touch
bar or the touch bar item is visible. the touch bar items only need a
granularity of seconds without any decimals, but the time-pos property
provides a granularity with decimals. we floor those values and only
update the touch bar items when we have at least a 1 second difference.
we also check for the visibility of the touch bar and its items.

Fixes #8477
2021-02-13 15:51:32 +01:00
der richter aa00ad06aa mac: use custom touch bar item and slider instead of a touch bar slider
the NSSliderTouchBarItem seem to be broken in a way it can't be fixed.
it has constraints set by default that can't be removed and lead to
warnings and render performance regressions.

instead of using the preconfigured NSSliderTouchBarItem we use a custom
touch bar item (NSCustomTouchBarItem) with a slider, which essential are
the same. this way we can configure our constraints ourselves, which
aren't needed in the first place.

Fixes: #7047
2021-02-13 15:51:32 +01:00
Niklas Haas 968faef867 vo_gpu: vaapi: export plane pitch properly 2021-02-12 23:31:46 +01:00
Érico Rolim ce3fe08bd4 DOCS: fix cplugins information in libmpv.rst. 2021-02-12 23:25:08 +02:00
Paul B Mahol 0075b76eeb demuxer/demux_mf: add support for more image codecs 2021-02-06 12:30:53 +01:00
Mia Herkt f60725263c
man: update deband-threshold default 2021-02-05 15:37:16 +01:00
Mia Herkt 12ffce0f22
vo_gpu: lower default deband threshold
The previous default was found to be too aggressive for most video.
Change to a lower value to prevent destroying too much detail.
2021-02-05 15:15:55 +01:00
Emmanuel Gil Peyrot f8a9654873 vo_wlshm: support big endian systems
The video was otherwise blue, and that’s not how it should be. :)
2021-02-04 21:13:09 +02:00
der richter 8121d958ec README: update libass dependency harfbuzz as non-optional
since libass 0.15 harfbuzz is no longer optional.

Fixes #8412
2021-01-24 16:54:31 +02:00
garoto f6a92659fd manpage: fix PDF build
Not clear what exactly makes it fail with this change, but making
the note paragraph added in d5ab5482a9 a note structure seems to fix it.
2021-01-23 18:24:21 +02:00
Chris Varenhorst 51852aad52 docs: Fix an old style parameter reference
`--vf format:stereo-in=help` no longer works.  It now must be `--vf=format:stereo-in=help`
2021-01-20 01:15:36 +02:00
Jim Manos 5edf22d2e9 umpv: remove unused imports
* fcntl usage was replaced by socket usage in
  518bd4c306
* stat usage was removed in 51a3f13705
  as the socket was created under the user's HOME.
2021-01-19 22:44:59 +02:00
Mia Herkt 8753bd0198
stream_lavf: support rtsps
Fixes #8480
2021-01-19 13:10:58 +01:00
sfan5 a3e440c611 player: make resetting of track selection to "auto" work 2021-01-16 15:17:01 +01:00
der richter dae9ea3fa7 mac: fix dangling pointers
initialising UnsafeMutableRawPointer the way we did won't free those
pointers and we get dangling pointers. explicitly define a scope those
pointers are alive and auto freed.
2021-01-13 16:23:47 +01:00
der richter ce1571ac01 mac: drop build support for swift versions earlier than version 4.1
this drops support for swift <4.1 and with this support for xcode <=9.2.
this was the last setup that is officially working on macOS 10.12.

our old legacy build macOS 10.12 + xcode 9.2 is replaced by macOS 10.13
+ xcode 9.4.1 with swift 4.1. the macOS 10.13 + xcode 10.1 VM is
replaced by the latest macOS 10.14 + xcode 11.3.1 VM. this is the oldest
version officially supported by Apple.

this is in preparations for the following commit.
2021-01-13 16:23:47 +01:00
der richter bc58361d86 mac: fix usage of temporary pointers
the pointer used to initialise the respective structs is only guaranteed
to be alive within this constructor. the struct itself is used later and
the data it points to, is not guaranteed to be the same.

to fix this we define a scope that pointer is definitely valid and use
it within this scope. a helper function was added to get the pointers
for several data at once. otherwise we would need to nest
withUnsafeMutableBytes several times, which would make it hard to read.
2021-01-13 16:23:47 +01:00
Leo Izen d5ab5482a9 manpage: document off-by-one loop-file behavior
loop-file counts the number of zero-seeks, not playthroughs,
which makes its counter off by one compared to loop-playlist.
2021-01-07 09:15:29 -05:00
Leo Izen 1251f7bbf9 manpage: rename OS X references to macOS
Apple has decided that Mac OS X is now named macOS for the time
being. For consistency, it makes sense to use the same name for the
operating system in all places where it occurs. This commit renames
OS X to macOS in the documentation in places where it was otherwise
still using the old name.
2021-01-03 12:05:30 -05:00
Niklas Haas 3e175dff4a vo_gpu: don't segfault if 3DLUT texture fails uploading
This failure path was never properly checked.
2021-01-01 17:14:57 +01:00
Avi Halachmi (:avih) 4f129a3eca input.conf syntax: support custom quotes !XstringX!
Where X is any ASCII char chosen by the user. An argument is only
interpreted as custom-quoted if it starts with '!' and the line doesn't
end right after it. Custom quotes don't interpret backslash-escape.

This change only affects command arguments which mpv parses (not array
commands), and not tokens before the arguments (where applicable - key
name, input section, command prefixes, command name).
2020-12-31 12:54:33 +02:00
Avi Halachmi (:avih) bb439efe0d input.rst: fix typo commands -> arguments 2020-12-31 12:54:33 +02:00