Dependent tracks are supposed to be processed further and not directly
used.
For example, an HEIF tiled image tracks are meant to be stitched into a
full image before being displayed and requires special handling.
Another example would be MPEG-TS audio track tagged with mix_type=0.
Which means that the audio stream is a dependent stream and is intended
to be mixed or combined with a separate complete and independent audio
stream by the receiver.
In either case we should not directly select such tracks.
After pressing Tab a space is usually appended after the suggestion, and
with the new autocompletion you have to enter a space again before
seeing the completions for the next token even when there is only 1
matching completion. Just don't append spaces and let the user manually
type 1 space after completion, which is more intuitive.
...and after navigating the history.
I thought of making the new function accept the new cursor position and
set it, but it would not be clear that you're only supposed to call it
when handle_edit() is not already called.
2f271a92de made it so that the first completion suggestion is
automatically selected when pressing Enter, if none was manually
selected. So automatically highlight the first completion in yellow to
show this.
2f271a92de made it so that the first completion suggestion is
automatically selected when pressing enter, but that was done after
saving the command in the history. Save it to the history after
expanding it, so re-running the previous command actually works, e.g.
save "set vo gpu-next" instead of "set vo gn".
It turns out mpv doesn't tag at all when doing conversions, so we just
re-tag here and hope for the best. This should be improved, but there
are many different code paths when conversion can happen, so for now
revert to previous behavior.
Fixes: 4e5cc9cf1d
If we lose the current output for any reason (unplug, turns off, etc.)
and then later it comes back, mpv should always recalculate all the
scaling stuff. The optimization to avoid needless scaling calculations
didn't consider this case and would always exit since the scaling is the
same. So just check wl->current_output's existence as well.
Fixes#15361.
The previous documentation was pretty scary and misleading, and was
also outdated in several sections.
It was also difficult to understand some of the paragraphs.
The path documentation has now been overhauled to be much easier
to understand and to document the latest mpv behavior.
Typing a command prefix crashes console because first_useful_token is
nil. This already happened before implementing autocompletion if you did
no-osd<Tab>, but autocompletion made it evident.
Show available completion suggestions as you type without having to
press Tab.
This is fast even on a 2011 CPU, so we can get away with doing this in
the same thread that draws the console. The one case where it could make
the console hang is file completion of network drives, but in general it
is convenient for loadfile.
mp.input.get clients also get a request to complete on each character
typed, but those run in a different thread so performance is always
fine, and completions were already rejected if the input line or cursor
changed after the request. If I ever make running mpv commands an
mp.input client in the future, command completion will also benefit from
running in a different thread.
This fixes `ytdl_hook`, which would start playback with the thumbnail
track selected. This issue occurs because the thumbnail track is added
first. If the main track is not marked as default afterward, which it
isn't for single streams, the first track (the image track) would be
selected.
In general, if a non-image track is available, it should be preferred.
Ubuntu 24.04's pkg-config is already an almost empty transitional
package that depends on pkgconf, and pkgconf contains the
`/usr/bin/pkg-config` binary.
Thus while we are moving macOS to it, we shall do the same with
this mingw-w64 build.
This works around an issue with recent Github CI runners where
Homebrew is in an intermediate state. This is where old pkg-config
is installed, yet pkg-config as a package has become an alias
for pkgconf, thus causing failures to automatically switch symlinks
from one to the other.
Ref: actions/runner-images#10984
Giving very long lines to libass freezes mpv and makes the CPU spin
(though it's fine with terminal output). This is often the case
user-data/mpv/ytdl/json-subprocess-result in the property list. So limit
the length of selectable items to 300 characters (not Unicode aware).
This is enough to fill a 1920x1080 window with font_size=16 and Japanese
text.
If an item contains newlines, it hides the top items. This is often the
case for sub-ass-extradata and metadata/ytdl_description in the property
list. So keep only the first line.
Whenever mpv window gains focus, a new data offer is sent for the
selection. However, mpv currently treats it the same as dnd data
offers, which results in wrong handling. One bug which results from
this is when focus follow mouse is enabled, dropping the dnd file
results in the window being focused and selection offer being sent,
freeing the existing dnd offer. This results in dnd being broken
on at least GTK3.
Fix this by separating selection and dnd offer handling. Since there
is no way to know whether an offer introduced by
data_device_handle_data_offer is a selection or dnd offer, make it
pending, and move them once the identity is confirmed.
While most Wayland compositors provide a socket path indicated by
environment variable WAYLAND_DISPLAY, others may sometimes bequeath a
socket file descriptor specified by WAYLAND_SOCKET.
mpv has too many commands and they are unorganized in the
documentation, making it difficult to navigate.
This commit completely reorganizes the commands into several
categories to make the documentation easier to navigate.
The following categories are defined:
- Playback Control: Seeking and stepping.
- Property Manipulation: Changing property values.
- Playlist Manipulation: Playlist navigation and editing.
- Track Manipulation: Track navigation and editing.
- Text Manipulation: Text printing, expansion, escaping.
- Configuration: General configuration and related files.
- OSD: Displaying contents as OSD.
- Input and Keybind: Input configuration and key bindings.
- Execution: Execution of mpv and subprocesses.
- Scripting: Script loading and communication.
- Screenshot: Taking screenshots.
- Filter: Changing filters.
- Miscellaneous: Other commands.