playlist-remove has a required index argument, as indicated by the
documentation. However, in 332907e1d7
MP_CMD_OPT_ARG was mistakenly added, making it optional.
The effect of not specifying the argument is defaulting the index to 0
and always removing the first element in the playlist, which is not
expected.
Fix this by making the argument required.
Fixes: 332907e1d7
Unfortunately we don't have control over libplacebo and cannot
synchronize such changes, so just return `<unknown>` to be forward
compatible with any possible changed.
Note that this should be updated ASAP to support new values.
Previously this would be called on every frame presented, this only
needs to be called if display sync was active for the last frame but
isn't active anymore.
This hid the bug mentioned in #16947 if VO was active.
The previous method used in 2b38b382cf doesn't properly determine the
original depth. We use image->params.repr.bits.color_depth to determine
that now.
Fixes#16398.
Signed-off-by: Leo Izen <leo.izen@gmail.com>
This paragraph was added 10 years ago in f8dc5db315. Hooks are now
commonly used both in internal (ytdl_hook, auto_profiles) and external
scripts (e.g. https://github.com/mpv-player/mpv/issues?q=mp.add_hook).
They are the only way to handle events synchronously and nobody is just
going to change the API and break all scripts at this point, so remove
the warning.
This clears packets from the pool, that would never be reused under new
settings. Note that depending on demuxer state this clears only unused
packets, in some cases demuxer may still hold more packets than the new
limit. Fox example demuxer doesn't forcefully clear forward cache when
reducing the size.
Also keep packet pool, even if current file is not cached, this is
useful for all sorts of things and may be useful for next file.
This act only on user options values, regardless of internal demuxer
caching state, which can vary depending on track type or source.
This fixes options like --audio-file=- and avoids returning $PWD/- as
path and stream-open-filename when playing from standard input.
It will also allow storing playlist filenames as normalized without
checking for - at the caller.
Fixes 23b57e9f7f.
We need both a color surface and parametric support to attempt to apply
image description, not either one.
Fixes: 0a32f988ba ("wayland: move initial color management setup earlier in the init")
When this was originally implemented, there was a dependency on waiting
for certain events from the compositor so it was placed after the
original roundtrip. Since b3abe3975b
removed the need for most of these conditions, we can more logically
place the creation of the color_surface and color_surface_feedback
earlier in the process and leave the wl_display_roundtrip as the true
final call for the wayland init process.
Compositor will probably give us a parametric description anyway, but
mpv can handle icc files if it gives us one so allow compositors to give
us an icc file.
If we used get_preferred_parametric to get this image description, then
it is guaranteed to be parametric. If we used get_preferred to get this
image description, then it may or may not be parametric depending on the
compositor. If we receive an icc_file event, then the image description
is not parametric.
The only part of the protocol that is behind this feature is the
create_icc_creator which we don't use. We also seem to confuse the
presence of this feature to mean that the compositor will always give us
non-parametric image descriptions but these two things have no relation
with each other. Remove the feature check and use
`wl->supports_parametric` to decide if we want to use `get_preferred` or
`get_preferred_parametric` instead.
This also removes error messages for when the compositor doesn't support
parametric descriptions or when the compositor doesn't support
icc_v2_v4.
The user needs to set `icc-profile-auto` for the icc_file path to work
properly which isn't ideal but I'm not sure what to do about this and
likely won't make any big changes right before a release.
in a13a674363 we set the default category
for the bundle to games, to get certain benefits like better rendering
timing, better bluetooth latency, better threading, etc (bundle only).
though this also prevents low power modes and wrongly categories the app
for spotlight search etc.
set the default category to video and add an option to set the category
to games if one wishes to.
It produces some bogus warnings when UBSAN is enabled:
../demux/demux_mf.c:103:22: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
Which is clearly not possible at this point.
We want to have symmetry on the input and output. Also outputting sRGB
encoded image to gamma 2.2 display is clipping blacks. 2.2 displays are
more common and are reference sRGB display, which is what we should
target.
osxbundle.py currently reads the version number from MPV_VERSION, while
Meson first tries git describe before falling back to MPV_VERSION.
Update osxbundle.py to try reading the version number from version.h
before falling back to MPV_VERSION. This ensures that the version number
in the bundle matches the output of mpv --version.
on multi monitor setups the position of the window was wrongly computed
when the position was forced, eg the calculated rectangle was screen
relative but the function expected absolute coordinates.
this is a regression from 50042f5ee0 and
#15500, where support for --force-window-position was introduced. this
worked in simple one monitor setups and in some cases on multi monitor
setups by sheer coincidence.
calculate the absolute position of the window by taking the screen into
account when needed.
Fixes#16929
If you open the menu at startup, e.g. with --input-commands, it rarely
clips items completely because OSD dimensions are still 0, or as if they
were 100 because those are the default values before receiving property
notifications. Avoid this.