OSC rendering used to be smooth (up to OSD rendering fps) before
48f906249e, but after that commit the
frame duration is hardcoded to 30 ms. This is too high and results in
choppy OSC rendering, which is very noticeable with the progress bar
while moving mouse over it or playing a short 60 fps video.
This makes the duration an option so that it can be decreased to make
OSC rendering smoother.
Currently the vapoursynth video filter does not accept any argument for
passing arbitrary user data. This limits what the VS script can do.
Ideally, the vapoursynth filter has an user-data parameter that contain
string value. mpv passes that value to the VS script just like
container_fps and others. Once the VS script gets the data, it can do
all sorts of data extraction and transformation.
Another benefit is that instead of mpv always have to catch up to user
needs for this filter, with this users can just pass whatever needed
themselves, thus becomes more future-proof.
Fixes#14214
Allow configuring whether to print the media-title, the filename or both
(as `<title> (<filename>)`) in show-text ${playlist}, the OSC playlist
and in the playlist selector.
Showing only titles hides information when files are badly tagged, or
when it hides the track numbers of album songs. But showing filenames is
not as useful as titles e.g. when playing URLs with media titles. This
option lets the user choose which one to show, or show both if switching
is inconvenient.
The OSC's playlist_media_title script-opt is removed because this option
is better since it works everywhere after configuring it once.
Closes#11653.
Also show the full URLs of playlist entries instead of their basenames
in osc.lua and select.lua, consistently with mp_property_playlist().
For simplicity, this just checks if entries contain :// instead of
replicating all of mp_is_url().
Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
Currently the documentation for building on Windows, specifically the
"Native Compilation with Clang (Windows SDK Build)" route, could use a
few minor improvement to make the development onboarding experience more
smoothly.
Fixes#14214
ffmpeg outputs timestamps like '100:00.00' in LRCs instead of adding
hours, and timestamps like '100:00' are < '10:00', so since these
strings are being compared, if there is no current subtitle line, there
are subtitle lines at >= 100 minutes, and time-pos is between 10 minutes
and 100 minutes, one of the last subtitle lines gets preselected.
Fix this by converting the timestamps to numbers before comparing them.
Also simplify the logic by merging the 2 loops to determine the default
line, and reformat the timestamps by adding hours to not print minutes >
60 in the selector, and by removing the hundredths of seconds. This
requires storing the accurate timestamps in a table to seek to them on
submit.
Print vlang if present.
Make unselected tracks and editions grey instead of adding (+) before
selected tracks. Mark them with the same circles as show-text
${track-list} and script-message osc-tracklist when not outputting to a
TTY.
Don't print a different symbol with --sub-forced-events-only because
nobody uses this option, and subtitles are very unlikely to mix forced
and non-forced events.
Align 2-digit track IDs.
Align languages of up to 7 characters (the length of zh-Hans).
Leave spaces when a track has no language but at least another track
does to align the following track data with the other tracks.
Add a space between values and their units.
Convert Hz to kHz.
Pretty print FPS and kHz with mp_format_double().
Don't print images' FPS because it's just a bogus value taken from
--mf-fps.
Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
This effectively bumps minimal MinGW-w64 requirement to v11.0.1. As it
is available in the latest Ubuntu LTS.
While at it clean installed packages list.
The 32-bit builds were disabled, because some packages started
disappearing. MSYS2 is slowly phasing out 32-bit support, but since we
still support it we have to test it somehow. Recent brakage with calling
convention mismatch would be spotted a lot quicker. So enable it, but
with some, not available, packages disabled.
This reverts a56d5c7fa1
Ubuntu 24.04 linux-azure kernel, used on GHA, is compiled with
CONFIG_COMPAT_32BIT_TIME=n. This prevents running any 32-bit binaries
through wine, so disable tests when doing i686 build. 32-bit builds are
still tested on Windows.
See: https://github.com/actions/runner-images/issues/9977
Wayland protocol only guarantees the delivery of modifier information after
the enter event. To handle it properly for keys pressed in the enter
event, save those keys for later processing in the modifier event.
There is a subtle behavior difference for built-in/input.conf key bindings
and key bindings registered by scripts: when a key binding is canceled
(e.g. a mouse button is bound to a command, is pressed down, and then
another key is pressed which is bound to another command), the command is
not invoked if the binding is built-in/input.conf, but is invoked if it's
registered by scripts, because it's handled with a different mechanism,
which gives no way for scripts to detect this.
Fix this by using the newly available canceled flag to detect this.
If a key binding is canceled, the callback is now not invoked unless
the key binding is registered with the complex option. In this situation,
the callback is invoked with the canceled state available so that scripts
can detect and handle this situation.
In certain situations (including but not limited to begin window dragging),
it is desired to cancel the current command completely. However, commands
which have on_updown flag set require the command to be invoked in this
situation. There is currently no way to know if the command is triggered
normally or triggered because it is dropped.
This adds a canceled state to mp_cmd which indicates this.
Fixes crash when FLS data is attempted to be cleared.
This affects only 32-bit build where the calling convention were not
matching the expected one. It has to be __stdcall in this case.
Fixes: 3372e17d
General update. Removed MXE as it is not supported, doesn't support
libplacebo and in general it doesn't do anything useful which native
Meson cannot do already.
Using strchr should be faster as it is optimized for the job. Also
ensure that tags are not escaped and are within {} correctly. This also
is important for performance as it allows to scan only needed areas of
the string.
Co-authored-by: Avi Halachmi (:avih) <avihpit@yahoo.com>
Co-authored-by: rcombs <rcombs@rcombs.me>
Some were duplicated between GCC and Clange. Others were missing in
Clang case. Instead test all the flags and don't make assumptions that
will get invalid over time. Testing flags is almost free.