This is needed for ra_get_imgfmt_desc() which otherwise would not allow
rgba10_a2 format, because it doesn't have all components with the same
size. However it's nativelly supported by d3d11, so we add it to special
formats, same as opengl does.
The optimal way would be to use custom rate based on telecine cadence,
but it's not supported by any driver in practice. So instead, allow
driver to field match and output with duplicated frames, which can be
removed using decimate filter.
Note that in practice all GPU vendors uses single video processor for
all deinterlacing, so IVTC will be done even if mode is not explicitly
selected. At least the field matching part, because correct rate output
is not supported. The main difference is that when selecting more we
output at video frame rate, not field rate.
There were multiple issues in API usage, not setting correct
OutputIndex, lying about frame field parity to make it work without
OutputIndex. Not passing reference frames which forced BOB mode always.
Fix all issues and allow forcing BLEND/BOB mode by not passing frames.
Blend mode also sets half rate output. Half rate could be separate
option too, but there is not much gain from it except for debugging
really.
Fixes: #15197
This was a typo. Although this changes the user option name, this
filter, especially this option, is so niche that I fix it without a
deprecation period.
Since we call bstr0 on the string anyway, might as well use it for
printing which implicitly includes a null check that gcc can see so it
doesn't produce the warning as seen in the next commit anymore
Scripts and things using the client API can load up playlists in a
specific order and choose what file to start playing on by using the
loadfile or loadlist commands with the play argument. However if
starting from idle mode, it is possible to send these commands before
all scripts finish initializing. mpv's core then does a prepare_playlist
call on its own for startup which will nuke the current playlist entry
set by the API user and lead to an unexpected item being played. Fix
this by not unconditionally setting pl->current to NULL allow callers to
optionally always overwrite it by getting the first item in the playlist
(e.g. if it's called after startup anywhere else in the code). Other
options like --playlist-start or --shuffle are allowed to win if they
happen to be set.
If you switch TTYs while mpv is playing, wlroots compositors will remove
all outputs from the registry. This segfaults when you switch back since
we try to access cleared memory. Rework this so wl->current_output is
given null when appropriate and properly guarded. You still need at
least one output to initially place the surface, but in general they can
all disappear during runtime and it should work. Change the log to
verbose because that becomes just noise in this case (switching TTYs).
The surface entrance event happens later and should get all the proper
parameters.
Waiting for color management from the compositor doesn't make sense in
other cases and this breaks --force-window since the playloop doesn't
advance. Fixes#17391.
27a78276eb almost got it but it should be
an and condition not an or. When we unlock VO to draw the core, the OSD
can update after we flip the page and the player can also pause itself
in that time. That means that we will clear the redraw request but due
to the OSD update it actually needs to draw again. Because the player
paused itself in that time frame, this redraw gets lost and you have the
mismatch. The simplest way to avoid that case is to only clear the
redraw_request while mpv is playing. The paused case will always get
handled later in do_redraw so it does not get missed. The slight
downside is that it's technically possible to do a redundant redraw
(e.g. what if you pause before draw_frame), but this theoretical
inefficiency is deemed not really relevant or important enough to add
more confusing code to avoid. Fixes#17288.
This was a mistake. It's too situational and it's not worth complicating
the API and every mp.input client with it. It made some sense before I
implemented input.select() because you could use input.get() to input a
choice and validate it, but in general for input.get() clients it's
better to show an error with input.set_log() instead of adding new lines
to the log everytime. This is what e.g.
https://framagit.org/Midgard/mpv-subber/-/blob/master/subber.lua does.
So this is only marginally useful for REPL scripts that keep adding
lines to the log, and the only such scripts are commands.lua and my
lua-repl.lua. commands.lua never used it and I already removed it from
lua-repl.lua. Cloning all scripts in the wiki reveals that **nobody** is
using log_error(), confirming that it is safe to deprecate.
Any errors when opening the display are now logged.
The WAYLAND_DISPLAY check now also logs and applies only when probing.
This means explicitly setting a wayland `--gpu-context` will always
try to open the display instead of "helpfully" refusing (in some cases).
see also: f6f1721101
extends f3c1dcf7a1 for all lines not just
the last. This avoid unnecessary write every line and fixes a buffer
overflow for small enough images (for example 78x64).
Move PathCchRemoveFileSpec after actually getting the file size. It must
have been swapped at some point by accident.
Also use correct unit for the size.
Fixes: #17375
try to define a `[foo \ "bar"]` profile in mpv.conf, the command
to apply it in context-menu is `apply-profile foo \ "bar"`,
which is obviously incorrect, the correct command should be
`apply-profile "foo \\ \"bar\""`.
for string arguments that may contain spaces or some special
characters, we need to quote and escape them in JSON-style,
fortunately, `utils.format_json` can do this very well.
Fixes a deadlock when switching vo before a frame is displayed (e.g.
with auto profiles) where we'd end up in a state where wait_on_vo is set
to true for the first frame and then draw_frame is never called again so
its value never changes even once dmabuf-wayland is ready to advance
frame
Fixes: 468d34c9bd ("vo: allow VOs to request waiting before advancing frames")
As per Samillion's suggestion, reduce the contrast between separators
and the background to match other context menus. Using the already
defined disabled_color works for this and seems to be what GTK and Qt
do at a glance.
730062b510 fixed the problem with mouse
buttons but unfortunately we forgot to include repeated commands in the
condition. This effectively made any variant of "frame-step X seek"
unrepeatable even though it was supposed to be. So just allow those in
add_step_frame too.
Fixes#17348.
The playlist submenu does not update in this edge case:
- Have a playlist-count > 99 on the first vo-configured. This makes
playlist() return before observing --osd-playlist-entry.
- Remove playlist entries until the count is < 100
- Change --osd-playlist-entry
- Show the playlist submenu before changing the playlist
Currently, if some log lines have very long text that actually
renders across multiple lines, even if you scroll to the top,
the topmost content will be pushed out of the screen by these
lines and will never be visible.
In STATS page 2/4/5/0, you can scroll down until there is one
line left on the screen, we can keep the scrolling behavior of
the log consistent with it.
Observing playlist-pos and playlist-count is not enough to update it
after playlist-move, but we can observe any playlist property with type
none to get notified of every MP_EVENT_CHANGE_PLAYLIST, even if the
property has not changed.
This is similar to the
mp.observe_property("vsync-jitter", "none", recorder) hack used by
stats.lua to replicate the deprecated tick event.
Fixes https://github.com/mpv-player/mpv/pull/16816#discussion_r2727498518