[Spice-commits] configure.ac server/gstreamer-encoder.c server/reds.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Jan 31 09:00:43 UTC 2017


 configure.ac               |    2 +-
 server/gstreamer-encoder.c |    4 ++++
 server/reds.c              |    4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 0d14f96daa5976c8d701595c158781c64fbf2758
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Jan 5 15:01:36 2017 +0000

    Support VP9 encoder using GStreamer
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Victor Toso <victortoso at redhat.com>

diff --git a/configure.ac b/configure.ac
index 50135b5..8443114 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,7 +142,7 @@ AS_IF([test x"$have_smartcard" = "xyes"], [
     AS_VAR_APPEND([SPICE_REQUIRES], [" libcacard >= 0.1.2"])
 ])
 
-SPICE_PROTOCOL_MIN_VER=0.12.12
+SPICE_PROTOCOL_MIN_VER=0.12.13
 PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= $SPICE_PROTOCOL_MIN_VER])
 AC_SUBST([SPICE_PROTOCOL_MIN_VER])
 
diff --git a/server/gstreamer-encoder.c b/server/gstreamer-encoder.c
index f976c05..d3dd8d8 100644
--- a/server/gstreamer-encoder.c
+++ b/server/gstreamer-encoder.c
@@ -882,6 +882,8 @@ static const gchar* get_gst_codec_name(SpiceGstEncoder *encoder)
         return "vp8enc";
     case SPICE_VIDEO_CODEC_TYPE_H264:
         return "x264enc";
+    case SPICE_VIDEO_CODEC_TYPE_VP9:
+        return "vp9enc";
     default:
         /* gstreamer_encoder_new() should have rejected this codec type */
         spice_warning("unsupported codec type %d", encoder->base.codec_type);
@@ -911,6 +913,7 @@ static gboolean create_pipeline(SpiceGstEncoder *encoder)
         gstenc_opts = g_strdup("max-threads=1");
 #endif
         break;
+    case SPICE_VIDEO_CODEC_TYPE_VP9:
     case SPICE_VIDEO_CODEC_TYPE_VP8: {
         /* See http://www.webmproject.org/docs/encoder-parameters/
          * - Set mode/end-usage to get a constant bitrate to help with
@@ -1712,6 +1715,7 @@ VideoEncoder *gstreamer_encoder_new(SpiceVideoCodecType codec_type,
     SPICE_VERIFY(SPICE_GST_FRAME_STATISTICS_COUNT <= SPICE_GST_HISTORY_SIZE);
     spice_return_val_if_fail(codec_type == SPICE_VIDEO_CODEC_TYPE_MJPEG ||
                              codec_type == SPICE_VIDEO_CODEC_TYPE_VP8 ||
+                             codec_type == SPICE_VIDEO_CODEC_TYPE_VP9 ||
                              codec_type == SPICE_VIDEO_CODEC_TYPE_H264, NULL);
 
     GError *err = NULL;
diff --git a/server/reds.c b/server/reds.c
index 40c9485..fb58bd0 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3419,7 +3419,7 @@ err:
 
 static const char default_renderer[] = "sw";
 #if defined(HAVE_GSTREAMER_1_0) || defined(HAVE_GSTREAMER_0_10)
-#define GSTREAMER_CODECS "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;"
+#define GSTREAMER_CODECS "gstreamer:mjpeg;gstreamer:h264;gstreamer:vp8;gstreamer:vp9;"
 #else
 #define GSTREAMER_CODECS ""
 #endif
@@ -3515,6 +3515,7 @@ static const EnumNames video_codec_names[] = {
     {SPICE_VIDEO_CODEC_TYPE_MJPEG, "mjpeg"},
     {SPICE_VIDEO_CODEC_TYPE_VP8, "vp8"},
     {SPICE_VIDEO_CODEC_TYPE_H264, "h264"},
+    {SPICE_VIDEO_CODEC_TYPE_VP9, "vp9"},
     {0, NULL},
 };
 
@@ -3522,6 +3523,7 @@ static const int video_codec_caps[] = {
     SPICE_DISPLAY_CAP_CODEC_MJPEG,
     SPICE_DISPLAY_CAP_CODEC_VP8,
     SPICE_DISPLAY_CAP_CODEC_H264,
+    SPICE_DISPLAY_CAP_CODEC_VP9,
 };
 
 


More information about the Spice-commits mailing list