Commit Graph
53448 Commits
Author SHA1 Message Date
Dudemanguy 91c1b65de0 vo: change draw_frame API to a boolean
x11 and wayland VOs + backends all have logic that skips drawing frames
when the mpv isn't visible for efficiency reasons. This is implemented
in each individual VO, but it is useful for the core to be aware of this
as well. Currently, the display-sync modes on x11 do not try to be
efficient and always render anyways because there is no blocking on the
graphics API level if you skip rendering a frame (wayland works here by
accident). This means mpv would otherwise blaze through frames which is
not what anyone wants. We can instead improve this by implementing the
blocking mechanism in the core and using that when appropriate. This
commit does not implement that yet, but simply switches the draw_frame
to a boolean. Receiving false means that the VO is not drawing frames
and it should be treated as if the surface was hidden.
2024-12-28 16:51:28 +00:00
Guido Cella 753e206d5c zsh-completion: complete av://lavfi:testsrc and av://lavfi:sine
It is annoying to type these over and over.
2024-12-28 16:48:48 +00:00
Kacper Michajłow 7562a798b1 player/osd: use fixed width for vsync-ratio value in status line
Makes status line more stable, without variable width.
2024-12-28 14:33:34 +01:00
Guido Cella 0417218daa console.lua: don't highlight the first completion with mp.input.get
The first completion is highlighted because it is automatically inserted
when pressing Enter, but this isn't the case when the console is used
with mp.input.get, and autoselecting it can be undesirable if you're
entering arbitrary text, unlike with mpv commands where you're usually
choosing from predefined lists. So just don't highlight the first
completion for mp.input clients.
2024-12-28 14:31:44 +01:00
der richter 4dbf81c94c mac/title: use enum for material values instead of generic integers 2024-12-28 14:30:41 +01:00
der richter 4063cdf20b mac/title: use enum for appearance values instead of generic integers 2024-12-28 14:30:41 +01:00
Guido Cella e696b75f57 options: add --playlist-exts
And add playlist to --directory-filter-types' default.

Fixes
https://github.com/mpv-player/mpv/issues/15096#issuecomment-2466695186,
fixes https://github.com/mpv-player/mpv/discussions/15508
2024-12-28 14:24:00 +01:00
Guido Cella 114bdc24f2 options: add --archive-exts
And add archive to --directory-filter-types' default.

Fixes #15550, fixes #15096.
2024-12-28 14:24:00 +01:00
Guido Cella bd150a4d8d console.lua: keep --osd-{,outline}-color's alpha component for styles
There is no need to override this for colored lines.
2024-12-28 14:13:46 +01:00
Guido Cella fcbecbf17e DOCS/man/osc: document that {v,h}align only affect box layouts 2024-12-28 14:09:52 +01:00
Guido Cella 61aa8200ad console.lua: complete clipboard/text 2024-12-28 14:09:07 +01:00
Guido Cella a0f8d27aba input.conf: bind Ctrl+v to play the path in the clipboard 2024-12-28 14:08:32 +01:00
der richter cd9fa6daf0 mac/title: remove old libmpv color setter fallback 2024-12-28 01:46:41 +01:00
der richter 51af3caa77 mac/title: remove old libmpv material setter fallback 2024-12-28 01:46:41 +01:00
der richter 11a9f355c7 mac/title: remove old libmpv appearance setter fallback 2024-12-28 01:46:41 +01:00
Kacper Michajłow bafb054cfc ci/win32: enable tests for dependencies
We build and ship this code, so it makes sense to make sure it is ok.

Tests for FFmpeg, libass and libplacebo are explicitly enabled. The rest
is in default state, so if tests are enabled by default, they will run.
2024-12-27 14:01:36 +01:00
der richter 379c078869 meson: only build libmpv_helper with cocoa-cb 2024-12-26 15:00:57 +01:00
der richter bba198a713 mac: use isBundle function instead of manually checking bundle usage 2024-12-26 15:00:57 +01:00
Kacper Michajłow d9eb9ed844 video/sws_utils: remove unused mp_image_swscale
This has been used before 2c43d2b75a. Now
that we have also zimg support, using swscale directly may not be wanted
depending on the user options.
2024-12-25 18:01:56 +01:00
der richter d389c06646 console.lua: use native clipboard property on macOS 2024-12-24 16:11:45 +01:00
der richter 026f1fb61d clipboard-mac: add macOS clipboard backend 2024-12-24 16:11:45 +01:00
der richter e8ecc7d9d9 osdep/mac/meson.build: dynamically add features to swift build flags
similar to how our config.h is created the feature flags added to the
swift build should be generated from our features array, instead of
manually adding those when needed.

