0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00
Commit Graph

250 Commits

Author SHA1 Message Date
Kacper Michajłow
0e43eea5bb meson: require Vulkan loader/headers >= 1.3.238
Even Debian stable has them, so no need to keep compatible with ancient
versions.

Note that this does not change runtime version requirement for Vulkan.

Fixes: https://github.com/mpv-player/mpv-build/issues/234
2024-09-14 17:20:16 +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
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
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
Brad Smith
a36f8ad162 build: detect VT_GETMODE on OpenBSD 2024-07-29 15:09:49 +00:00
llyyr
9d7d861202 wayland: bump wayland-protocol requirement to 1.31
And wayland-client/cursor to 1.21

Debian Stable has these
2024-07-08 13:33:32 +00:00
llyyr
539e95730a ao_pipewire: bump minimum libpipewire version to 0.3.57
available on debian stable
2024-07-08 13:33:32 +00:00
Kacper Michajłow
799137a87c fuzzers: disallow include command in more principal way
We should never allow include command for fuzzers and it can be
triggered also by direct set property.
2024-06-24 03:05:09 +02:00
Kacper Michajłow
687eb4c875 various: remove no longer needed availability checks
image_writer: remove jpegxl availability check

meson: remove check for lavu vulkan support

image_writer: remove avif availability check

ad_spdif: remove no longer needed definitions

demux_lavf: remove side data extraction compatibility code

demux/packet: remove ITU T.35 availability check

filters/f_lavfi: remove avfilter_filter_pad_count availability check

image_writer: remove PNG cICP support check

mp_image: remove AV_FRAME_DATA_DOVI_METADATA availability check

mp_image: remove AV_FRAME_FLAG_INTERLACED availability check

vd_lavc: remove ctx->pic->duration availability check

sws_utils: remove av_chroma_location_enum_to_pos availability check

vd_lavc: remove AV_CODEC_EXPORT_DATA_FILM_GRAIN availability check

demux_lavf: always use io_close2
2024-06-22 16:12:14 +02:00
Kacper Michajłow
0d8f74231f misc/uuid: remove no longer needed vendored implementation 2024-06-22 16:12:14 +02:00
Kacper Michajłow
3c5a79300c various: remove av channel layout check 2024-06-22 16:12:14 +02:00
Kacper Michajłow
2887b2e64c meson: increase FFmpeg minimum required version to 6.1 2024-06-22 16:12:14 +02:00
der richter
bc5ab97d9a ao_avfoundation: guard features only available on macOS 11.3 and 12
build time and runtime checks.
2024-06-18 19:30:07 +02:00
der richter
55241da4ad cocoa-cb: guard color spaces that are only available on 10.15.4 upwards 2024-06-18 19:30:07 +02:00
Kacper Michajłow
9b935c9076 fuzzers/meson: set link language to cpp 2024-06-16 01:21:16 +02:00
Crend King
6031a0e173 vf_vapoursynth: upgrade to VapourSynth API v4
VapourSynth introduced their version 4 API in R55, 3 years ago. mpv is
still using the deprecated version 3. I think it is good to migrate
before VapourSynth completely removes it.

The most impacted area is the video format. Previously we have a fixed
table of supported formats, each represented by an integer. In v4, the
integer is replaced by pointer to the full struct of the format.

Second, the way to create video filter is changed. Previously caller
needs to supply a "initialization" callback to `createFilter()`, which
sets up video info etc. In v4, video info is prepared first, passed to
the `createVideoFilter2()` and we get back the node.

Also, previously mpv was using the `fmSerial` filter mode, which means
VapourSynth 1) can only request one frame from mpv at a time, and 2) the
order of frames requested must be sequential. I propose to change it to
the parallel request mode, which requests multiple frames at a time in
semi random order. The reasons are, for 1), the get frame function,
`infiltGetFrame()`, unlocks the mutex during output image generation,
thus can benefit from parallel requests. For 2) thanks to the frame
buffer, unordered frame requests are acceptable. Just make sure the
buffer is large enough.

