Commit Graph

52118 Commits

Author SHA1 Message Date
der richter d6c621b03b mac/apphub: move opening url into AppHub 2024-04-01 22:13:39 +02:00
der richter 2c7e4f5935 mac/app: use new open url App event to simplify open file event handling
this event has several advantages, it unifies the mpv:// url handling,
the dropping of files on the App icon and opening via finder into one
event, and it also lets us remove the file open workaround.

we had to keep track of opened files via the command line because the
event was also triggered by passed files on the command line, leading
to redundant load events.

the new event doesn't trigger from files passed via the command line
anymore.
2024-04-01 22:13:39 +02:00
der richter fc978eb9f2 mac/log: fallback to system logger if no mp_log is yet available
since cocoa is initialising mpv and does several things before the mpv
core does anything and the mpv_handle was passed to the App, this can be
used to log such things before the mpv logging is available. helpful for
debugging especially bundle related things.

the logger mapping looks a bit unintuitive but error is basically yellow
what our warning is and fatal is red what our error is.
2024-04-01 22:13:39 +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
nanahi a140d2788c wayland_common: set mouse position on pointer enter
At least on some compositors, when the pointer enters a surface,
only a wl_pointer_enter event is generated, but not wl_pointer_motion.
This results in the initial mouse position being lost, which is
especially problematic when input simulation is used.

Fix this by setting the mouse position on pointer enter event.
2024-04-01 01:17:22 +00:00
Guido Cella 0a083eadb5 mpv.desktop: translate to Italian 2024-04-01 01:44:44 +02:00
Misaki Kasumi 7f3ca6c524 ao_pipewire: fix buffer size calculation
`ao->sstride` is alrady initialized to the same value in `init()`
but in addition it can also handle planar formats.
2024-03-31 12:57:52 +02:00
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