summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-13 00:49:13 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-13 17:45:29 -0800
commit7b5a2588bd33d5cf532a1c83d79dba20a3f26bc5 (patch)
treea9f68b827218f3a4404cad2a2eaa4c0c15505eed
parent706bb1d0c756be95e8646c6e433d5d24f7c75dca (diff)
downloadmpv-7b5a2588bd33d5cf532a1c83d79dba20a3f26bc5.tar.bz2
mpv-7b5a2588bd33d5cf532a1c83d79dba20a3f26bc5.tar.xz
vo: make opengl-cb first in the autoprobing order
This should be helpful for the new OSX Cocoa backend, which uses opengl-cb internally. Since it comes with a behavior change that could possibly interfere with libmpv/opengl_cb users, we mark it as explicit API change.
-rw-r--r--DOCS/client-api-changes.rst6
-rw-r--r--libmpv/client.h2
-rw-r--r--video/out/vo.c6
-rw-r--r--video/out/vo_opengl_cb.c3
4 files changed, 12 insertions, 5 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 1ff828339a..df2b42aa70 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -32,6 +32,12 @@ API changes
::
+ --- mpv 0.29.0 ---
+ 1.27 - make opengl-cb the default VO. This causes a subtle behavior change
+ if the API user called mpv_opengl_cb_init_gl(), but does not set
+ the "vo" option. Before, it would still have used another VO (like
+ on the CLI, e.g. vo=gpu). Now it'll behave as if vo=opengl-cb was
+ used.
--- mpv 0.28.0 ---
1.26 - remove glMPGetNativeDisplay("drm") support
- add mpv_opengl_cb_window_pos and mpv_opengl_cb_drm_params and
diff --git a/libmpv/client.h b/libmpv/client.h
index f3e4d4c8c8..f47c670558 100644
--- a/libmpv/client.h
+++ b/libmpv/client.h
@@ -209,7 +209,7 @@ extern "C" {
* relational operators (<, >, <=, >=).
*/
#define MPV_MAKE_VERSION(major, minor) (((major) << 16) | (minor) | 0UL)
-#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 26)
+#define MPV_CLIENT_API_VERSION MPV_MAKE_VERSION(1, 27)
/**
* The API user is allowed to "#define MPV_ENABLE_DEPRECATED 0" before
diff --git a/video/out/vo.c b/video/out/vo.c
index c999138eee..b2aba3af7a 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -66,6 +66,9 @@ extern const struct vo_driver video_out_tct;
const struct vo_driver *const video_out_drivers[] =
{
+#if HAVE_GL
+ &video_out_opengl_cb,
+#endif
#if HAVE_ANDROID
&video_out_mediacodec_embed,
#endif
@@ -104,9 +107,6 @@ const struct vo_driver *const video_out_drivers[] =
#if HAVE_ENCODING
&video_out_lavc,
#endif
-#if HAVE_GL
- &video_out_opengl_cb,
-#endif
NULL
};
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c
index 4be36118a0..40dcb035ca 100644
--- a/video/out/vo_opengl_cb.c
+++ b/video/out/vo_opengl_cb.c
@@ -554,7 +554,8 @@ static int preinit(struct vo *vo)
struct vo_priv *p = vo->priv;
p->ctx = vo->extra.opengl_cb_context;
if (!p->ctx) {
- MP_FATAL(vo, "No context set.\n");
+ if (!vo->probing)
+ MP_FATAL(vo, "No context set.\n");
return -1;
}