this prevents errors when forgetting to add any needed flags or remove
obsolete ones.
2024-12-24 16:10:52 +01:00
der richter cf01fdddb5 DOCS/ao: add missing documentation for audiounit
was forgotten in initial implementation 8 years ago 3f5b41d.
2024-12-24 16:10:24 +01:00
der richter d82701962f libmpv: deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT render parameter
the equivalent options have been deprecated since mpv 0.35 in ac39661
and 2207236.

also bumping the MPV_CLIENT_API_VERSION to 2.5, since 2.4 was forgotten
in 6f619d5.
2024-12-21 16:15:44 +01:00
der richter e785296a1c cocoa-cb: use new ambient-light property and remove old libmpv usage 2024-12-21 16:15:44 +01:00
der richter e0f82b1a77 gamma-auto.lua: add this script as replacement for --gamma-auto
also mention this replacement for --gamma-auto.
2024-12-21 16:15:44 +01:00
der richter 2b06728df9 command: add ambient-light property
make it observable to make it usable as a replacement for --gamma-auto.
2024-12-21 16:15:44 +01:00
der richter 811062279e vo: change VOCTRL_GET_AMBIENT_LUX from int to double 2024-12-21 16:15:44 +01:00
der richter 568e2c357b DOCS/contribute.md: add guidelines for Swift and Objective-C 2024-12-21 16:13:08 +01:00
Dudemanguy 96bebf0935 x11: simplify --geometry and --auto-window-resize logic
There were a few pitfalls with the way this was previously implemented
because --geometry implicitly depended on --auto-window-resize being
enabled to operate in a few cases. Instead, let's change the logic a bit
so that instead we choose whether or not to reuse the old rc (i.e. don't
resize) and use the wh_valid and xy_valid fields within the m_geometry
struct instead of using x11->geometry_change. This fixes several edge
cases involving setting the position with --geometry when using
--auto-window-resize=no.
2024-12-20 18:03:30 +00:00
nanahi 8ee1aeaf1a DOCS/man: fix Unicode capitalization 2024-12-20 14:54:35 +00:00
nanahi 298c178f1e input.conf: use capital letters instead of shift modifiers
Follow the suggestion of keyname documentation.

Fixes: b4d9980870
2024-12-20 14:54:35 +00:00
nanahi b174d98042 video/out/wayland_common: make all XF86 special keys mappable
Forgotten in 417869f845.
2024-12-20 14:54:35 +00:00
nanahi 1107bdb62e DOCS/man/input.rst: clarify hexadecimal key names
Document the syntax and mention how it can be used as Unicode
codepoints. ASCII range has worked since the feature was inplemented
in 86a87de590 and Unicode range has
worked since a63e880400.

It also works with known special keys if you know the internal values
of keys because there is no filtering in place, but this should not be
encouraged.
2024-12-20 14:54:35 +00:00
nanahi 269e402579 DOCS/man/input.rst: clarify that caps lock affects produced keycode
Because mpv keycodes are whatever the text the keyboard input produces,
caps lock also affects this.
2024-12-20 14:54:35 +00:00
nanahi 4711e40814 DOCS/man/input.rst: clarify shift modifier behavior
When shift modifier is used with text key names, it is usually
silently ignored, except for ASCII key names, which can be
confusing. Document it clearly.
2024-12-20 14:54:35 +00:00
nanahi f8a5df56cc DOCS/man/input.rst: fix grammar 2024-12-20 14:54:35 +00:00
Guido Cella 38c46e4d89 stats.lua: enable runtime script-opt changes
This doesn't work for changing page key script-opts at runtime because
they are used as the indexes of the pages variable, but nothing actually
breaks if you do, it just uses the initial values. This is still useful
for conditionally changing sizes at runtime or for trying out the
osd-box profile by applying it from the console.
2024-12-20 14:54:20 +00:00
Guido Cella 19537a4996 console.lua: inherit --osd-color and --osd-outline-color
Stop overriding the OSD font and outline color in the console input line
and log, except for the lines already in a different color. This allows
configuring the console color and makes it consistent with the rest of
the OSD, like 51bd00c33a did for stats.
2024-12-20 14:54:08 +00:00
Kilian Evang 5354a50f9f DOCS: fix description of subtitle delay adjustment
Modified the man page.

