| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
As a bonus, we can remove the awkward and horribly named MP_SECOND_US.
|
|
|
|
|
|
|
| |
There's a lot of wild 1e6, 1000, etc. lying around in the code. A macro
is much easier to read and understand at a glance. Add some helpers for
this. We don't need to convert everything now but there's some simple
things that can be done so they are included in this commit.
|
|
|
|
|
|
|
| |
The whole mess with setting the option value explictly and saving the
old stop_play value only needs to happen if we're at the end of file.
Doing it in general is unneccessary and breaks other things.
Fixes #12424.
|
|
|
|
|
|
| |
These are ancient and have existed since before stats.lua lived in the
mpv repository. We don't need to worry about ancient mpv versions
anymore, so remove these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why a bigger search-interval is required:
scaletempo2 doesn't do a good job when the signal contains frequencies
less then 1/search_interval. With a search interval of 30ms that means
anything below 33.333Hz sounds bad.
Depending on the genre it's very for music to contain frequencies down
to 30Hz, and sometimes even a little bit below that. Therefore a higher
default value is needed to handle such cases.
Based on that an argument can be made for a value of 50, as that should
work down to 20Hz, or something even higher because movies sometimes
have some infrasonic content.
However the downside of big search intervals is increased CPU usage and
intelligibility at higher speeds, as it effectively leads to parts of
the audio being skipped.
A value of 40 can handle frequencies down to 25Hz, enough for all music
except very rare edge cases, while still providing decent
intelligibility.
Why a smaller window-size is required:
Large values reduce intelligibility at high speeds and therefore small
values are preferred.
However when values get too small it starts to sound weird
(similar to librubberband).
In my testing a value of 10 already works well, but adding a small
safety margin seems like a good idea, especially since it made no
noticeable difference to intelligibility, which is why 12 was chosen.
|
|
|
|
|
|
|
|
|
| |
The text didn't line up with with the percentages above it because it
didn't use a monospace font.
Instead insert the text at the same position in the template as the
percentages and convert one o.prefix_sep from the percentages into hard
coded \h\h to ensure alignment even when the user changes o.prefix_sep.
|
|
|
|
|
|
|
|
| |
add support for vulkan through metal and a translation layer like
MoltenVK. also add the possibility to use different render timing modes
for testing.
i still consider this experimental atm.
|
|
|
|
|
|
|
| |
add an animation lock to the window to prevent the window from closing
while animating. if this is done while the fs animation is running the
dock will stay hidden. this is not used yet, because it's unnecessary
for cocoa-cb but will be for new vo backends.
|
|
|
|
|
|
| |
Fixes type mismatch after recent changes.
Fixes: 59dd7d94af7651baf7e60966c5f8e7d52959d958
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Use "%.7g" to show 7 significant digits. Removes the trailing zeros, and
in general makes it more readable, than fixed 3 decimal digits.
For avsync use "%+.2g" to add plus sign, similar to display-sync
values.
|
|
|
|
|
| |
There is already other place to indicate hw decoding. "cuda" or "d3d11"
is not a pixel format.
|
|
|
|
| |
Makes it more readable in my opinion.
|
| |
|
|
|
|
|
|
| |
- rename prefix to `Framerate:`
- if both estimated and specified values are the same display fps once
- skip the suffix if both the estimated and specified values agrees
|
| |
|
|
|
|
|
| |
SDR white (203) is indeed not interesting, but anything else, even if
lower is.
|
|
|
|
|
|
|
|
| |
Source video parameters are interesting, but we mix them with video
output/target parameters. Which will differ. Add "Display" showing
true output params from VO, including HDR passthrough info and
everything. This makes much more consistent output and alows to quickly
diagnose how is source video translated to target display.
|
|
|
|
|
|
|
|
| |
Not both of them. Formating it as `<name> (<desc>)` produced arguably
silly string like `hevc (HEVC (High Efficiency Video Coding))`. Unpack
this to show only description if available or name otherwise. Produces
way nicer results in stats.lua and similar places where this name is
printed.
|
|
|
|
| |
fps property was not renamed in events.
|
| |
|
|
|
|
|
| |
In many cases it makes sense to early exit instead of preparing all the
data only to return type or not implemented.
|
|
|
|
|
| |
While the video playing, it's not actually needed and can cause
unnecessary redraws. Fixes #12623.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was wrongly assuming that playlist_path is always set for the
current playlist entry, but it's only set when a file was added by
expanding a playlist.
The crash in playlist_get_first_in_next_playlist can be reproduced with
mpv foo.mkv foo.zip, playlist-next, playlist-prev,
playlist-next-playlist. You need to run playlist-next, playlist-prev
first because foo.zip's playlist_path is NULL until you do that, which
makes playlist_get_first_in_next_playlist return immediately.
The crash in cmd_playlist_next_prev_playlist can be replicated with mpv
--loop-playlist foo.zip foo.mkv, running playlist-next until foo.mkv,
and playlist-play-next. Again, you need to open foo.zip first or its
playlist_path is NULL which skips running strcmp(entry->playlist_path,
mpctx->playlist->current->playlist_path).
Fixes https://github.com/mpv-player/mpv/issues/12495#issuecomment-1760968608
|
|
|
|
| |
Updates README.md like 1e9a2cbebff updated DOCS/release-policy.md.
|
|
|
|
|
|
|
|
|
| |
there are currently some silly data-races in the stop/cont sighandler
due to the fact that the signal handler might get invoked in a different
thread.
this changes those sighandlers to a pipe-based approach similar to the
existing "quit" sighandler.
|
|
|
|
|
|
|
|
|
|
|
|
| |
tio_orig and tio_orig_set are being touched inside of signal handler
which might be invoked from another thread - which makes this a data
race.
there's no real reason to set tio_orig inside of do_activate_getch2()
which is registered as a signal handler. just set it once, in
terminal_init(), before any signal handlers come in play.
this also allows removing the tio_orig_set variable completely.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
do_deactivate_getch2() touches some global variables which *might have*
been fine if the terminal thread was the one that received the signal
but AFAIK which thread will handle the signal is not well defined.
in my case, when quitting mpv with CTRL+C the main thread receives the
signal rather than the terminal thread and touches those globals without
synchronization. caught by ThreadSanitizer.
the solution is to move the do_deactivate_getch2() call outside of the
signal handler.
|
|
|
|
| |
same rationale as last commit
|
|
|
|
|
|
|
| |
otherwise the resuming code might end up seeing a spoiled errno and end
up taking unintended branches based on it.
caught via ThreadSanitizer
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use EDL for single tracks with metadata to set the uploader, channel url
and description metadata with --ytdl-format=best. Currently, these are
only set with the other ytdl formats with video and audio in different
streams.
The uploader tag is commonly available in sites other than Youtube too,
so it may be simpler to always use EDL with single tracks.
|
|
|
|
|
|
|
|
| |
Added to the functions `mp.add_timeout` and `mp.add_periodic_timer`.
If the `disabled` argument is set to `true` or a truthy value, the
timer will wait to be manually started with a call to its `resume()`
method.
|
|
|
|
|
|
|
| |
Only vpdau-copy works with EGL. 2d1d815cc7 already added this to
manpage, and 1c8d2246bf removed it again, but that seems to be a mistake
because I can only get vdpau to work with GLX, and another user also
reported that only vdpau-copy was working for him with the default EGL.
|
|
|
|
|
|
|
|
|
|
|
| |
Several window resizing operations (i.e., --auto-window-resize,
border dragging with --keep-aspect-window, Alt+0/1/2) cause the
window to detach from the snapped borders. This patch resolves
this by recording to which borders the window is snapped, and
using this info to determine how the window should be placed after
resizing.
Closes https://github.com/mpv-player/mpv/issues/6588
|
|
|
|
|
|
|
| |
Allows higher resolution sleeps than Sleep which has milliseconds
resolution. In practice Windows kernel does not really go below 0.5ms,
but we don't have to limit ourselves on API side of things and do the
best we can.
|
|
|
|
|
|
|
|
|
|
|
| |
Linux and macOS already use nanosecond resolution for their sleep
functions. It was just being converted from microseconds before. Since
we have mp_time_ns now, go ahead and bump the precision here. The timer
for windows uses some timeBeginPeriod thing which I'm not sure what it
does really but whatever just convert the units to ms like they were
doing before. There's really no reason to keep the mp_sleep_us helper
around. A multiplication by 1000 is trivial and underlying OS clocks
have nanosecond precision.
|
|
|
|
|
|
| |
9606c3fca9d568dc43711017dcb35a408c0d2883 added mp_time_ns(). Since we
apparently expose the mp_time_us() to clients already, there's no reason
to not also expose the new nanosecond one.
|
|
|
|
|
|
|
|
|
|
| |
On linux, several platforms poll for events over a fd. This has ms
accuracy, but mpv's timer is in ns now so lots of precision is lost. We
can use an mp_poll wrapper to use ppoll instead which takes a timespec
directly with nanosecond precision. On systems without ppoll this falls
back to old poll behavior. On wayland, we don't actually use this
because ppoll completely messes up the event loop for some unknown
reason.
|
|
|
|
|
|
|
| |
Originally, this was added as purely a shim for macOS. However since we
want to do high resolution polling which is not neccesarily available on
all platforms, making this a generic wrapper for poll functions is
useful so rename it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many cases, this is purely cosmetic because poll still only accepts
microseconds. There's still a gain here however since
pthread_cond_timedwait can take a realtime ts now.
Additionally, 37d6604d70c8c594de2817db26356c4c950ac0fd changed the value
added to timeout_ms in X11 and Wayland to ensure that it would never be
0 and rounded up. This was both incomplete, several other parts of the
player have this same problem like drm, and not really needed. Instead
the MPCLAMP is just adjusted to have a min of 1.
|
| |
|
| |
|
|
|
|
|
| |
This is weird. The caller should be responsible for converting the value
if desired. Move the conversion to player/command.c instead.
|
|
|
|
|
| |
This still shows the old way of calling read_options even though it was
deprecated 8 years in ago 327b091909e.
|
|
|
|
|
| |
This binding commonly closes similar input buffers like vim's
Command-line mode and dmenu.
|
|
|
|
|
|
|
|
|
|
|
|
| |
playlist-prev-playlist goes to the beginning of the previous playlist
because this seems more useful and symmetrical to
playlist-next-playlist. It does not go to the beginning when the current
playlist-path starts with the previous playlist-path, e.g. with mpv
--loop-playlist foo/, which expands to foo/{1..9}.zip, the current
playlist path foo/1.zip beings with the playlist-path foo/ of {2..9}.zip
and thus playlist-prev-playlist goes to 9.zip rather than to 2.zip.
Closes #12495.
|
|
|
|
|
| |
We don't have much test coverage, but even running the built binary
doesn't harm to check with sanitizers.
|
| |
|
| |
|
|
|
|
| |
This was lost in 6b963857c0
|
| |
|
| |
|
|
|
|
|
|
| |
Lines that would be outside of the visible area are now culled.
The log messages were already culled, however with the introduction
of suggestions, they also needed a small update.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completion suggestions are now nicely formatted into a table.
Maximum width of the table is estimated based on OSD size and
font size.
This requires a new scaling factor option `font_hw_ratio`.
A factor of 2.15 works great for me,
but the default is 2.0 to avoid problems with other fonts.
The space between columns is automatically adjusted to be
between 2 and 8 spaces.
It tries to use as few rows as possible.
|
|
|
|
|
|
|
| |
Tab completion now shows a list of all potential completions
between the log messages and prompt.
The text is colored to differentiate it from regular text.
The color matches the theme and is similar to the mpv logo.
|
|
|
|
|
|
|
| |
The text styles are now in a table.
The color definitions of the theme where the colors were taken from
are now included in a comment for future reference.
The colors have been converted to BGR as is required by ASS.
|
|
|
|
|
| |
Refactor code that is no longer necessary after replacing vf=crop with
video-crop. There is no change in behavior.
|
| |
|
|
|
|
|
| |
This timing dependency does not guarantee that we will wake up in the
future, depending on processing times.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vo_still_displaying() is racey with vo_request_wakeup_on_done() and above
that it doesn't work as expected. VO can run out of work and go to sleep
for 1000s, while the play thread still returns on vo_still_displaying()
check, because of a check `now < frame_end` so it never advances and go
to sleep itself.
This fixes dead lock that we have when image parameters changes during
playback.
This reverts commit 0c9ac5835be70ae26e4aa875e833fe2c7b3b3bf3.
Fixes: #12575
|
|
|
|
|
|
|
|
|
|
|
| |
Upstream has been changing buildsystem and current vulkan.pc is not
functional with custom prefix path.
Rollback to older version until it is fixed.
See:
https://github.com/KhronosGroup/Vulkan-Loader/issues/1318
https://github.com/KhronosGroup/Vulkan-Loader/issues/1319
|
|
|
|
|
|
| |
It is already set above.
Fixes: #12577, #12587
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's 2023 and people don't use UTF-8 for their m3u, ini, etc. files.
Well mpv already has the tools in place to try and guess other
codepages, so we might as well use it I guess. This change is pretty
awkward since we have to read line-by-line but mp_iconv_to_utf8 may
sometimes allocate memory. So sometimes the bstr needs to be freed and
sometimes not for every line. Also we need to make another copy of the
line on the stack since splitting by tokens and such will mess up the
original line which may possibly be allocated memory. The ugliness is
mostly hidden in pl_free_line, but it's still weird. Fixes #10911.
|