[tracker-miners/wip/carlosg/compiler-warnings: 3/8] tracker-writeback: Avoid deprecated gstreamer API




commit c791890c31bf955f5fde9b61413c288e089fa6c6
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Aug 28 22:57:39 2022 +0200

    tracker-writeback: Avoid deprecated gstreamer API
    
    The gst_element_get_request_pad() API call is deprecated in 1.20, use
    the replacement if the version is larger. Luckily, we already had
    config.h checks for gstreamer >= 1.20.

 src/tracker-writeback/tracker-writeback-gstreamer.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/tracker-writeback/tracker-writeback-gstreamer.c 
b/src/tracker-writeback/tracker-writeback-gstreamer.c
index eb305d89f..ddf8e48bd 100644
--- a/src/tracker-writeback/tracker-writeback-gstreamer.c
+++ b/src/tracker-writeback/tracker-writeback-gstreamer.c
@@ -128,7 +128,11 @@ link_named_pad (GstPad      *srcpad,
 
        sinkpad = gst_element_get_static_pad (element, sinkpadname);
        if (sinkpad == NULL) {
+#if defined(HAVE_GSTREAMER_1_20)
+               sinkpad = gst_element_request_pad_simple (element, sinkpadname);
+#else
                sinkpad = gst_element_get_request_pad (element, sinkpadname);
+#endif
        }
        result = gst_pad_link (srcpad, sinkpad);
        gst_object_unref (sinkpad);


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