[Spice-commits] src/channel-display-gst.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 21 09:26:09 UTC 2020


 src/channel-display-gst.c |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 9e4a09b480767adc7f7e88dc2376caf37da92f16
Author: Snir Sheriber <ssheribe at redhat.com>
Date:   Mon Nov 4 12:11:09 2019 +0200

    gstreamer: add debug message for each element added to pipeline
    
    This helps to debug plugins load related issues, also factory name
    is usually a bit more accurate (if factory exists the elements name
    may also include some suffix).
    
    Signed-off-by: Snir Sheriber <ssheribe at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index bd72625..35515ac 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -469,11 +469,19 @@ sink_event_probe(GstPad *pad, GstPadProbeInfo *info, gpointer data)
     return GST_PAD_PROBE_OK;
 }
 
+static inline const char *gst_element_name(GstElement *element)
+{
+   GstElementFactory *f = gst_element_get_factory(element);
+   return f ? GST_OBJECT_NAME(f) : GST_OBJECT_NAME(element);
+}
+
 /* This function is used to set a probe on the sink */
 static void
 deep_element_added_cb(GstBin *pipeline, GstBin *bin, GstElement *element,
                       SpiceGstDecoder *decoder)
 {
+     SPICE_DEBUG("A new element was added to Gstreamer's pipeline (%s)",
+                 gst_element_name(element));
     /* Attach a probe to the sink to update the statistics */
     if (GST_IS_BASE_SINK(element)) {
         GstPad *pad = gst_element_get_static_pad(element, "sink");


More information about the Spice-commits mailing list