Third, the way VapourSynth scripting environment works change. In v4,
the scripting API is operated through struct pointer, much like the
exist `vsapi` pointer. The "finalize" function is also no longer needed.
2024-06-14 00:25:18 +02:00
Kacper Michajłow
d59a606cbd meson: add -fno-trapping-math to default flags
It is safe to enable for mpv, we don't check or care about floating
point exceptions. Allow the compiler to ignore them too.
2024-06-07 20:12:40 +02:00
Kacper Michajłow
3f84969b21 meson: add -fno-signed-zeros to default flags
It is safe to enable. Even FFmpeg enables this by default.
0415bb74c8/configure (L7521)
2024-06-07 20:12:40 +02:00
Kacper Michajłow
a8d95fd51a bstr: use memchr and memrchr for bstrchr and bstrrchr
May be faster to use optimized variants instead of simple loop.
2024-06-06 21:42:58 +02:00
Kacper Michajłow
0fd4c84a5e meson: clear flags used for build
Some were duplicated between GCC and Clange. Others were missing in
Clang case. Instead test all the flags and don't make assumptions that
will get invalid over time. Testing flags is almost free.
2024-06-05 19:07:58 +02:00
Kacper Michajłow
0c716e762f test/meson: remove unneded sources 2024-06-03 19:18:06 +02:00
Dudemanguy
056b03f9ed build: dynamically generate mpv.desktop file protocols
If we can run the built mpv binary, then it is possible to use a custom
target that reads the protocols we have available in mpv and write the
mpv.desktop file based on the output. For cases where this is not
possible (e.g. cross compiling), then just install the unmodified
mpv.desktop file like before. Fixes #8731 and fixes #14124.
2024-05-22 20:10:52 +00:00
Kacper Michajłow
b11f236eb9 meson: limit concurrent link jobs to 16
Statically linking, especially with LTO can use a lot of memory. Limit
to 16 jobs by default, which is more than enough. Only fuzzers are
affected as we don't produce that much binaries otherwise.
2024-05-20 18:25:05 +02:00
Kacper Michajłow
89ed75e63e meson: assume vkCreateDisplayPlaneSurfaceKHR is available when internal
When Vulkan loader is build internally, let's assume it is available.
2024-05-18 23:22:18 +02:00
sfan5
a33fd3b4cf Revert "stream: don't try to read from all-sparse/no-data files"
The stream layer is just not the right place to make this change
since it's also used for completely unrelated purposes such as reading
configs.

This reverts commit bb7a485c09.
2024-05-12 18:06:21 +02:00
Kacper Michajłow
d79aef1425 meson: add link flags also to cpp
If subprojects are used, linking language of mpv might be upgraded to C++
add our flags there too.
2024-05-10 21:42:10 +02:00
Kacper Michajłow
5009e13431 player/loadfile: match language and subcodes 2024-05-09 17:12:55 +02:00
Kacper Michajłow
40ba63405f Revert "misc: add language-matching utilities"
This reverts commit 8c8d97c26c.
2024-05-09 17:12:55 +02:00
Mohammad AlSaleh
bb7a485c09 stream: don't try to read from all-sparse/no-data files
```
 dd if=/dev/zero of=/tmp/10g.empty bs=1 seek=10G count=0
 dd if=/dev/zero of=/tmp/10m.empty bs=1 seek=10M count=0
 time mpv /tmp/10{g,m}.empty
 ```

 I keep files with the name format `${name}-${hash}.${ext}.empty`
 around, where the original is removed, and a sparse file with
 the size of the original is created instead.

 A lot of time is wasted on such files when going through
 playlists/directories that include some of them.

 This admittedly may not be that common of a use-case.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-05-07 12:22:09 +02:00
Kacper Michajłow
e1e09938c5 meson: add defines for Windows build to avoid warnings
See:
https://learn.microsoft.com/cpp/c-runtime-library/compatibility
https://learn.microsoft.com/cpp/c-runtime-library/security-features-in-the-crt
2024-05-06 22:01:17 +02:00
Kacper Michajłow
94eb07e3ea meson: remove Windows subsystem version, it is 6.0 by default 2024-05-06 22:01:17 +02:00
Kacper Michajłow
053d971507 misc/path_utils: normalize win32 paths 2024-05-05 19:37:57 +02:00
der richter
8a61929eb8 cocoa-cb: add support for macOS color space transformation (EDR/HDR)
by default utilises the color space of the screen on which the window is
located. if a specific value is defined, it will instead be utilised.

