1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00
Commit Graph

53153 Commits

Author SHA1 Message Date
rkscv
8cd69e6de8 DOCS/man/lua: correct example syntax 2024-10-29 12:26:04 +02:00
Kacper Michajłow
466b5530c9 DOCS/man/osc: remove non-existent options
Fixes: a80f535a6d
2024-10-29 00:45:59 +01:00
Guido Cella
934bfd2b7e console.lua: restore the bigger default font size
Fixes aa66f0dced.
2024-10-29 00:13:32 +01:00
Guido Cella
aa66f0dced console.lua: default to a proportional font for select
In the select menu there are no completions to align in a grid, so the
better looking proportional font of --osd-font can be used by default.
It is also easier to read for the visually impaired.

The text width calculation is no longer performed if the console is only
opened through select, it is only performed the first time something is
completed. This avoids having to pass an argument to get_font() to make
it use the monospace font regardless of selectable_items.

Fixes #15176.
2024-10-28 23:30:34 +01:00
Guido Cella
cb8e3ba959 osc.lua: hide immediately without animation for select.lua
Requested by llyyr.
2024-10-28 23:28:50 +01:00
Guido Cella
bf3382b083 console.lua: fix the hovered line calculation without scale with window
If not scaling with the window the hidpi scale needs to be factored into
mouse-pos. Follow up to a670f75679 and a2106396bc.
2024-10-28 23:17:21 +01:00
Guido Cella
940ab99055 osc.lua: make shift+mbtn_left an alias of mbtn_mid
...instead of the opposite. This simplifies bind_mouse_buttons().
2024-10-28 23:16:54 +01:00
Guido Cella
dc85266aff osc.lua: remove code repetition for mouse bindings 2024-10-28 23:16:54 +01:00
Guido Cella
4b97e723d6 osc.lua: rename the tog_fs button
Make it consistent with the command script-opt names.
2024-10-28 23:16:54 +01:00
Guido Cella
a2106396bc console.lua: fix the clicked line calculation
e00d8dcb03 factored hidpi-scale in get_scaled_osd_dimensions(), so
max_lines was dividing by it a second time.
2024-10-27 21:36:32 +00:00
Guido Cella
29cffadf60 console.lua: document the new hipdi scaling behavior
Update the docs for the changes of a670f75679.
2024-10-27 21:36:32 +00:00
nanahi
a670f75679 console.lua: don't scale with display dpi if scaling with window size
Fixes overly large text on hidpi displays.
2024-10-27 21:43:36 +01:00
Guido Cella
423e8f2711 osc.lua: increase the title font size in box layout
It is too small.
2024-10-27 21:10:36 +01:00
Guido Cella
d2fd394036 console.lua: increase the font and border size
Make the console easier to read because the current default is too
small. See for example
https://github.com/mpv-player/mpv/discussions/14903#discussioncomment-10794701
or https://github.com/mpv-player/mpv/pull/15036#discussion_r1794178379
or https://github.com/mpv-player/mpv/pull/15145#issuecomment-2428762898
or https://github.com/mpv-player/mpv/pull/15031#issuecomment-2402289600.

This also prevents libass from decreasing performance by printing many
lines.
2024-10-27 21:07:37 +01:00
Guido Cella
e00d8dcb03 console.lua: add scale_with_window script-opt
If this is set to yes or auto and --osd-scale-by-window is true, console
scales with the window height like everything else in mpv.

Defaults to auto.
2024-10-27 21:07:37 +01:00
Guido Cella
fbf869584c osc.lua: cycle tracks on right click
This might be more useful than having the same binding as middle click.
Suggested by llyyr.
2024-10-27 01:24:03 +02:00
Guido Cella
897c04afe1 osc.lua: don't print auto before tracks are selected
While files are loading, track options have the value "auto". Print "-"
in that case.

Fixes 1a558bf5c2.
2024-10-27 01:23:20 +02:00
Guido Cella
99e4979b01 mac/menu: use show-text instead of old osc script messages
1a558bf5c2 made osc-*list script messages aliases to show-texting the
relative properties, so use show-text directly in the menu. Also
increase the duration to be the same as the OSC buttons because the
default of 1 second is too short.
2024-10-26 20:09:57 +02:00
nanahi
c6883c4a56 options: add option to control OSD bar marker style
This adds --osd-bar-marker-style option which can be used to
customize OSD bar marker style. In addition to the existing triangle
style, a new style option is added to draw markers as lines.
2024-10-26 20:02:04 +02:00
nanahi
ea8ac49f11 options: add options to control OSD bar marker size
This adds --osd-bar-marker-scale and --osd-bar-marker-min-size
options which can be used to customize OSD bar marker size.
2024-10-26 20:02:04 +02:00
nanahi
085a816c80 osd_libass: rename marker size variable
The size won't be dent anymore once other marker styles are
added.
2024-10-26 20:02:04 +02:00
Earnestly
9f6cca624f ytdl_hook.lua: track playlist metadata
Add support for tracking playlist_title and playlist_id metadata
corresponding to a given playlist url and the entries associated
with it.

