summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-09 17:47:02 +0100
committerwm4 <wm4@nowhere>2014-12-09 17:59:04 +0100
commitfb855b86593ad2a9db71cce3aa652ace93af38b5 (patch)
treeffca8eb74c8cf58dc5e97e0fac2c519b958b7cf7 /wscript_build.py
parentd38bc531cc7ce9c90b74145e2be2e24cb48e501a (diff)
downloadmpv-fb855b86593ad2a9db71cce3aa652ace93af38b5.tar.bz2
mpv-fb855b86593ad2a9db71cce3aa652ace93af38b5.tar.xz
client API: expose OpenGL renderer
This adds API to libmpv that lets host applications use the mpv opengl renderer. This is a more flexible (and possibly more portable) option to foreign window embedding (via --wid). This assumes that methods like context sharing and multithreaded OpenGL rendering are infeasible, and that a way is needed to integrate it with an application that uses a single thread to render everything. Add an example that does this with QtQuick/qml. The example is relatively lazy, but still shows how relatively simple the integration is. The FBO indirection could probably be avoided, but would require more work (and would probably lead to worse QtQuick integration, because it would have to ignore transformations like rotation). Because this makes mpv directly use the host application's OpenGL context, there is no platform specific code involved in mpv, except for hw decoding interop. main.qml is derived from some Qt example. The following things are still missing: - a way to do better video timing - expose GL renderer options, allow changing them at runtime - support for color equalizer controls - support for screenshots
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wscript_build.py b/wscript_build.py
index c53a1acbb2..e1626a1d5a 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -354,6 +354,7 @@ def build(ctx):
( "video/out/vo_lavc.c", "encoding" ),
( "video/out/vo_null.c" ),
( "video/out/vo_opengl.c", "gl" ),
+ ( "video/out/vo_opengl_cb.c", "gl" ),
( "video/out/vo_opengl_old.c", "gl" ),
( "video/out/vo_sdl.c", "sdl2" ),
( "video/out/vo_vaapi.c", "vaapi" ),
@@ -494,7 +495,7 @@ def build(ctx):
PRIV_LIBS = get_deps(),
)
- headers = ["client.h", "qthelper.hpp"]
+ headers = ["client.h", "qthelper.hpp", "opengl_cb.h"]
for f in headers:
ctx.install_as(ctx.env.INCDIR + '/mpv/' + f, 'libmpv/' + f)