[client v10 27/27] spice-gtk: Use decodebin as a fallback for the GStreamer video decoder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This means future video codecs may be supported automatically.
One can also force usage of decodebin by setting $SPICE_GSTVIDEO_AUTO.

Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
---
 src/channel-display-gst.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index e328260..5fb2d3b 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -257,8 +257,20 @@ static gboolean construct_pipeline(SpiceGstDecoder *decoder)
         gstdec_name = "h264parse ! avdec_h264";
         break;
     default:
-        spice_warning("Unknown codec type %d", decoder->base.codec_type);
-        return -1;
+        SPICE_DEBUG("Unknown codec type %d. Trying decodebin.",
+                    decoder->base.codec_type);
+        src_caps = "";
+        gstdec_name = NULL;
+        break;
+    }
+
+    /* decodebin will use vaapi if installed, which for a time could
+     * intentionally crash the application. So only use decodebin as a
+     * fallback or when SPICE_GSTVIDEO_AUTO is set.
+     * See: https://bugs.freedesktop.org/show_bug.cgi?id=90884
+     */
+    if (!gstdec_name || getenv("SPICE_GSTVIDEO_AUTO")) {
+        gstdec_name = "decodebin";
     }
 
     /* - Set sync=true so appsink determines when to display the frames.
-- 
2.7.0
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]