This allows the inclusion of ytdl_playlist_title and ytdl_playlist_id
in the metadata property for single videos which have a corresponding
playlist-path property.

This commit also resolves yt-dlp/yt-dlp#11234
2024-10-26 19:59:26 +02:00
nanahi
9af491fc80 Copyright: fix -Dgpl=false description
Even with -Dgpl=false, some files including the documentation,
mpv.desktop, and some key binding files are still being built.
This means that mpv as a whole might not be LGPL even when the
program itself is LGPL.

Also the description that mpv is licensed under LGPLv2.1+
"if built with the -Dgpl=false configure switch" is incorrect
as it appears to give a license grant as long as the switch is
used, regardless if there is a bug in the build system that
results in a GPL file being compiled in.

Change the description to clarify this.
2024-10-25 14:01:16 +02:00
nanahi
246be60401 Copyright: remove some redundant texts
The same information is already covered by the second and the last
paragraphs.
2024-10-25 14:01:16 +02:00
nanahi
71ccc45188 Copyright: clean up nonexistent features
Remove some of the features that no longer exist or aren't directly
supported in the mpv code: Linux analog TV (DVB still supported),
SMB, bootstrap.py.
Also fix the path for mpv.desktop.
2024-10-25 14:01:16 +02:00
Guido Cella
5c59f8accc command: remove an extra space from track formatting 2024-10-24 22:04:44 +02:00
Guido Cella
4598ceb3f2 osc.lua: show track-list for one more second
Useful now that track metadata is printed. This now uses the same
duration as playlist and chapter-list.
2024-10-24 22:04:09 +02:00
der richter
96095bd591 github: add newline at end of file of pull request template 2024-10-24 17:40:26 +02:00
der richter
e661165ead github/workflows: add editorconfig linting 2024-10-24 17:40:26 +02:00
Guido Cella
ef6eda32a2 command: print track metadata when changing track 2024-10-24 17:39:46 +02:00
Guido Cella
f0a852cda3 command: print lang in track-list 2024-10-24 17:39:46 +02:00
Guido Cella
b1037f5d63 loadfile: reuse circle definitions in command.h 2024-10-24 17:39:46 +02:00
Guido Cella
3ea8d751f5 command: print track metadata in ${track-list}
Extract track metadata formatting out of loadfile.c to reuse in the
track-list property.
2024-10-24 17:39:46 +02:00
Guido Cella
1bee15d5da laodfile: remove redunant track type check
The data within the checks is unavailable if the track isn't of that
type, so there is no need to check the type.
2024-10-24 17:39:46 +02:00
llyyr
c5561b8e09 demux_playlist: fix comparison for current file if it's in current dir
When the file is in the current working directory, stream->path points
the path user passed as arg, so it may or may not include './'.

Strip it from both to make the comparison work

Fixes: c201c4874d
2024-10-24 12:34:58 +02:00
Dudemanguy
851df7088a video/out/gpu/context: prefer vulkan over opengl when reasonable
For most actual desktop users, vulkan should be the a superior
experience over opengl as this point and our autoprobe should pick that.
For linux users, vulkan on wayland is rapidly seeing improvements and is
far ahead of egl. There is no sign of that changing anytime soon and
working fifo is on the horizon, so really wayland users should just all
be using vulkan from now on. For x11, there is not a big difference
between using egl vs vulkan as far as I know and both work well. macOS
already prefers the vulkan backend over the libmpv one anyways, and
finally windows still defaults to d3d11. Probably virtually no one uses
opengl on windows, but vulkan is reasonably common among windows users
and it doesn't make any sense to prefer opengl over it.

