| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This allows the title shown with the windowcontrols to be controlled
separately from the normal osc title. Fixes #13295.
|
|
|
|
|
|
|
|
|
| |
This reverts commit cb2b579f61764452652c6cf5c6a94ae5e67c77ed.
This breaks files where the audio starts much later after the video
since mpv reads the first audio packet even if it isn't supposed to
start yet, resulting in the audio_status being STATUS_READY for the
entire time mpv is "waiting" for the first audio packet to be played.
|
|
|
|
|
| |
This wasn't useful and didn't even really do what it said anyway.
Closes #12167.
|
|
|
|
|
|
|
|
|
|
| |
If a track's language was guessed from its filename, the commands that
reload the track, like sub-reload, remove it. Fix this by calling
guess_lang_from_filename() again.
Note that backing up t->lang and restoring it if nt->lang is NULL would
work incorrectly when lang is in the stream and it is removed before
reloading.
|
| |
|
|
|
|
|
|
| |
This displays the current GPU context when --vo=gpu or --vo=gpu-next
is used, which shows the platform and backend information of the vo
which are previously not available.
|
|
|
|
|
|
|
| |
This exports `current-gpu-context` property, which is the string
description of the current active GPU context. This allows scripts to
uniquely identify the platform and backend used for --vo=gpu
and --vo=gpu-next.
|
|
|
|
|
|
| |
The lingering cache needs to be cleared so the packets don't stay
forever on the screen past their welcome. Do this by simply refreshing
the stream. Fixes #13148.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mp.observe_property('foo', nil, ...) calls the handler at least 2 times
on each playlist change even when the property doesn't change. This is
dangerous because if you haven't read observe_property's documentation
in a long time this is easy to forget, and you can end up using it for
handlers that are computationally expensive or that cause unintended
side effects.
Therefore, this commit discourages its use more explicitly in the
documentation, and replaces its usages in scripts.
For console.lua, observing focused with type nil leads to calling
mp.osd_message('') when changing file while playing in the terminal with
the console disabled. I don't notice issues from this, but it's safer to
avoid it.
For playlist and track-list this doesn't really matter since they
trigger multiple changes on each new file anyway, but changing it can
avoid encouraging people to imitate the code.
One usage of none in stats.lua is kept because according to b9084dfd47
it is a hack to replicate the deprecated tick event.
|
|
|
|
|
|
|
|
|
|
|
| |
When the mouse cursor is hovering over the (CSD) windowcontrols title,
the osc keeps displaying, but the cursor autohide isn't disabled like
other visible regions.
Fix this by disabling the cursor autohide in this region.
All other existing behaviors of the mouse cursor in this region
are unchanged, including triggering main window area input
and allowing VO dragging.
|
| |
|
|
|
|
|
|
| |
This adds volume-gain, volume-gain-max, volume-gain-min options, which
can be used to control audio volume and target dynamic range in decibels.
The gain is applied on top of the existing volume setting.
|
|
|
|
| |
This is 1 billion times smaller than it should be in SI units.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When running the console in the terminal, style log lines with the same
escape sequences as msg.c.
mp.input can also specify terminal escape sequences, e.g. a script to
select a playlist entry can invert the color of the selection.
Also add a missing newline to help's error message.
|
|
|
|
|
|
|
|
|
|
| |
fe875083b3d30b06ef77745f40570e8f63afec2 confused things a bit and made
--no-subs-with-matching-audio actually mean what it says: no subtitles
if the languages match. However, the option actually meant no non-forced
subtitles not no subtitles at all. This isn't really intuitive so
instead of changing the behavior back to the old way (we already have a
release since then), add a third option "forced" which is equivalent to
the old meaning of --no-subs-with-matching audio. Fixes #13151.
|
|
|
|
| |
This lets scripts get textual input from the user using console.lua.
|
|
|
|
|
|
|
| |
Makes Tab expand loadfile ~/ to loadfile /home/$USER/.
I used expand-path instead of os.getenv('HOME') to make it work on
Windows.
|
|
|
|
| |
This avoids possible reference of video_out after destory.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is commonly done to understand whether a window is focused. This
explicitly checks if focused is false instead of unavailable to not
break the cursor where focused is unimplemented like on --vo=drm.
The cursor is taller than the input text so it is made transparent
instead of completely removing it so that the log doesn't move up and
down while toggling focus. Alternatively, cheight = opts.font_size * 8
can be changed to 7.
|
|
|
|
|
|
|
| |
43ed0a83d0 avoided reinserting the string that is appended after certain
completions when it is already after the cursor when inserting the
longest common prefix of the suggestions. Do the same when cycling
through them.
|
|
|
|
|
|
| |
This allows taking more than 99999 screenshots in a single session,
and also for the case when a sequence of 99999 screenshots
already exists on the filesystem.
|
|
|
|
|
|
| |
Apparently found useful by some users.
Fixes: #13092
|
|
|
|
|
|
|
|
|
|
|
| |
Reuse common_prefix_length() to make find_common_prefix() shorter and
faster by not creating many temporary strings.
The decrease in the average time to run find_common_prefix() over 1000
calls I measured is:
set \<Tab>: 1e-4s -> 1e-5s
set s\Tab>: 1e-5s -> 5e-6s
|
|
|
|
|
|
|
|
| |
When hovering certain elements over the OSC, using the mouse wheel can
result in special commands (such as seeking, changing audio tracks,
etc.) Not everyone neccessarily wants this feature, so add an option to
make it possible to disable all of it. Maybe more fine-tuned control
would be more ideal, but probably not worth it. Fixes #13096.
|
|
|
|
| |
Default: strip. preserve the old behavior
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even for successful calls, utils.format_json returns nil as the second
return value. This doesn't have any purpose and is not documented, and
it is inconvenient for passing JSON to script-message, because
mp.commandv('script-message', 'foo', utils.format_json(...))
errors because mp.commandv receives nil as the fourth argument.
This commit makes format_json return only one value in case of success
to fix this.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Over the years, we've accumulated several secondary subtitle related
options and properties, but the implementation was not really consistent
and it wasn't clear what the right process for adding more should be. So
to make things nicer, let's refactor all of the subtitle options with
secondary variants (sub-delay, sub-pos, and sub-visibility) and split
them off to a new, separate struct. All of the underlying values are
stored in an array instead for simplicity. Additionally, the
implementation of some secondary-sub-* properties were slightly changed
so there would be less redundancy.
|
|
|
|
|
|
|
|
|
|
|
| |
Clear completion suggestions from functions that move the cursor, so
that you can't insert suggestions at the wrong spot by pressing Tab
again after moving the cursor,
Also clear suggestions from some editing functions that were never
updated. It is not actually necessary to clear suggestions from
functions that remove text in front of the cursor, but since
handle_del() already clears them, let's just clear them everywhere.
|
|
|
|
|
|
| |
Also inline option-info's sub-properties so we don't have to define
sub-properties at the top of the function for every one we decide to
complete.
|
|
|
|
|
|
| |
This is useful for completing files and more rarely for profiles. It
will also be useful to third-party scripts interacting with the console
once the API to do it is merged.
|
|
|
|
| |
The default value is 0 (on the top of the screen)
|
|
|
|
|
| |
This reverts commit af2635d8c9389504cb0b07a78f3999096d80a1ab, and
restores feature parity with VLC.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I honestly don’t care either way but I also don’t believe this innocent
and cute hat is worth repeatedly having people show up on the issue
tracker to aggressively virtue signal and then shit-talk the project
elsewhere when their “concerns” are ignored and made fun of.
For the record, I approve of neither brand of childish nonsense.
If your workflow depends on December festivities, feel free to use an
alternative OSC implementation.
Fixes #13082 and #9548
|
|
|
|
|
|
|
|
|
| |
When updating subtitles while paused, mpv waits until a packet is
available. However in the case of a network stream, it is possible that
mpv will pause itself when buffering for cache reasons. This makes that
particular loop do a busy loop and can take a long time depending on
network streams. Simply just don't do the loop here if we are paused for
cache reasons. Fixes #13077.
|
|
|
|
| |
fixes: 4754bd54c7ab22c6c98283d81e22d219b3b64ade
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A simplified version of the text width estimation code from uosc.
An osd_overlay is created with compute_bounds=true for measuring the
width of the lower case alphabet at what's estimated to be the largest
font size possible without clipping.
The lower case alphabet was chosen to get decent results for proportional
fonts, even if they aren't officially supported.
|
|
|
|
|
| |
This was a simpler fix to not print the console log to the OSD while
switching VO.
|
|
|
|
|
|
|
|
|
| |
ca2b05c0fb changed the window size with --force-window and no video
tracks to be closer to 16:9, but I don't see why we shouldn't have an
actual 16:9 ratio. The advantage is that subtitles with fullscreen and
no video tracks will have the same size and position (depending on the
values of --sub-scale-with-window and --sub-use-margins) as with 16:9
videos, because there will be no (invisible) black bars.
|
| |
|
|
|
|
|
|
|
|
|
| |
Meson was pretty strict about target ids and generating the mpv.com in
the same directory as mpv.exe wasn't possible. So as a workaround we
tucked it away in a subdirectory, but that's not really intuitive at
all. Well as of meson 1.3.0, this is now possible so leverage it since
it makes way more sense. We still keep the old workaround for anyone
using older meson versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add --secondary-sub-delay option and decouple --sub-delay from secondary
subtitles. This produces desirable behavior in most cases as secondary
and primary subtitles tracks tend to be timed independently of one
another.
This feature is implemented by turning the sub_delay field in
mp_subtitle_opts into an array of 2 floats. From here the track index is
either passed around or derived when sub_delay is needed. There are some
cases in dec_sub.c where it is possible for dec_sub.order (equivalent to
track index) to be -1. In these cases, sub_delay is inferred as 0.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property was never encouraged. The manual even stated that "You
should avoid using it, unless you absolutely have to." Since we now have
user-data which is superior in every single way and replaces this,
delete this property. The manual also has threatened people for years
with the line "It's a makeshift solution which could go away any time
(for example, when a better solution becomes available)." We were nice
and deprecated it in 1d00aee8e191c9689a20e67e3d6dfd2af6ad2588 for a
while to give script authors some time to update. Let's remove it for
good now.
|
|
|
|
|
|
|
| |
Unclear if there are other situations but at least using --force-media-title
this can be called without a playing file, causing a segfault.
fixes: 34a04d05676
|
| |
|
|
|
|
|
|
| |
This information is already there, but speed adjusted. To avoid
duplicating the calculation of frame duration, it's kept in the
vo_frame structure.
|
|
|
|
|
| |
Frame repeats may occur to compensate for A/V diff. This commit ensures
a uniform distribution of vsync points based on the number of repeats.
|
|
|
|
|
|
| |
034f75dacd01bd0b7c6c03e39b193f891f0d5ef2 removed the loop that could
cause !next to actually happen here. This code would never be executed
and is not needed.
|
|
|
|
| |
Fixes #12887
|
|
|
|
| |
fix secondary sub disappear after sub-reload, sub-remove.
|
|
|
|
|
|
|
|
|
|
|
| |
The "Resolution" property shows the storage resolution for videos with
non-square pixels.
Currently, display aspect ratio is shown for both "Resolution" and
"Output Resolution" properties which results in a duplicate,
and is incorrect for the "Resolution" property.
The correct aspect ratio is now shown using the sar and sar-name properties.
|
|
|
|
|
|
|
|
|
| |
Display aspect ratio (aspect) and pixel aspect ratio (par) are already
exported, but storage aspect ratio (sar) isn't. This value is needed to
display the storage aspect ratio for non-square pixel sources in stats.lua.
This exports two new properties: video-params/sar and video-params/sar-name.
Docmentation is updated accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During move of this code from vo_gpu_next.c to video.c someone(TM) tried
to be smart and simplify the expression. The num_vsync includes error
compensation which can cause it to display +-1 vsync at the same rate.
We explicitly don't want to include this in "ideal" parameters.
Also num_vsyncs was already rounded so we produced off timings in
general.
Revert back to proper way of translating the time.
Fixes: 5e5a325
|
|
|
|
|
|
|
|
| |
Relative to frame PTS timeline as oposed to display vblank.
Those values are relative to unadjusted video timeline. They will be
used by gpu-next where it expect virtual frame vsync, not display vblank
time.
|
|
|
|
|
|
|
|
|
| |
String formatting of Lua crashes with widths greater then 99, so limit
the value to that.
A nicer solution would be to create our own string padding function that
can handle bigger widths, but such long suggestions aren't common enough
to be worth the effort.
|
|
|
|
|
|
| |
Having the show-progress command obey no-osd is nonsensical and
unintuitive. The show-text command already ignores no-osd, so there's
precedence for this. Fixes #5662.
|
| |
|
|
|
|
|
|
|
| |
No longer needed, wrapped status line is supported now. Also this didn't
work correctly if status were decorated with module name or time.
This reverts commit ab6fac43b4bc34949bd9c4da8e911fc9f3489a32.
|
|
|
|
|
|
| |
This workaround is not longer needed.
This reverts commit cdc05c33b33d958a8877851bd5942adbb856f5e4.
|
| |
|