Commit Graph

52210 Commits

Author SHA1 Message Date
Misaki Kasumi 3086f8fa3e ao_pipewire: fix nframes calculation
`buf` contains a `struct spa_data` for each channel.
Therefore the number of channels does not matter to calculate the frame capacity of one `struct spa_data`.
In practice this shouldn't make a difference as `b->requested` would reduce nframes even more.
2024-03-31 12:57:52 +02:00
nanahi 765a43a0ff ao_alsa: fix snd_config memory leak
During AO init, snd_pcm_open() is called, which calls snd_config_update()
to allocate a global config node and stores it in the snd_config global
variable. This is never freed on uninit.

Fix this by freeing the global config node on uninit.
2024-03-30 10:09:37 +01:00
llyyr cb82ad73f2 video: also reset video-sync state when resetting video state
Fixes #13790
2024-03-30 09:46:48 +01:00
der richter 92cb47338f mac/view: fix cursor visibility when toggling fullscreen
this broke with the recent refactor of the input handling. one of the
edge cases was not considered, where not every mouse down event has a
corresponding mouse up event, eg all double clicks or more only have one
up event after the first down event.

this was handled correctly previously.

Fixes #13777
2024-03-29 14:20:40 +01:00
der richter ba45f2004f mac: cleanup swift bridge header imports and unify them 2024-03-29 14:20:40 +01:00
der richter 7c86074a15 mac/apphub: make DnD behaviour on bundle icon configurable
we just need to add a OptionHelper to the AppHub, options were already
tried to read from the optional OptionHelper.
2024-03-29 14:20:40 +01:00
der richter ed0587692f mac/log: rename log functions and cleanup class 2024-03-29 14:20:40 +01:00
der richter ceaabb7b98 mac: use LogHelper directly instead of mp_log 2024-03-29 14:20:40 +01:00
der richter e7df95b10d mac: rename mpvHandle to mpv 2024-03-29 14:20:40 +01:00
der richter e71e340b77 mac: remove now unnecessary objective-c forwarding 2024-03-29 14:20:40 +01:00
der richter 6debb22a0c mac/apphub: move cocoa-cb into AppHub 2024-03-29 14:20:40 +01:00
der richter 1bc680d32a mac/apphub: move menu bar into AppHub 2024-03-29 14:20:40 +01:00
der richter e2bc1e5f9b mac/app: remove unused Application flag 2024-03-29 14:20:40 +01:00
der richter 23db34dd6d mac/apphub: move mac options into AppHub 2024-03-29 14:20:40 +01:00
der richter 1acca1d3c4 mac/apphub: move app icon into AppHub
split up AppHub header in obj-c and c parts and make it a bidirectional
bridging.
2024-03-29 14:20:40 +01:00
der richter 86aea966d9 mac: cleanup mac headers and include preprocessors 2024-03-29 14:20:40 +01:00
nanahi 6fed2f8e58 win32: fix native key repeat support
win32 does not respect --native-keyrepeat option, and native key
repeat has been broken since 0ab3482f73.

This lets mpv respect the --native-keyrepeat option on win32.
2024-03-29 14:07:37 +01:00
nanahi 3a2a457171 DOCS/options: document key autorepeat defaults 2024-03-29 14:07:37 +01:00
Misaki Kasumi 276bbb8884 ao_coreaudio: handle latency change on hotplug
The device latency may change during hotplugging.
This commit updates p->hw_latency_ns each time
hotplug_cb is called so that it can reflect
updated device latency.
2024-03-29 14:03:24 +01:00
Misaki Kasumi 1ed8607292 ao_avfoundation: initial avfoundation ao support 2024-03-29 13:46:59 +01:00
nanahi 7ab1080749 af_scaletempo2: fix false reporting of frame availability
With certain speed settings, the following can happen at the start of
the playback:

- can_perform_wsola returns false, so no frames are written
- mp_scaletempo2_frames_available returns true when
  p->input_buffer_final_frames is 0 and target_block_index < 0

This results in infinite loop and completely stalls audio filter
processing and playback. Fix this by only checking this condition
after the final frame is set.

