Commit Graph

53461 Commits

Author SHA1 Message Date
Callum Moffat
748fc2b752 ao_audiounit: add --audio-exclusiv support, make non-exclusive default 2024-12-31 13:51:44 +01:00
Guido Cella
11dcd445d9 osd: remove unused constants
OSD_STOP was never used.
OSD_BALANCE is unused since 3d27a0792b.
OSD_PB_* are unused since ef3c0e6eda.
2024-12-31 11:16:45 +01:00
Guido Cella
551cec9d95 DOCS/man/mpv: document that you can deselect the current track
Some users did not realize this is possible.
2024-12-31 11:09:33 +01:00
Guido Cella
4df89532e1 DOCS/man/input: edition-list/N/id is not writable
I added RW to edition-list/N/id in 34f2143e8f because in #8077 it was
assumed that it is writable from the wording of the docs. But what the
docs actually meant is that you can retrieve edition-list/N/id and then
use the retrieved value to set the edition property.

Remove RW and the ambiguous sentence.
2024-12-31 10:37:14 +01:00
Misaki Kasumi
e325959980 subprocess: fix reset_signals_child missing last signo 2024-12-31 10:16:50 +01:00
Guido Cella
50a3da73b7 select.lua: fix select-edition crash on non-MKVs
In files other than MKVs edition-list is an empty table, not nil. It is
current-edition that is nil.

However nil still needs to be checked to not crash with mpv --idle.
2024-12-31 10:13:38 +01:00
Kacper Michajłow
1dd0e49f83 stream_file: don't allow to open standard streams during fuzzing
To avoid all sorts of I/O loops.
2024-12-29 20:14:00 +01:00
llyyr
83bb49815c DOCS/man/vo.rst: improve dmabuf-wayland documentation 2024-12-28 19:57:52 +00:00
Kacper Michajłow
c5668729be sub/lavc_conv: free avctx correctly on error
Fixes memory leak on error.
2024-12-28 17:52:37 +01:00
Kacper Michajłow
66321465dc m_option: free channels before overriding in parser
Fixes memory leak when --audio-channels option is passed multiple times.
2024-12-28 17:52:37 +01:00
Kacper Michajłow
85b8493aad demux_mkv: cast to u32 before shift to fix int overflow 2024-12-28 17:52:37 +01:00
Dudemanguy
3218e74aaa x11: allow display sync modes to report no visibility
When this was originally implemented, I lazily skipped the optimization
when using display sync because mpv would rip through all the frames
without waiting since there was no blocking. With the previous commits,
we now fall back on the audio sync logic when the window is not visible,
so the extra condition can be removed.
2024-12-28 16:51:28 +00:00
Dudemanguy
a2fe5ee900 player/video: fallback to audio sync logic if VO is not visible
The previous commit put all the pieces in place so now this can be
implemented. Scheduling frames is already written with the assumption
that display sync maybe turn on/off at any time. So all that needs to be
done is check if the VO reports that it is not visible. If so, simply
flip mpctx->display_sync_active to false for that frame and skip the
display sync frame handling. It will become true again when the mpv
window comes back into view.
2024-12-28 16:51:28 +00:00
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