summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* image_writer: default to lossless AVIF screenshotsKacper Michajłow2023-12-043-5/+5
| | | | | Also change the example to crf=23. crf=32 is pretty bad quality, don't give users bad usage ideas.
* image_writer: add missing mp_image_params in convert_imageKacper Michajłow2023-12-041-0/+2
| | | | | | | Fixes chroma location for screenshots. Also set the crop to full frame to not trip mp_image_params_equal check if not necessary.
* image_writer: print screenshot format in verbose logKacper Michajłow2023-12-041-2/+2
| | | | It is useful information, not only for debugging.
* image_writer: use common format selection for AVIF screenshotsKacper Michajłow2023-12-043-5/+5
| | | | --screenshot-avif-pixfmt no longer defaults to yuv420p.
* Revert "github/workflows: install xxhash on msys2"Kacper Michajłow2023-12-041-1/+0
| | | | This reverts commit 67aa5684379d42ad1e9b8cc66a04d63394e63994.
* Revert "ci/mingw: use vulkan-loader v1.3.266"Kacper Michajłow2023-12-041-2/+2
| | | | This reverts commit 9d8dfc7b49380b8c03546ed4fad2385c42438a50.
* meson: use subprocess-dummy.c fallback when fork func doesn't existkarelrooted2023-12-031-1/+5
|
* ao_wasapi: clean GUID definitionsKacper Michajłow2023-12-031-28/+41
| | | | | Add ifndefs to define only when needed and remove some already defined ones in mingw.
* ao_wasapi: fix MP3 GUIDKacper Michajłow2023-12-031-1/+1
| | | | | | | While CEA-861 defines MP2 as 0x5 and MP3 as 0x4, the GUIDs defined in ksmedia.h are in reverse order. See: https://github.com/MicrosoftDocs/windows-driver-docs/pull/3742
* input: fix double click handlingnanahi2023-12-031-0/+1
| | | | | | | | | | On practically all platforms and GUI toolkits, a triggered double click event clears the mouse input buffer so that the next click won't trigger another double click event. mpv doesn't do this, so a third click results in another double click event. Fix this by resetting the double click timer after a double click event is triggered which achieves the same effect.
* mac: report modifier keys on precise scrollingder richter2023-12-022-3/+24
| | | | | | modifier keys weren't reported when using the trackpad to scroll. Fixes #11195
* mac: fix initial window size and position when already maximizedder richter2023-12-021-1/+2
| | | | | | | | | | | | in the case the window was already set to a maximized size via geometry or related options (100%x100%) the maximize function would try to maximize the window again. this reset the position and slightly increased the size further. to prevent this only maximize on init if we really want to maximize. in the reverse case make a noop call by passing the current zoom state. Fixes #11193
* github/workflows: install xxhash on msys2Dudemanguy2023-11-301-0/+1
| | | | | | | msys added xxhash has a makedep for libplacebo* which means we need to install it in the CI as well if we want to build against it. *: https://github.com/msys2/MINGW-packages/commit/07f4c34d22fda0284a1857ac5006d784fe058075
* playloop: use a 16:9 ratio with --force-windowGuido Cella2023-11-301-1/+5
| | | | | | | | | ca2b05c0fb changed the window size with --force-window and no video tracks to be closer to 16:9, but I don't see why we shouldn't have an actual 16:9 ratio. The advantage is that subtitles with fullscreen and no video tracks will have the same size and position (depending on the values of --sub-scale-with-window and --sub-use-margins) as with 16:9 videos, because there will be no (invisible) black bars.
* ci: remove dvbin from freebsd runsfan52023-11-291-1/+2
| | | | | | | | | | | | As it is now, the FreeBSD CI is failing because meson can't find the dvb headers. FreeBSD puts the relevant headers into /usr/local which is bothersome and in fact required a workaround to be added to the Wayland detection already (3bdf702b1de8b0d0e0fb700b234b0fc69e04a630) but this should be addressed by us adding the path to CFLAGS already. With a more minimal example the detection works fine in my FreeBSD VM. I'm at my wits end debugging this so just disable it for now.
* meson: enable dvbin by default againsfan52023-11-291-1/+1
| | | | | | | This was disabled by default in 99cef59fc9a (from 2017) due to build issues with old kernel headers. Whatever was considered old at that time will be ancient now and with the last commit there should be no isses auto-detecting it.
* meson: fix check for dvbin availabilitysfan52023-11-291-2/+3
|
* ci/tumbleweed: don't enable shadercDudemanguy2023-11-281-1/+0
| | | | | It only ever had any real affect on windows so with the previous build change, enabling it cannot work.
* build: only directly link shaderc and spirv-cross on windowsDudemanguy2023-11-281-2/+2
| | | | | | | See 1b035402a688a5d116a9014e8930d7863481eeed. This is only relevant if you are using d3d11 on --vo=gpu which is windows-only. For all other platforms, vulkan uses libplacebo which uses shaderc. mpv itself doesn't need it in those cases.
* vo_gpu: fix ra_fbo stack-use-after-scopeDudemanguy2023-11-281-9/+6
| | | | | | | | 281b1d89994e3e3a9950d32fc451dff990c2320d introduced a stack use after scope because dest_fbo can be reassigned a new pointer and then be used by pass_draw_to_screen outside of that scope where the pointer is no longer valid. Fix this by rearranging the variables so the assignment is done in the same scope as the pass_draw_to_screen call instead.
* common/av_log: use bstr for log callbackKacper Michajłow2023-11-281-10/+14
| | | | | | - don't use 4KiB stack array - keep one bstr allocation for lifetime of the log - avoid dummy strlen
* vo_kitty: init all fields of struct sigaction before using itKacper Michajłow2023-11-281-2/+3
|
* ra_pl: add missing initializerKacper Michajłow2023-11-281-1/+1
|
* ao_sndio: remove duplicated conditionKacper Michajłow2023-11-281-1/+1
|
* vo: don't pass VADRMPRIMESurfaceDescriptor by valueKacper Michajłow2023-11-282-9/+9
|
* wayland: simplify reading dataKacper Michajłow2023-11-281-15/+10
| | | | | | | - read directly to bstr - use talloc for OOM checks - don't parent temporary allocation - don't check for NULL buffer after already writting to it
* mp_image: remove local params copy from mp_image_setfmtKacper Michajłow2023-11-281-3/+1
| | | | No longer needed after 079f67268f6f5a2ecfd12277b246b1937493c092.
* ta: inline OOM checksKacper Michajłow2023-11-282-24/+20
| | | | It makes no sense to force function call for simple check.
* player/command: don't pass mp_image_params by valueKacper Michajłow2023-11-281-36/+36
|
* vo_gpu: don't pass gl_user_shader_hook by valueKacper Michajłow2023-11-283-12/+10
|
* vo_gpu: don't pass mp_pass_perf by valueKacper Michajłow2023-11-281-8/+14
|
* vo_gpu: don't pass ra_fbo by valueKacper Michajłow2023-11-2810-39/+39
| | | | Make it easier on compiler, no need to alloca and copy things around.
* Reapply "osdep/meson: add libplacebo include dir to swift compile"Dudemanguy2023-11-271-1/+3
| | | | | | | It's not actually related to libplacebo wrap stuff and the swift compile command needs this to get the right libplacebo include path. This reverts commit b9d392ecd9543aecdfd6e6a06aa2f9585950ac27.
* Revert "osdep/meson: add libplacebo include dir to swift compile"Dudemanguy2023-11-271-3/+1
| | | | | | | This is not needed since we removed the libplacebo wrap not too long after this commit. This reverts commit 4de76ce87a545cd86ef493129b4cfeafe10e8e98.
* ci: remove leftover libplacebo subproject optionsDudemanguy2023-11-273-3/+0
| | | | | 486bb93dfa90bf948cff8d77ad685f54d0928531 removed the wrap which made these specific options obsolete.
* meson: move mpv.com target after mpv.exe to avoid meson version warningKacper Michajłow2023-11-271-7/+7
| | | | | meson is able to detect blocks of code that are guarded with version checks, but we did that in reverse order and mpv.exe was complaining.
* ci/msys2: remove libplacebo.wrapnanahi2023-11-271-12/+0
| | | | Not needed anymore as package is updated.
* ci: update mpv.com path againDudemanguy2023-11-272-2/+1
| | | | | Hopefully for the last time. It will now be in ./build as one would expect.
* meson: generate .com in the same place as the .exe if possibleDudemanguy2023-11-272-3/+11
| | | | | | | | | Meson was pretty strict about target ids and generating the mpv.com in the same directory as mpv.exe wasn't possible. So as a workaround we tucked it away in a subdirectory, but that's not really intuitive at all. Well as of meson 1.3.0, this is now possible so leverage it since it makes way more sense. We still keep the old workaround for anyone using older meson versions.
* DOCS/options: clarify --spirv-compilersfan52023-11-271-3/+3
|
* build: restrict git describe to top level source directoryJan Palus2023-11-271-1/+4
| | | | | fix version determination when building mpv from release tarball extracted within another git repository
* options: add --osd-bar-border-sizeGuido Cella2023-11-275-6/+11
| | | | | Closes #1484. The default size is smaller than the previous --osd-border-size default value of 3 with the default --osd-bar-h.
* DOCS/mpv: quotes in mpv.conf don't escape backslashGuido Cella2023-11-271-2/+3
| | | | | I don't know why I thought they did in 7798881360, but single quotes disable escape sequences only in input.conf commands.
* options: add secondary-sub-delayRipose2023-11-267-12/+33
| | | | | | | | | | | | | Add --secondary-sub-delay option and decouple --sub-delay from secondary subtitles. This produces desirable behavior in most cases as secondary and primary subtitles tracks tend to be timed independently of one another. This feature is implemented by turning the sub_delay field in mp_subtitle_opts into an array of 2 floats. From here the track index is either passed around or derived when sub_delay is needed. There are some cases in dec_sub.c where it is possible for dec_sub.order (equivalent to track index) to be -1. In these cases, sub_delay is inferred as 0.
* vaapi: bump vaapi info callback to verbose messagesKacper Michajłow2023-11-261-1/+1
| | | | | | | | | | | | | | The info provided for libva might be useful. Specifically on Windows it seems to not use the error callback for what should be logged as error. [ 0.080][v][vaapi] libva: VA-API version 1.20.0 [ 0.080][v][vaapi] libva: Trying to open <path>/vaon12_drv_video.dll [ 0.080][v][vaapi] libva: va_openDriver() returns -1 [ 0.080][e][vaapi] Failed to initialize VAAPI: unknown libva error As we can see only the "unknown" error is printed to the error callback and important information is printed on the info callback. Print it to verbose log to make it easier to find.
* vaapi: add missing NULL checkKacper Michajłow2023-11-261-1/+2
| | | | ctx->destroy_native_ctx is guarded, but this early exit was not.
* DOCS/options: remove the mention of cocoa and its removed backendder richter2023-11-251-8/+6
| | | | | | | | the cocoa backend was removed and all functionality is either available on all macOS backends or explicitly only with cocoa-cb. the manual should properly reflect that change. also remove the last mention of the old cocoa backend.
* mac: fix a race condition when updating the window titleder richter2023-11-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | the title is updated on the main thread (mandatory with cocoa) asynchronously, because otherwise it would either deadlock when done synchronously, lead to undefined behaviour or just crashes. the problem here is that the c string was only copied to an NSString within that asynchronous call, which potentially would access the pointer when it is accessed, modified or freed by another thread. it is only safe to access this pointer as long as the control callback wasn't returned yet. to fix this we move the copying and creation of the String from the c string pointer outside of the asynchronous call where the conversion of an untyped pointer to a typed pointer is done too. since the resulting String is a copy it's safe to be used in the asynchronous call. also reverting ee6ad40, since the problem was most likely an SDK problem or the very same problem as mentioned here. i retested the crash case again und can't reproduce it anymore. using a swift String again instead of an NSSstring. Fixes #12935
* mac: fix libmpv usage without embeddingder richter2023-11-254-20/+9
| | | | | | | | | | | NSApp is only an Application when initialised from mpv itself. when used via libmpv an Application is never initialised and mpv would always immediately exit. make the retrieval of the vo and mac options static so they can be retrieved in all cases. Fixes #12518
* mac: cleanup some unused and unneeded codeder richter2023-11-252-8/+1
|
* osdep/io: add PRINTF_ATTRIBUTE for printf overridesKacper Michajłow2023-11-251-2/+4
|
* meson: add missing _GNU_SOURCE in checkKacper Michajłow2023-11-251-0/+1
|
* meson: adjust win32 definesKacper Michajłow2023-11-255-3/+12
| | | | | | | | - Don't define _GNU_SOURCE on Windows, no need - Define WIN32_LEAN_AND_MEAN to strip some unneded headers from windows.h - Define NOMINMAX and _USE_MATH_DEFINES as they are common for Windows headers
* meson: don't define __USE_MINGW_ANSI_STDIOKacper Michajłow2023-11-251-1/+1
| | | | | | | It is defined automatically when needed, which is almost never we don't support Windows XP. See: https://github.com/mingw-w64/mingw-w64/commit/bfd33f6c0ec5e652cc9911857dd1492ece8d8383
* sdl_gamepad: add version check for SDL_HINT_JOYSTICK_THREADnanahi2023-11-241-0/+2
| | | | Requires SDL version 2.0.14.
* ci/build-macos: enable Werror to catch issues quickerKacper Michajłow2023-11-241-0/+2
|
* osdep/macosx: add default switch cases to suppress WswitchKacper Michajłow2023-11-242-0/+4
|
* ao_coreaudio_chmap: suppress vla warningKacper Michajłow2023-11-241-2/+2
|
* various: replace some OOM handlingsfan52023-11-244-9/+6
| | | | | | We prefer to fail fast rather than degrade in unpredictable ways. The example in sub/ is particularly egregious because the code just skips the work it's meant to do when an allocation fails.
* ao/coreaudio_exclusive: fix segfault when changing formatsleetoburrito2023-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #12747 missed updating a variable declaration in `ca_change_physical_format_sync`, which ultimately leads to the thread crashing. The problem reproduces consistently on AS Macs (I don't have an Intel Mac to test on anymore), and produces stack traces like the following: ``` Thread 3 Crashed:: mpv 0 libsystem_kernel.dylib 0x18cebd11c __pthread_kill + 8 1 libsystem_pthread.dylib 0x18cef4cc0 pthread_kill + 288 2 libsystem_c.dylib 0x18ce04ad4 __abort + 136 3 libsystem_c.dylib 0x18cdf56c4 __stack_chk_fail + 96 4 mpv 0x1026b66d0 ca_change_physical_format_sync + 420 5 mpv 0x1026b3b70 init + 1052 6 mpv 0x1025c5afc ao_init + 332 7 mpv 0x1025c5bec ao_init + 572 8 mpv 0x1025c5830 ao_init_best + 1228 9 mpv 0x102622fac fill_audio_out_buffers + 1820 10 mpv 0x1026450d0 run_playloop + 132 11 mpv 0x10263f958 play_current_file + 5116 12 mpv 0x10263e4e8 mp_play_files + 452 13 mpv 0x102641308 mpv_main + 128 14 mpv 0x10269f520 playback_thread + 40 15 libsystem_pthread.dylib 0x18cef5034 _pthread_start + 136 16 libsystem_pthread.dylib 0x18ceefe3c thread_start + 8 ``` Note that non-exclusive output seems to be unaffected. To reproduce this problem (and/or test this fix), pass `--audio-exclusive=yes` to mpv.
* meson: also expose present_sync for VT-only after a96d04f19d73Jan Beich2023-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | $ meson setup --auto-features=disabled -Ddrm=enabled -Degl=enabled -Dgbm=enabled -Degl-drm=enabled /tmp/mpv_build $ meson compile -C /tmp/mpv_build [...] ld: error: undefined symbol: mp_present_initialize >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(vo_drm_init) ld: error: undefined symbol: present_sync_update_values >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb) ld: error: undefined symbol: present_sync_swap >>> referenced by drm_common.c >>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb) ld: error: undefined symbol: present_sync_get_info >>> referenced by vo_drm.c >>> libmpv.so.2.2.0.p/video_out_vo_drm.c.o:(get_vsync)
* player: remove shared-script-properties propertyDudemanguy2023-11-225-98/+2
| | | | | | | | | | | | This property was never encouraged. The manual even stated that "You should avoid using it, unless you absolutely have to." Since we now have user-data which is superior in every single way and replaces this, delete this property. The manual also has threatened people for years with the line "It's a makeshift solution which could go away any time (for example, when a better solution becomes available)." We were nice and deprecated it in 1d00aee8e191c9689a20e67e3d6dfd2af6ad2588 for a while to give script authors some time to update. Let's remove it for good now.
* vo: add params mutexKacper Michajłow2023-11-223-3/+19
| | | | | | | | | | | | This mostly is added to resolve player command synchronization with VO thread discussed in 477a0f83. The current uses does not necessarily need this as they are all managed by playloop. But for future use with other params that will be handy. Those params are mostly to observe current state of VO and does not necessarly need to be locked along with frame drawing, that changes the params once at the end.
* vaapi: add support for vaapi-win32Kacper Michajłow2023-11-224-5/+65
| | | | | | | | | | | Only vaapi-copy variant as nothing can map D3D12 resources currently. And even if we would add resource sharing to D3D11 it would invoke copy at some point, so there is no point really. Maybe in the future when libplacebo get smarter about resource sharing on Windows, but practical advantages are really small. I've tested it with Vulkan <-> D3D11 sharing and GPU <-> GPU copy is still invoked. Better than CPU memcpy, something for the future.
* vaapi: pass module into create()Kacper Michajłow2023-11-221-7/+8
| | | | Useful for logging
* d3d11: expose mp_get_dxgi_adapter and mp_dxgi_validate_adapterKacper Michajłow2023-11-223-41/+45
| | | | To be able to reuse them in other parts of code.
* d3d11: rename d3d11 adapter to DXGI adapterKacper Michajłow2023-11-223-22/+22
| | | | There is nothing d3d11 about those adapters.
* Update VERSIONsfan52023-11-211-1/+1
|
* Release 0.37.0v0.37.0release/0.37sfan52023-11-213-168/+161
|
* vo_gpu_next: reduce number of requested frames from VOKacper Michajłow2023-11-211-2/+2
| | | | | | | | | Up to 2x playback rate is the most we can offer currently. Should work fine for most kernels with radius <= 2. This avoids limitation of hwdecs number of frames in-fl