0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
Commit Graph

52776 Commits

Author SHA1 Message Date
Kacper Michajłow
57ed94ced0 ci/win32: update to FFmpeg 7.0 2024-08-07 13:09:21 +02:00
Kacper Michajłow
c4b963d775 workflows/fuzz: report OOMs and timeouts 2024-08-07 13:09:21 +02:00
nanahi
0818f6001c console.lua: guard user-data/osc/margins value
Defaults margins to 0 if an external script sets this to an invalid value.
2024-08-06 20:28:44 +02:00
nanahi
9133ce7623 DOCS/man/input: document user-data/osc/margins
This property is used by the built-in OSC and some third-party OSC scripts
to indicate the margin they occupy so that other scripts such as
console.lua can use this value to position UI elements.
2024-08-06 20:28:44 +02:00
nanahi
d302fe0de5 DOCS/man/input: reserve user-data/osc and user-data/mpv sub-paths
Currently user-data/osc is used for interpolation between the osc and
other internal scripts. Reserve this sub-path and also user-data/mpv
to make sure external scripts can only use these values as directed.
New internal uses of user-data should use user-data/mpv instead.
2024-08-06 20:28:44 +02:00
Guido Cella
ee05804bfa {osc,select}.lua: show playlist entries with trailing /
If a playlist entry ends with a slash these scripts only show the
basename which is empty. Fix this by stripping trailing slashes so that
the last directory component becomes the basename.
2024-08-06 20:27:33 +02:00
llyyr
67bd00f163 input: fix inverted condition
I don't know if this broke anything but the the condition was inverted
as a result of the recent commit.

Fixes: 1a27f3caf7 ("input: use bstr for section name")
2024-08-06 20:26:49 +02:00
llyyr
d766fc0914 input: don't mutate 'section' variable inside a loop
This fixes broken input-section parsing

Fixes: 1a27f3caf7 ("input: use bstr for section name")
2024-08-06 20:26:49 +02:00
Kacper Michajłow
6f619d5ef4 vo_libmpv: don't steal pointer provided by the API user
It won't be TA allocated and would fail on header check. Also
documentation doesn't mention that ownership is transfered to mpv, so it
is unexpected.

This will cause existing clients of this API leak this memory, but I
doubt anyone really used it in this broken state.

Fixes: #14633
2024-08-06 20:17:35 +02:00
Kacper Michajłow
25f441b740 fuzzer_set_property: ensure idle is enabled
It is used in play loop to check if playback ended cleanly. Don't allow
set_property to disable idle.
2024-08-04 21:33:36 +02:00
Kacper Michajłow
ec40dcca9b loadfile: fix relative file open exclusion for fuzzing 2024-08-04 21:33:36 +02:00
Kacper Michajłow
1a27f3caf7 input: use bstr for section name
Resolves mixed use of bstr in internal processing and char* for storage.
Also makes faster comparision when searching for section and resolves
comparision when name contains null chars.
2024-08-04 21:33:36 +02:00
Kacper Michajłow
aa35f2e4bd demux_mf: disable glob for fuzzing 2024-08-04 21:33:36 +02:00
Guido Cella
5f768a688b loadfile,select.lua: print only one bitrate
Print demux-bitrate if available, else hls-bitrate, not both (as
demux-bitrate is generally more reliable). This avoids printing "HLS
kbps" which looks weird.

Fixes
https://github.com/mpv-player/mpv/pull/14453#discussion_r1700550385
2024-08-02 08:41:43 +02:00
llyyr
11ed012c34 player/audio: invert audio_started boolean
Waiting for audio_started to be set to true takes too long which causes
us to miss it for the first frame, instead invert the condition so it's
set on the first frame.

