summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-03-06 14:24:34 +0100
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-09-21 09:14:33 +0200
commitf1906e684ae16fd120e2054840f252419910a1c5 (patch)
tree0decccd260bdd72e60ffbadcb21d0e79a20371cc /wscript_build.py
parent9f7e1cf70a18f3370b439486dabe3cf81c0296f6 (diff)
downloadmpv-wayland-next.tar.bz2
mpv-wayland-next.tar.xz
wayland/shm: use wl_viewportwayland-next
Lets the compositor scale the video. This relies on the compositors scaling mechanism and efficiency. But should by far more efficient than ffmpeg scaling which burns CPU. In my tests mpv went from 66 % cpu load to 9 %. But the scaling wasn't as nice as ffmpegs. Falls back to software scaling if the compositor dosen't advertise the wl_scaler interface.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index e9a37f7594..793b12b75a 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -86,10 +86,18 @@ def build(ctx):
source = "video/out/wayland/protocol/xdg-shell.xml",
target = "video/out/wayland/xdg-shell-protocol.c")
+ ctx.wayland_protocol_code(
+ source = "video/out/wayland/protocol/scaler.xml",
+ target = "video/out/wayland/scaler-protocol.c")
+
ctx.wayland_protocol_header(
source = "video/out/wayland/protocol/xdg-shell.xml",
target = "video/out/wayland/xdg-shell-protocol.h")
+ ctx.wayland_protocol_header(
+ source = "video/out/wayland/protocol/scaler.xml",
+ target = "video/out/wayland/scaler-protocol.h")
+
getch2_c = {
'win32': 'osdep/terminal-win.c',
}.get(ctx.env.DEST_OS, "osdep/terminal-unix.c")
@@ -382,6 +390,7 @@ def build(ctx):
( "video/out/wayland/buffer.c", "wayland" ),
( "video/out/wayland/memfile.c", "wayland" ),
( "video/out/wayland/xdg-shell-protocol.c", "wayland" ),
+ ( "video/out/wayland/scaler-protocol.c", "wayland" ),
( "video/out/win_state.c"),
( "video/out/x11_common.c", "x11" ),