Sometimes the VMs that these run in spin forever so it's good to have
some timeout. 30 minutes is way longer than what we need. When these are
successful, they complete in under 10 minutes (especially freebsd which
is very fast). If we're at the 15 minute mark, the VM is stuck spinning
forever so just abort.
This is mainly for better, more descriptive logging when something goes
wrong and fails. Common operations that manipulate properties and
commands go through shared functions that do better detailed logging.
Also it means we don't need check_api_error around anymore so get rid of
that. libmpv_lifetime is left untouched since that one is a bit special
and works a little differently.
c958990833 was supposed to implement this,
but it got forgotten and the placeholder code which just
created/destroyed every buffer for every frame was left. Oops. Finally
fix this a couple of years later.
Fixes#16863.
BT.1886 is mostly limited to TV production which is almost exclusively
limited range. sRGB for full range is better guess, if no better
information is available.
set_image_description replaces the old image description, so we don't
need to call unset_image_description unconditionally. Only call it if we
couldn't set an image description.
This helps with the lack of synchronization between VO pageflips and
wayland protocol events mentioned in the previous commit.
Calling `pl_color_space_infer` on `wl->target_param` can cause the
`pl_color_space_equal` check to fail on every frame if any values were
changed by `pl_color_space_infer`. This will cause us to believe
target_params get changed on every frame, and we'll end up in a state
where wayland events happen in the following order indefinitely:
-> wp_color_management_surface_v1#45.set_image_description(...)
-> wp_color_management_surface_v1#45.unset_image_description()
-> wl_surface#9.commit()
-> wp_color_management_surface_v1#45.set_image_description(...)
-> wp_color_management_surface_v1#45.unset_image_description()
-> wl_surface#9.commit()
Since image_description is double buffered, we always queue an unset to
the pending state before each commit. As a result, no commit ever
carries a valid image_description.
Taking the sample file in the issue as an example, we end up in this
state because the file has `min_luma == 0` but `pl_color_space_infer`
normalizes this value to `min_luma == 0.000001`. This makes it so that
we store a different `target_param` to `vo_wayland_state` on every frame
than the one received from `vo_get_target_params`. So we end up setting
image description on every frame in this case.
The key problem here is that `set_color_management` isn't blocking the
thread until `set_image_description is called`, so vo->driver->flip_page
is called before this finishes.
This commit fixes the problem by doing any operations that could change
`wl->target_param` first before doing any equality checks to skip
changing to image description pointlessly.
This fixes the problem in the issue that image_description is never set
on such files. The synchronization problem is fixed in a later commit,
because otherwise setting image_description on every frame could have
adverse frame time effects
Fixes: https://github.com/mpv-player/mpv/issues/16825
Some protocols may not exist, add them so the mapping to url handler
works correctly. Note that protocols are not removed, only the handler
is. They will remain unassociated, after unregister.
Fixes: #16832
It's enough to not wait for the flip and start with next frame and in
the same time minimized latency which helps display-sync modes, that are
not aware about swapchain depth.
Allows to not wait for flip. Instead of forcing depth for display-sync
modes we will reduce default value instead.
This reverts commit d7495e4ea6.
Fixes: #16823
There is some race condition where MPV_EVENT_PROPERTY_CHANGE sometimes
gives us sub-text with an empty string which is unwanted and causes the
test to fail. Avoid this by starting the file at 1 second and paused
which hopefully avoids this. Do some additional checking on the actual
MPV_EVENT_PROPERTY_CHANGE as well to make sure we don't try to read
something we shouldn't.
Those are controlled by the `--swapchain-depth` option and is already
set to 3 by default. There is no need to add hardcoded hidden frame of
"slack". Users can adjust depth by changing the config.
All the math and interpolation assumes immediate presentation of the
frame. VO is driven by VSYNC and it is expected that current frame that
we render will be displayed on current present call, without delay.
Add script bindings to edit mpv.conf and input.conf, and add them to the
menu. These are useful as shortcuts, but the main motivation is that new
users often ask why they can't find mpv.conf and input.conf, so this
creates them if they don't exist.
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.
This implements a ASS context menu to be used on platforms other than
Windows.
The select script message will allow selecting an item with a single
click when releasing a mouse button, like in native context menus. This
is mainly useful to cycle pause with one click.
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
1-index angles to be consistent with DVD angles in mpv and with the
1-indexing in other applications like libbluray's example programs.
The three existing calls to bd_get_title_info all only access the
duration, the playlist, and the number of angles, which do not depend on
the passed angle, so they can keep being called with angle 0 for
simplicity.
Documentation taken from before
35e8b6c1e6.
Fixes#5012.