depending on the chosen color space the macOS EDR (HDR) support is
activated and that OS's transformation (tone mapping) is used.

Fixes #7341
2024-05-05 19:02:50 +02:00
Kacper Michajłow
47dbc3a74e fuzzers: add new fuzzer targets
fuzzer_set_property.c:

fuzz mpv_set_property in both initialized and non-initialized state.
Useful for user provided values sanitization test. I've already seen
some memory leaks in parsing code, good to drill it.

fuzzer_loadfile.c:

mpv_command "loadfile" test. Good for testing demuxers, decoding and
playback loop. Sadly in headless mode we can't really test AO and VO,
but at least all the code around can be fuzzed. Especially our custom
demuxers like demux_mkv.

fuzzer_loadfile_direct.c:

Similar to loadfile above, but instead of saving the data to file, it
passes the fuzz input in the command. Generated protocol specific
versions (mf:// and memory:// for now) and generic one.

Nothing really complex, but good start and even those few targets should
give good coverage of the most common code paths in libmpv.
2024-04-27 02:47:47 +02:00
Shreesh Adiga
d9c5aef98d vf_gpu: vulkan and egl implementations
Abstract out EGL, and allow choosing between EGL and vulkan at runtime.
vf_gpu_egl.c contains GL specific context and creation/destroy code,
vf_gpu_vulkan.c contains Vulkan specific. This allows vf_gpu being
built in systems where EGL is not available and where Vulkan is
available.
2024-04-27 01:08:22 +02:00
Robert Kopaczewski
578b9dade2 ao/audiounit: fix building for iOS 2024-04-20 00:44:46 +02:00
Kacper Michajłow
1a495451ab d3d11: disable IDXGIInfoQueue usage if dxgidebug.h is incomplete
Older MinGW-w64 doesn't define IDXGIInfoQueue in dxgidebug.h.
2024-04-19 03:32:29 +02:00
Kacper Michajłow
19a9164e24 d3d11: use IDXGIInfoQueue instead ID3D11InfoQueue
DXGI debug interface encapsulate multiple message queues, which allows
to get validation not only for D3D11 calls, but also DXGI ones.

Also this makes leak detector not report self debug interface as alive
like it was before. And same as with validation, it has ability to
detect more alive objects, not being limited to D3D11.
2024-04-19 03:32:29 +02:00
der richter
ee6794225d mac/vulkan: add support for frame timing via presentation feedback 2024-04-10 19:14:20 +02:00
Shuanglei Tao
3c1e983351 vo: add win32 context menu support 2024-04-06 08:24:06 +02:00
der richter
7619cceb87 mac/app: rewrite App c main function, startup and termination in swift
also move main invocation into AppHub and completely delete the old
Application c implementation.
2024-04-01 22:13:39 +02:00
der richter
b7c5b26d35 mac/app: rewrite Application class in swift 2024-04-01 22:13:39 +02:00
Misaki Kasumi
1ed8607292 ao_avfoundation: initial avfoundation ao support 2024-03-29 13:46:59 +01:00
sfan5
52638a4cac meson: refine dependencies of many feature checks 2024-03-26 12:59:59 +01:00
sfan5
af69b268c2 meson: remove some unneeded features from list
There's no practical use in knowing that e.g. mpv was linked
to libm and these are not used for HAVE_* tests either.
2024-03-26 12:59:59 +01:00
der richter
7e07e1a087 mac/apphub: migrate remaining events functionality to new AppHub
add new app_bridge objc file for bridging between mpv core and app
functionality. replace old EventsResponder singleton with AppHub.

another step to clean up all App functionality and have one central
place for it.
2024-03-24 23:03:48 +01:00
der richter
deb9d30e90 mac/event: add helper to subscribe to mpv events and property changes
preparation to remove duplicate code from all classes that implement
their own observer loops.
2024-03-24 23:03:48 +01:00