Fixes #14615
2024-08-01 11:45:13 +00:00
Kacper Michajłow
24f42acd1d ad_spdif: update list of DTS_HD profiles 2024-08-01 13:27:08 +02:00
llyyr
dcb4b491b2 TOOLS/stats-conv: minor cleanup 2024-08-01 01:58:30 +02:00
llyyr
0c72a2f26d TOOLS/stats-conv: silence linter messages 2024-08-01 01:58:30 +02:00
llyyr
f1cd59ba92 TOOLS/stats-conv: convert to pyqt6 2024-08-01 01:58:30 +02:00
Dudemanguy
06470899df github/workflows/{build,fuzz}: exclude pr/issue template paths 2024-07-30 14:08:24 +00:00
Kacper Michajłow
7ab6458cf9 github/issue_template: fix paragraph spacing
Fixes: 051e2a8b7a
2024-07-29 21:55:25 +02:00
Kacper Michajłow
6a43514097 win32/smtc: add thumbnail support 2024-07-29 21:38:19 +02:00
Kacper Michajłow
3bef4a8599 ci/{msys2,win32}: explicitly enable win32-smtc 2024-07-29 21:38:19 +02:00
Kacper Michajłow
5fed12e025 win32: add Media Control support
Add support for SystemMediaTransportControls interface. This allows to
control mpv from Windows media control ui.
2024-07-29 21:38:19 +02:00
Kacper Michajłow
06da680630 ci/msys2: install cppwinrt
Will be useful for future commits.
2024-07-29 21:38:19 +02:00
Kacper Michajłow
c430420840 osdep/threads-win32: cast function type directly to avoid warnings 2024-07-29 21:38:19 +02:00
Kacper Michajłow
ab3d0b73f7 build: bump minimal Windows version to 10 2024-07-29 21:38:19 +02:00
Kacper Michajłow
e17b5c635e VERSION: rename to MPV_VERSION to avoid standard library header conflict
Root directory is added to include directories and `VERSION` conflicts
with `#include <version>` which is standard library header.
2024-07-29 21:38:19 +02:00
Kacper Michajłow
2ad6566e51 meson: define WINRT_NO_SOURCE_LOCATION
Not really needed currently for our limited use of winrt.
2024-07-29 21:38:19 +02:00
Kacper Michajłow
5bb467e58a meson: minor adjustment for compatibility
- Move C only warnings to own test
- Add missing native arg for add_languages
- Undef __STRICT_ANSI__ only for c/objc
2024-07-29 21:38:19 +02:00
nanahi
40f1a89e40 input/ipc: use bstr for fd parsing
Also rejects the case of "fd://" without any number which was
silently accepted as 0.
2024-07-29 21:00:48 +02:00
nanahi
bb0932a3ad input/ipc-win: support fd:// for --input-ipc-client
This makes --input-ipc-client work on Windows.

To use this feature, a parent process needs to create a connected named pipe,
wrap the server handle in a CRT fd, and then spawn mpv as a child process
with the fd as the --input-ipc-client parameter.
The process can then communicate through the client handle.

The named pipe must be created duplex with overlapped IO and inheritable
handles.
2024-07-29 21:00:48 +02:00
nanahi
87686a80e5 DOCS/man: add more --input-ipc-client references
Mention the alternative ipc method through fd inheritance.
Also fix a grammar mistake.
2024-07-29 21:00:48 +02:00
nanahi
fc6aa2cc8a player/scripting: remove outdated comment about posix_spawn
The comment was added in e2ab6b7f35,
but posix_spawn usage was removed in 5309497727
to ensure CLOEXEC correctness.
2024-07-29 21:00:48 +02:00
Kacper Michajłow
f8700c5a94 meson: check for vulkan headers
Vulkan dependency implies only vulkan loader, but some distributions
split vulkan-loader and vulkan-headers, so check if the headers are
actually there.
2024-07-29 20:59:46 +02:00
rtldg
05b964fdec DOCS/compile-windows.md: fix MSYS2 packages
Attempting to install `git` on the `pacboy` line fails with
`error: target not found: mingw-w64-clang-x86_64-git`
so move that to another spot.

