mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 09:32:40 +00:00
vo: make libmpv last in the auto-probing order for cocoa-cb only
this partially reverts commit 7b5a258
. back then the only properly
working vo on macOS was cocoa-cb (libmpv). it would always use the
deprecated opengl cocoa backend or no vo at all. because of that libmpv
was moved to the top of the auto-probing order, so the preferred vo
was used on macOS only.
we now have a working vulkan gpu/gpu-next backend on macOS which should
be the new default vo. though disabling the auto-probing again for
libmpv would probably cause the undesired behaviour on macOS that
cocoa-cb would never be auto selected again. especially if not build
with vulkan support or without vulkan driver on macOS, this would lead
to no video output at all. so instead of completely reverting the
mentioned commit, we instead move libmpv to the bottom of the
auto-probing order but only auto select it when mpv was built with
cocoa-cb support. this restores the previous behaviour on all other
platforms besides macOS, but also lets us auto select cocoa-cb if
supported.
This commit is contained in:
parent
4a563a6390
commit
0e441525cf
@ -31,7 +31,11 @@ API changes
|
||||
===========
|
||||
|
||||
::
|
||||
|
||||
--- mpv 0.38.0 ---
|
||||
2.3 - partially revert the changes from API version 1.27, remove libmpv as the default VO and
|
||||
move it to the bottom of the auto-probing order. this restores the behaviour prior API
|
||||
version 1.27 on all platforms other than macOS, but still auto selects libmpv/cocoa-cb
|
||||
on macOS if it was built with support for cocoa-cb.
|
||||
--- mpv 0.37.0 ---
|
||||
2.2 - add mpv_time_ns()
|
||||
--- mpv 0.36.0 ---
|
||||
|
@ -248,7 +248,7 @@ extern "C" {
|
||||
* relational operators (<, >, <=, >=).
|
||||
*/
|
||||
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
|
||||
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 2)
|
||||
#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(2, 3)
|
||||
|
||||
/**
|
||||
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before
|
||||
|
@ -69,7 +69,6 @@ extern const struct vo_driver video_out_kitty;
|
||||
|
||||
static const struct vo_driver *const video_out_drivers[] =
|
||||
{
|
||||
&video_out_libmpv,
|
||||
#if HAVE_ANDROID
|
||||
&video_out_mediacodec_embed,
|
||||
#endif
|
||||
@ -99,6 +98,7 @@ static const struct vo_driver *const video_out_drivers[] =
|
||||
#if HAVE_X11
|
||||
&video_out_x11,
|
||||
#endif
|
||||
&video_out_libmpv,
|
||||
&video_out_null,
|
||||
// should not be auto-selected
|
||||
&video_out_image,
|
||||
|
@ -705,6 +705,11 @@ static void uninit(struct vo *vo)
|
||||
|
||||
static int preinit(struct vo *vo)
|
||||
{
|
||||
#if !HAVE_MACOS_COCOA_CB
|
||||
if (vo->probing)
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
struct vo_priv *p = vo->priv;
|
||||
|
||||
struct mpv_render_context *ctx =
|
||||
|
Loading…
Reference in New Issue
Block a user