Fixes: 8080d00d7f
2024-03-28 16:16:43 +01:00
nanahi f4a7931c53 vo_gpu: support video-target-params 2024-03-27 22:08:56 +01:00
nanahi 3f17b18a33 vo_direct3d: support video-target-params
The backbuffer format is available.
2024-03-27 22:08:56 +01:00
nanahi 76541db2a7 vo_xv: support video-target-params
The target colorspace depends on whether the xv adaptor supports
setting BT.709 colorspace.
2024-03-27 22:08:56 +01:00
sfan5 2af3a6e294 meson: improve option descriptions 2024-03-26 12:59: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
sfan5 7ccb1cbcd4 DOCS: update for new --pulse-latency-hacks defaults
I missed this.
fixes: 8e3737ab63
2024-03-25 22:45:58 +01:00
valadaptive acff22cb3b demux_mkv: support V_FFV1 tag
FFmpeg encodes FFV1 with the V_MS/VFW/FOURCC tag, but GStreamer's
matroskamux uses the V_FFV1 tag, so we need to recognize it.
2024-03-25 15:56:17 +01:00
Kacper Michajłow 12077b7f37 player/command: optimize duplicated property search in command_init
Would be better to search the other way around, because options list is
bigger than property list, but with minimal changes this is good enough.
Both are relatively small tho and the only reason for this micro
optimization is to increase the fuzzing throughput.
2024-03-25 15:56:06 +01:00
Andarwinux bcab45149d ci/mingw: use GAS for vulkan loader
this allows us to securely bundle the vulkan loader and include it in CI artifacts
2024-03-25 15:34:59 +01:00
der richter a46ce9e28c mac/event: only initialise an EventHelper when necessary 2024-03-24 23:03:48 +01:00
der richter b77d5386c3 mac/touchbar: use AppHub directly instead of the singleton 2024-03-24 23:03:48 +01:00
der richter 37b2e59787 mac/remote: use AppHub directly instead of the singleton 2024-03-24 23:03:48 +01:00
der richter 6846338cf2 mac/touchbar: use EventHelper for event handling
also remove remaining old event handling.
2024-03-24 23:03:48 +01:00
der richter f9618ea487 mac/touchbar: move touch bar into AppHub 2024-03-24 23:03:48 +01:00
der richter 3e6c931d90 mac/remote: use EventHelper for event handling 2024-03-24 23:03:48 +01:00
der richter 4107d29c90 mac/touchbar: fix devision by 0 2024-03-24 23:03:48 +01:00
der richter 6d767537d4 mac/remote: fix devision by 0 2024-03-24 23:03:48 +01:00
der richter 5ab3060961 cocoa-cb: use EventHelper for event handling 2024-03-24 23:03:48 +01:00
der richter 2a4bf7ca22 cocoa-cb: use a separate mpv_handle for cocoa-cb to simplify shutdown 2024-03-24 23:03:48 +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
Lynne cda5a787d5 hwdec/vulkan: enable the stable AV1 extension
As no drivers were ever released with the unstable extension,
it's not needed anymore.

Not bumping the required headers version yet.
2024-03-24 13:25:35 -07:00
Andarwinux 77e1cfb85f ci/msys2: fix vulkan package name 2024-03-24 16:55:38 +01:00
sfan5 8e3737ab63 ao_pulse: reenable latency hacks by default
As far as I can tell PulseAudio introduced a bug in 16.0
where if a stream is (un)paused too often the reported latency
will momentarily spike by 3000% or more. Apparently in certain cases
just pausing once and waiting can also cause this.

Save the remaining users of PA the trouble of debugging the various
obscure issues that can arise from this (desync is a harmless example)
by enabling the latency hack code again.

ref: <https://github.com/mpv-player/mpv/issues/12057>
     <https://github.com/mpv-player/mpv/issues/10333>
2024-03-24 09:58:41 +01:00
Shuanglei Tao 7490919a9a player/command: fix udata talloc parent 2024-03-23 02:28:18 +01:00
der richter 9cee44147a mac/libmpv: remove unused functions 2024-03-21 18:33:15 +01:00
der richter 12782aad6c mac: optimise and shorten some code 2024-03-21 18:33:15 +01:00
der richter 9e03ab5e1e mac/option: remove now unused computed option variables 2024-03-21 18:33:15 +01:00