From: Jin Chung Teng <jin.chung.t...@intel.com>

If playbin3 is available (checked in Gstreamer registry), it
makes sense to prefer it given the major improvements and
features it offers including the capability to handle higher
bitrates.

Cc: Frediano Ziglio <fredd...@gmail.com>
Cc: Dongwon Kim <dongwon....@intel.com>
Cc: Hazwan Arif Mazlan <hazwan.arif.maz...@intel.com>
Signed-off-by: Jin Chung Teng <jin.chung.t...@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasire...@intel.com>
---
 src/channel-display-gst.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 36db3a3..3f46a65 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -496,10 +496,13 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder)
     SpiceGstPlayFlags flags;
     GstCaps *caps;
 
-    playbin = gst_element_factory_make("playbin", "playbin");
+    playbin = gst_element_factory_make("playbin3", "playbin3");
     if (playbin == NULL) {
-        spice_warning("error upon creation of 'playbin' element");
-        return FALSE;
+        playbin = gst_element_factory_make("playbin", "playbin");
+        if (playbin == NULL) {
+            spice_warning("error upon creation of 'playbin' element");
+            return FALSE;
+        }
     }
 
     /* Passing the pipeline to widget, try to get window handle and
-- 
2.39.2

Reply via email to