From 681da9e2f39fd5180317113e7349272586ae645d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 19 Apr 2024 16:49:45 +0200 Subject: [PATCH] clapper-gtk: video: Add workaround for better GStreamer 1.24 support --- src/lib/clapper-gtk/clapper-gtk-video.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/clapper-gtk/clapper-gtk-video.c b/src/lib/clapper-gtk/clapper-gtk-video.c index ff9e8e14..3abcd1b2 100644 --- a/src/lib/clapper-gtk/clapper-gtk-video.c +++ b/src/lib/clapper-gtk/clapper-gtk-video.c @@ -1399,6 +1399,22 @@ clapper_gtk_video_constructed (GObject *object) g_signal_connect (self->player, "notify::video-sink", G_CALLBACK (_video_sink_changed_cb), self); + /* FIXME: This is a temporary workaround for lack + * of DMA_DRM negotiation support in sink itself */ + if (G_LIKELY (vsink != NULL)) { + guint major = 0, minor = 0, micro = 0, nano = 0; + + gst_version (&major, &minor, µ, &nano); + if (major == 1 && minor >= 24) { + GstElement *bin; + + if ((bin = gst_element_factory_make ("glsinkbin", NULL))) { + g_object_set (bin, "sink", vsink, NULL); + vsink = bin; + } + } + } + clapper_player_set_video_sink (self->player, vsink); g_signal_connect (self->player, "error",