There were two pairs of key bindings that appeared in one order but
the description of what they do appeared in the reverse order. Modified
the description to match the order in which the keys appear.

Note: I have not tested this change.
2024-12-20 14:53:26 +00:00
Guido Cella 661a380fda console.lua: color the default item with --osd-selected-color
Currently if you change --osd-selected-color the preselected item stays
yellow and can't be changed. Since the default item style was just
chosen from the selected color without the bold, also make the default
item follow --osd-selected-color.

Requested in
https://github.com/Samillion/ModernZ/issues/259#issuecomment-2556608926.
2024-12-20 12:43:34 +01:00
norinoriko 566c3ef367 DOCS/man/console.rst: remove outdated issue
This was fixed for win32.

See-Also: https://github.com/mpv-player/mpv/pull/15355
2024-12-20 12:34:32 +01:00
nanahi 1723f8a9d2 sd_ass: fix fix_margins calculation
Saving old playresx method is incorrect after the first
configure after the subtitle is loaded.

Fixes: f862d3b6cd
2024-12-19 19:43:27 +00:00
llyyr 32d103c580 meson: bump libdrm version to 2.4.109
The previous check was incorrect because drmGetDeviceFromDevId is only
available since 2.4.109.

https://gitlab.freedesktop.org/mesa/drm/-/commit/57e0b0552e11b3f04e6d5704c1c7efea5f83ffe4

Fixes: 0d7b4d64a5
2024-12-17 23:30:48 +00:00
Guido Cella a6f93ac81e options: add heic and heif to --image-exts 2024-12-17 23:30:32 +00:00
yk 96fad6a0fc ytdl_hook: pass empty proxy value
an empty value to a commandline option usually means that parameter does
not expect anything, but in case of `--proxy`, yt-dlp use an empty value to
disable proxy setting, the empty value need to be passed to `--proxy`
2024-12-17 22:26:46 +02:00
Guido Cella 2756a780b2 demux_lavf: remove obsolete defines
AV_DISPOSITION_TIMED_THUMBNAILS was added in FFmpeg 3.2 and
AV_DISPOSITION_STILL_IMAGE in FFmpeg 4.1, and we require FFmpeg 6.1.
2024-12-17 20:05:20 +00:00
Guido Cella 7715e2e255 demux_lavf: detect heif/heic as images
Like 565e7d906c did for avif, consider 1-frame HEVC as images, as HEVC
videos have nb_frames 0 or > 1.

Specifically, in the FATE suite:

nb_frames = 0 and are images:
cbf_cr_cb_TUDepth_4_circle.h265 food.hevc hdr10_plus_h265_sample.hevc
hdr_vivid_h265_sample.hevc hevc-monochrome.hevc

nb_frames = 0 and are videos:
mv_nuh_layer_id.bit paired_fields.hevc
paramchange_yuv420p_yuv420p10.hevc pir.hevc

nb_frames > 0:
dv84.mov extradata-reload-multi-stsd.mov multiview.mov
two_first_slice.mp4

As with other video codecs, the hevc images with nb_frames = 0 which are
really frames cut from a video are not detected as images, but you will
only find these files in FATE.
2024-12-17 20:05:12 +00:00
Guido Cella e52f975842 osc.lua: simplify track ID retrival
When track IDs are auto mp.get_property_native() returns "auto", but
mp.get_property_number() returns nil.

Follow up to 1a558bf5c2 and 897c04afe1.
2024-12-13 18:46:53 +01:00
Guido Cella 5e4b825a48 select.lua: abort edition selection when there's only 1
MKVs have 1 edition by default so don't show an empty edition selection
in that case.
2024-12-13 03:46:03 +01:00