From 854826501ccc16ac207564dc9ea5aa851dcb6637 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 5 Jun 2018 17:53:51 +0200 Subject: [PATCH] validate-element-monitor: Detect basesink elements And add a macro Part-of: --- validate/gst/validate/gst-validate-element-monitor.c | 2 ++ validate/gst/validate/gst-validate-element-monitor.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/validate/gst/validate/gst-validate-element-monitor.c b/validate/gst/validate/gst-validate-element-monitor.c index b8f9e6f..2966b14 100644 --- a/validate/gst/validate/gst-validate-element-monitor.c +++ b/validate/gst/validate/gst-validate-element-monitor.c @@ -207,6 +207,8 @@ gst_validate_element_monitor_inspect (GstValidateElementMonitor * monitor) } else GST_ERROR_OBJECT (element, "no klassname"); + monitor->is_sink = GST_IS_BASE_SINK (element); + gst_object_unref (element); } diff --git a/validate/gst/validate/gst-validate-element-monitor.h b/validate/gst/validate/gst-validate-element-monitor.h index 9a80d2a..92e90d9 100644 --- a/validate/gst/validate/gst-validate-element-monitor.h +++ b/validate/gst/validate/gst-validate-element-monitor.h @@ -42,6 +42,7 @@ G_BEGIN_DECLS #define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_ENCODER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_encoder) #define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DEMUXER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_demuxer) #define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_CONVERTER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_converter) +#define GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_SINK(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_sink) typedef struct _GstValidateElementMonitor GstValidateElementMonitor; typedef struct _GstValidateElementMonitorClass GstValidateElementMonitorClass; @@ -64,6 +65,7 @@ struct _GstValidateElementMonitor { gboolean is_encoder; gboolean is_demuxer; gboolean is_converter; + gboolean is_sink; }; /** -- 2.7.4