[Spice-devel] [spice-gtk] Add support for VP9

Frediano Ziglio fziglio at redhat.com
Wed Jan 4 11:46:21 UTC 2017


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 configure.ac              | 2 +-
 src/channel-display-gst.c | 2 ++
 src/channel-display.c     | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f3e7f8d..aa60e91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,7 +69,7 @@ AC_CHECK_LIBM
 AC_SUBST(LIBM)
 
 AC_CONFIG_SUBDIRS([spice-common])
-PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.12.12])
+PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.12.13])
 
 COMMON_CFLAGS='-I${top_builddir}/spice-common/ -I${top_srcdir}/spice-common/ ${SPICE_PROTOCOL_CFLAGS}'
 AC_SUBST(COMMON_CFLAGS)
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index f52299f..6ace86f 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -77,6 +77,8 @@ static struct {
      */
     { "h264parse ! avdec_h264", "" },
 
+    /* SPICE_VIDEO_CODEC_TYPE_VP9 */
+    { "vp9dec", "caps=video/x-vp9" },
 };
 
 G_STATIC_ASSERT(G_N_ELEMENTS(gst_opts) == SPICE_VIDEO_CODEC_TYPE_ENUM_END);
diff --git a/src/channel-display.c b/src/channel-display.c
index 709b3d2..7506863 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -736,6 +736,12 @@ static void spice_display_channel_reset_capabilities(SpiceChannel *channel)
     } else {
         SPICE_DEBUG("GStreamer does not support the h264 codec");
     }
+    if (gstvideo_has_codec(SPICE_VIDEO_CODEC_TYPE_VP9)) {
+        spice_channel_set_capability(SPICE_CHANNEL(channel),
+                                     SPICE_DISPLAY_CAP_CODEC_VP9);
+    } else {
+        SPICE_DEBUG("GStreamer does not support the vp9 codec");
+    }
 }
 
 static void destroy_surface(gpointer data)
-- 
2.9.3



More information about the Spice-devel mailing list