diff options
author | Jin Chung Teng <jin.chung.teng@intel.com> | 2023-10-01 22:20:22 -0700 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2023-10-06 09:03:26 +0100 |
commit | 2a8dc65b9bddc2fd0e89312f501701fd7d2cb973 (patch) | |
tree | 0e6c0a55281a07a95833d3f3495ceacd78fec360 | |
parent | 20c414f88a140ef5083b031e84feb599c1740cb5 (diff) |
channel-display-gst: Prefer playbin3 to playbin
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 <freddy77@gmail.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
Signed-off-by: Jin Chung Teng <jin.chung.teng@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
-rw-r--r-- | src/channel-display-gst.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c index 36db3a3..5c9927b 100644 --- a/src/channel-display-gst.c +++ b/src/channel-display-gst.c @@ -495,11 +495,17 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder) GstElement *playbin, *sink; SpiceGstPlayFlags flags; GstCaps *caps; + static bool playbin3_supported = true; - playbin = gst_element_factory_make("playbin", "playbin"); + playbin = playbin3_supported ? + gst_element_factory_make("playbin3", "playbin") : NULL; if (playbin == NULL) { - spice_warning("error upon creation of 'playbin' element"); - return FALSE; + playbin3_supported = 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 |