`video_mp_image_pool.c` fails to build due to libavutil right now
because of missing vulkan headers so install those with `pacboy`.
(also improved in https://github.com/mpv-player/mpv/pull/14610 )

Simplify package lists since pacboy doesn't require `:p` anymore.
2024-07-29 20:59:22 +02:00
Brad Smith
a36f8ad162 build: detect VT_GETMODE on OpenBSD 2024-07-29 15:09:49 +00:00
Kacper Michajłow
051e2a8b7a github/issue_template: add a note about log file 2024-07-29 15:27:14 +02:00
Guido Cella
544240c829 player/command: fix --force-window=yes acting like immediate
player/main.c runs all option callbacks with a flag on init, so since
a5937ac7e3 which added UPDATE_VO, if --force-window=yes is passed, the
VO is immediately initialized, as if --force-window=immediate was
passed. Fix this by not running the UPDATE_VO code when there is no
video output.
2024-07-29 01:46:21 +00:00
Guido Cella
6107112b32 player: don't decrement --ab-loop-count=N and add remaining-ab-loops
Follow up to the previous commit. Stop decreasing --ab-loop-count=N on
each iteration so it is preserved across different loops. In particular
it is preserved between different files without adding it to
--reset-on-next-file. Add a property to expose the remaning A-B loop
count instead.

The current behavior of --ab-loop-count=N is even worse than --loop-file
since it also doesn't reset when defining a new A-B loop in the same
file. Defining it has no effect after --ab-loop-count has decreased to
0, and this can't be fixed by adding it to --reset-on-next-file. This
commit also resets remaining-ab-loops every time --ab-loop-a and
--ab-loop-b are set to fix this.
2024-07-26 20:09:19 +02:00
Guido Cella
f411f3145b player: don't decrement --loop-file=N and add remaining-file-loops
This stops decreasing numerical values of --loop-file on each iteration
so that loop-file=N loops every playlist entry without having to add
--loop-file to --reset-on-next-file.

The current behavior confuses users as seen in:

https://github.com/mpv-player/mpv/issues/2481
https://github.com/mpv-player/mpv/issues/5943
https://github.com/mpv-player/mpv/issues/11291
https://github.com/mpv-player/mpv/issues/13860
https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/

Also options are supposed to reflect the value configured by the user
and not change on their own.

A remaining-file-loops property is exposed as a replacement to check how
many loops are left.
2024-07-26 20:09:19 +02:00
Kacper Michajłow
397212ae15 player: remove empty line from --help
Follow-up after 127b6a3455.
2024-07-26 20:07:30 +02:00
Kacper Michajłow
77f1083098 options/m_config_frontend: remove empty line from --show-profile
Follow-up after 127b6a3455.
2024-07-26 20:07:30 +02:00
Dudemanguy
3c7b6db205 options: move all wayland specific options to vo_opts
Unlike most other platforming backends, wayland has its own specific
sub_options struct. 027ca4fb85 originally
introduced this and some more options were added later, but in
retrospect it's an unneccesary complication. There are already x11,
and windows-specific options within vo_opts. In fact, there actually is
a wayland one in there already as well (wayland-content-type) so it's
split btween two places. The wayland code already has to handle vo_opts
and it is already handles callbacks if needed. There is no advantage to
having a separate wayland-specific sub_options struct which is stuck
with whatever you set at init time.

So solve everything by deleting the old sub_options struct, moving it to
vo_opts and make some minor option naming changes for clarity (i.e.
adding a 'wl_' in front of the name). This simplifies the wayland common
code and also makes it have more functionality since you get runtime
updates for free.
2024-07-24 18:46:04 +00:00
Guido Cella
bde7cac447 various: allow changing GPU API options at runtime
Set UPDATE_VO to GPU API options that are only set on init.

To change multiple options without multiple reinits, use
set vo null; set opengl-foo 1; set opengl-bar 1; set vo gpu
2024-07-24 18:44:41 +00:00
Guido Cella
a5937ac7e3 m_option: add UPDATE_VO flag
This will allow reiniting the VO when more options are changed without
hardcoding them in options.c

Also reinit the VO when changing --gpu-debug and --gpu-sw.
2024-07-24 18:44:41 +00:00
Guido Cella
d384a6b793 external_files: allow specifying --cover-art-whitelist filenames
Fixes https://github.com/mpv-player/mpv/discussions/14520.
2024-07-23 14:12:11 +00:00
llyyr
e509ec0aaf DOCS/options: remove misdirection in sub-color
ARGB is in fact _not_ like web color. It's easy to skim over the
actual hexadecimal provided in the next sentence and just assume mpv
understands RGBA after reading the words "web colors"
2024-07-19 15:56:29 +02:00
nanahi
07acdf09b3 sd_ass: fix margin y scale with font size
--sub-margin-y is documented to scale with font size, which is scaled
"by" or "with" window depending on the options. However, when using
ass_set_font_scale to change font size, the y margin isn't scaled, so it is
still scaled to video size. This causes the y margin size becoming smaller
when the video becomes smaller, even when the font size isn't changing.

Fix this by also scale the MarginV with the font scale. Also use lrint
instead of round.
2024-07-18 23:03:02 +02:00
nanahi
b59ac04db9 DOCS/man/options: clarify subtitle scale options
The current documentation of sub-scale-by-window and sub-scale-with-window
doesn't sufficiently convey what these options do exactly. Specifically,
the described effects of disabling one option is only true when the other
option is not disabled. The "clarification" of sub-scale-with-window option
only adds more confusion, when the effect of that option is already told
in more detail before (it scaled with window instead of video).

Clarify this by listing the effects of all combinations of these options.
2024-07-18 23:03:02 +02:00