the old check stopped at the first occurrence of a vulkan loader path.
though it's possible different vulkan loaders are installed in different
paths, leading to not found vulkan loaders.
to prevent this, also check if the needed vulkan loader is actually
installed to that path.
specific case is when installing MoltenVK and KosmicKrisp at the same
time. the former is installed in the homebrew prefix under etc/ the
latter under share/. the latter wasn't found previous, since the former
was found first.
homebrew slimmed down their ffmpeg formula and stripping it off some
essential functionality.
https://github.com/Homebrew/homebrew-core/pull/261303
use ffmpeg-full instead. this is keg only formula and not automatically
symlinked system wide. make sure ffmpeg is not installed in parallel and
install ffmpeg-full system wide.
the default value of isOpaque is false and it was always assumed that
underlaying content needs to be rendered and blended in some way.
make it dependent on the layer's isOpaque property, which theoretically
could increase render performance.
this adds support for possible transparent rendering by setting the
window and layer background to transparent.
NOTE: atm only possible with libplacebo master.
add libbluray, libarchive, libcaca, libcdio-paranoia, libdvdnav,
rubberband and zimg to macOS builds for consistency with other platforms
and detection tests.
adding IDs to the fields makes them pre-fillable with a URL query.
adds the possibility to procedural generate links to pre-fill specific
data. for example, mpv/library version or platform version data.
possible application, menu entries or CLI output to submit bug reports.
duration and position properties were observed as double which lead to a
lot of updates per second (high granularity). it is recommended to not
update the position of the touchbar too frequently, why we had a manual
1 second rate limit.
instead of manually rate limiting the property, just observe it as int64
which only updates every second. it also causes a bit less pressure for
our core.
duration and position properties were observed as double which lead to
a lot of updates per second (high granularity). it is recommended to not
update the position of the remote command center to frequently, why we
had a manual 1 second rate limit.
instead of manually rate limiting the property, just observe it as int64
which only updates every second. it also causes a bit less pressure for
our core.
generated with the Icon Composer project:
actool ./icon.icon \
--compile ./ \
--app-icon icon \
--enable-on-demand-resources NO \
--development-region en \
--target-device mac \
--platform macosx \
--include-all-app-icons \
--minimum-deployment-target 10.15 \
--output-partial-info-plist /dev/null \
--standalone-icon-behavior all
actool will generate an Assets.car file which is compatible with all the
new Theme variants of macOS 26 (default, dark, monochrome, tinted, etc).
it also generates an old icns file as a fallback, only default style.
since the new Assets.car file can't be used from cocoa directly, without
using private APIs, we still use the icns file when used from CLI.
this also means that from CLI only the default icon is used and the
macOS theming doesn't have any effect.
the macOS theming mechanism only works with the bundle and a Assets.car
file. all icons are generated on the fly depending on the Theme. this
generation has no public API and the mechanism would need to be
replicated by hand. to replicate this behaviour at least three different
icns would need to be generated, tinting needs to be implemented,
several system events need to be subscribed, and this wouldn't guarantee
the same look as the system mechanism. also none of the tools make it
possible to generate macOS 26 compatible icns file, besides for the
default file, since it at least is missing the necessary padding.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know when the layer is opaque and direct-to-display is
possible.
log opaque state.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which EDR data is used/mapped to.
log EDR data changes to actually see which EDR data was chosen.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which colorspace is used/mapped to.
log colorspace changes to actually see which colorspace was chosen.
since we have a mapping layer between vulkan and metal (MoltenVK) we
don't actually know which pixel format is used/mapped to.
log pixel format changes to actually see which format was chosen. only
those 9 formats are valid for a CAMetalLayer.
https://developer.apple.com/documentation/quartzcore/cametallayer/pixelformat
in a13a674363 we set the default category
for the bundle to games, to get certain benefits like better rendering
timing, better bluetooth latency, better threading, etc (bundle only).
though this also prevents low power modes and wrongly categories the app
for spotlight search etc.
set the default category to video and add an option to set the category
to games if one wishes to.
on multi monitor setups the position of the window was wrongly computed
when the position was forced, eg the calculated rectangle was screen
relative but the function expected absolute coordinates.
this is a regression from 50042f5ee0 and
#15500, where support for --force-window-position was introduced. this
worked in simple one monitor setups and in some cases on multi monitor
setups by sheer coincidence.
calculate the absolute position of the window by taking the screen into
account when needed.
Fixes#16929
only meant for testing the oldest macOS target we support, currently
10.15, to catch possible usages of features that are not supported and
not properly guarded.
since dependencies are not build for that taget it will lead to a
partially broken build.
since macOS 13 is now unsupported and homebrew also dropped support for
it too, the macOS 13 bottle downloads were removed. leading to either
a broken or very long dependency installation (build from source).
to fix, pin the last known working homebrew version for macOS 13 where
the bottle download links weren't removed yet. for this to work we need
to disable (auto) update of homebrew.
it doesn't make sense to build the swift parts without cocoa because
the swift bridge would be missing and it's impossible to interact
with the swift parts from obj-c, swift depends on cocoa/appkit/etc, and
the cocoa main function/main loop is missing making anything
cocoa/appkit/GUI crash on use.
like this it is possible to build mpv on macOS without cocoa, it will
fallback to the unix main function and mpv can run in 'headless' mode,
eg you can use it from CLI, it won't spawn any App icon/menu/etc, and
you can use everything that isn't related to cocoa/appkit/GUI like audio
playback. anything other will make mpv segfault, for example sdl2 and
its vo, since it tries to spawn a window.
path-mac.c was not properly set as path_source for macOS. it didn't lead
to any errors because it was added to the normal source files. though
in the case of tests and for certain setups the mac path symbols were
not found.
to fix that properly add path-mac.c to path_source (additional to
path_darwin.c), remove it from the normal source files and don't
overwrite it later with the posix or darwin path.
this was overlooked in 9db8182 and #11374
UniformTypeIdentifiers is only available since macOS 11.
added in 6b0e4f7 and #15859.
guard the allowedContentTypes UTType property of the NSOpenPanel and
add a dummy struct UTType and dummy allowedContentTypes property on
macOS versions that don't have those available.
currently we use the withLock function with NSCondition and NSLock,
which are not available on swift versions lower than 5.7. we only added
compatibility fallbacks for NSCondition though. introduced in 1364c80
and #14334.
instead of only adding the fallback to a specific class add it to the
whole protocol all the locking classes use, similar to the actual
implementation.
with commit 8d20b72 and PR #15442 we switched to the recommended swiftc
compiler for building our swift code. this lead to some
incompatibilities with swift versions prior to 5.8, where a new linker
was introduced.
work around that problem by using the old swift frontend build for older
swift versions. this can be removed when we remove the support for those
old versions.
Fixes#15591
when the window is snapped to a position by dragging the title bar the
corresponding left mouse up event is prevented by the system snap event,
which leads to the window moving state not being reset and no mouse
position changes being reported. which makes UI elements unresponsive.
explicitly subscribe to left mouse up events for the whole app instead
of the mouse events from the title bar and reset the moving state.
Fixes#16732
since commit 5010c24 the initial window always shows a black frame
instead of the actual first rendered frame of the video, since the
visibility of the window for the initial render is always false. in the
worst case the first shown frame wasn't the intended first rendered
frame.
to prevent this, initial always allow rendering till the window is shown
or minimised. afterwards it will respect the occlusion state as before.
in the case of slow render pipeline initialisation and no frame being
ready to be rendered, it will still show a black frame.
modal dialogs steal the key/mouse input and possibly eat corresponding
key up events when opening via key binding. this leads to key sequence
ends to not reported and key bindings not being triggered if no key up
event was triggered after closing the modal.
they were meant to be immutable. imported in swift as mutable pointer,
which leads to errors with the strict concurrency in swift 6.
make the pointers const.
they were never meant to be mutable and are imported as mutable vars
in swift. that causes errors with the strict concurrency in swift 6.
make them const/lets and immutable.
fixes problems with upcoming features DisableOutwardActorInference,
GlobalConcurrency and InferSendableFromCaptures for swift 6 strict
concurrency. enabled with -enable-upcoming-feature flag.
since we load covers/images directly in a our own thread and the quick
look thumbnailing also works asynchronously on its own thread, we need
sync/coordinate both threads. otherwise it would be possible that a
cover from a different file could overwrite the cover of the current
file.
to prevent this every cover generation has a unique timestamp and only
covers for the last cover timestamp will ever be shown.
we are also not interested in icon type thumbnails, since those are just
generic file type icons.
quick look thumbnails can only be generated if quick look can read those
files. files unknown to macOS don't work out of the box and you need to
install a quick look extension for this, "QuickLook Video" for mkv.
similar to how our config.h is created the feature flags added to the
swift build should be generated from our features array, instead of
manually adding those when needed.
this prevents errors when forgetting to add any needed flags or remove
obsolete ones.
the equivalent options have been deprecated since mpv 0.35 in ac39661
and 2207236.
also bumping the MPV_CLIENT_API_VERSION to 2.5, since 2.4 was forgotten
in 6f619d5.
the mpv_global struct is a public struct defined in common/global.h. in
the case that this header is included directly or indirectly into our
swift bridging header, code that uses that struct as an OpaquePointer
will fail to build, because swift would now be aware of its actual type.
preemptively include the header and properly define the type to prevent
such errors in the future.
i also checked all other usages of OpaquePointers and this is the only
case where this is relevant.
See e1d30c4 and 4ff9f50 as reference
this effectively disables the workaround that picks the color/dither
depth based on the source and instead picks it based on the output
surface/pixel format.
macOS apparently always operates at 10bit internally regardless of the
display's bit depth. this changed at some point in the more recent macOS
versions, where previously macOS operated at a frame buffer depth
corresponding to the display. either 30-Bit Color (ARGB2101010) for
10bit or 24-Bit Color (ARGB8888) for 8bit.
Fixes#13767
App Bundles operate in their own shell environment that is different
from the one in the terminal. the default PATH variable for all Bundles
is /usr/bin:/bin:/usr/sbin:/sbin. because of that mpv can not find
binaries installed by package manager that might be used in scripts for
example.
add an option to prepend paths to the Bundle PATH. we prepend to make
the order fully configurable, opposed to appending where the default
Bundle binaries would always take precedence.
we keep track of the current vo struct to flag for events that are
initiated async by various thread from different system notifications.
the problem here is the usage of that vo struct after uninit.
make accessing of that vo struct atomic and clear it on uninit, so it
can't be used afterwards by concurrent threads from system
notifications or events.
Fixes#15088
since the bundle operates in a different shell environment than the one
from the terminal, it only has a few default paths set.
add the homebrew ARM default install paths to the PATH environment
variable, so the bundle can also find the needed binaries like yt-dl.
since commit 15c48f3 we were force to start drawing on the main queue
again. this has several unintended side effects due to the nature of the
main queue. in this case fullscreen event and shutdown event are
executed out of order and fullscreening is done after shutdown, leading
to accessing options that are already de-initialised.
just nil the window on shutdown and make it impossible to fullscreen
after shutdown.
Fixes#14810
this is already done in the updateSize method of the window.
also fixes an issue where the size wasn't properly changed, even though
the new and old size were different. the unfsContentFrame should have
been checked instead of the pixel representation of the same frame.