The two outliers here are Android and VK_KHR_display. On Android, vulkan
drivers are probably just a total disaster and let's not put ourselves
in that mess if there's no reason to. For VK_KHR_display, it actually
works fine except for one really big problem: VT switching doesn't work.
If you try it, enjoy losing all input and being forced to do a hard
reboot. It might be fixable if you use logind or something, but the
method of using signals like the drm context does won't work because
VK_KHR_display uses render nodes not primary nodes. Also, the opengl drm
context could support hdr in theory (some attempts were made but none
succesful) so it is probably "better". Maybe. Anyways, for these two
platforms, we still prefer opengl.
2024-10-23 19:09:20 +00:00
der richter
a8d91b0b13 mac/vulkan: add retrieval of color depth and return auto (0)
this effectively disables the workaround that picks the color/dither
depth based on the source and instead picks it based on the output
surface/pixel format.

macOS apparently always operates at 10bit internally regardless of the
display's bit depth. this changed at some point in the more recent macOS
versions, where previously macOS operated at a frame buffer depth
corresponding to the display. either 30-Bit Color (ARGB2101010) for
10bit or 24-Bit Color (ARGB8888) for 8bit.

Fixes #13767
2024-10-23 19:39:20 +02:00
der richter
3c76afa05b vo_gpu_next/vulkan: add mechanism to retrieve color depth in gpu context 2024-10-23 19:39:20 +02:00
Rasmus Porsager
3d443cb267 x11: fix --fs-screen=all
The logic for getting the display edges was wrong and always resulting in 0 0 0 0 instead of the full desktop. This also fixes #11716
2024-10-23 14:22:39 +02:00
Guido Cella
dec1b00a75 DOCS/man/osc: update default playlist mbtn_right bindings 2024-10-23 14:22:14 +02:00
Guido Cella
f999b0a5c8 osc.lua: don't show the osd-bar on chapter navigation
It is redundant if you're already using the OSC, so only show the
chapter text. Also fix the documented default commands of these buttons
which were outdated.
2024-10-23 14:22:14 +02:00
Guido Cella
165159fdef osc.lua: cycle window-maximized when right clicking fullscreen
And add script-opts to configure the fullscreen button bindings.
2024-10-23 00:21:15 +02:00
Guido Cella
dab5cf4ab0 osc.lua: toggle looping when right clicking playpause
Inspired by ModernX.

Closes #5067.
2024-10-22 22:44:21 +02:00
Guido Cella
a80f535a6d osc.lua: make mouse bindings customizable
This adds several script-opts to configure what OSC buttons do when
clicked. It lets you restore the bindings present before they were
changed to call select.lua.

The script-opts are listed one per line in the manual to not make that
section huge.

skip_backward and skip_forward script-opts are omitted to lower the
script-opts number because they are only in box layout and undocumented.

I'm not sure if it's worth adding script-opts for the wheel on the
seekbar.

script-opts for the current and remaining time and fullscreen are not
added to not add more script messages.

Closes #6291 and #11878.
2024-10-22 22:44:21 +02:00
Guido Cella
8e327f28b4 osc.lua: default chapters_osd and playlist_osd to false
There is a consensus that showing these list when navigating is
distracting. Also if you set --osd-playing-msg, the playlist is briefly
displayed and then overwritten by the msg. The chapter list can even
contain spoilers:
https://github.com/mpv-player/mpv/issues/4675#issuecomment-978840475

The next commit will remove these completely in favoring of making the
commands customizable.
2024-10-22 22:44:21 +02:00
Guido Cella
e6db75b04a osc.lua: rename buttons
Give buttons nicer names before exposing script-opts for their bindings.
In particular, rename cy_audio and cy_sub to audio_track and sub_track
because their left click binding no longer cycles.
2024-10-22 22:44:21 +02:00
Guido Cella
c24c9027af osc.lua: bind middle button down instead of up for tracks
This makes it consistent with most other bindings and lets you cancel
the operation by moving the cursor away (the seekbar bind mouse down so
you can keep seeking to different timestamps).
2024-10-22 22:44:21 +02:00
Guido Cella
cd2acb477c osc.lua: open select.lua by clicking buttons
8bf5548 added mouse support to the console's select menu, so open it
from OSC buttons.

Left click on the title opens the playlist selector and showing the
stats is moved to right click.

Right click on chapter buttons opens the chapter selector.

Left click on track buttons opens the track selectors because seeing
which track you're selecting beforehand is useful.

Fixes #10621.
2024-10-22 22:44:21 +02:00
Guido Cella
68e2b51066 osc.lua: show stats page 5 when clicking the title
Now that the playlist counter is shown by default there is no use in
showing it again, so repurpose the binding to show the stats page with
file and track info.
2024-10-22 22:44:21 +02:00
Guido Cella
8ca7386a38 osc.lua: add osc-hide script-message
This will be used to hide it when opening select.lua.
2024-10-22 22:44:21 +02:00