From db67a92b3fdf0b356729fa1747a929d1f2501582 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 19 Nov 2014 17:16:02 -0300 Subject: [PATCH] pad-monitor: do not enforce caps querying rules for converters Some encoders/decoders can also be converters, do not enforce caps proxying rules for them --- validate/gst/validate/gst-validate-element-monitor.c | 1 + validate/gst/validate/gst-validate-element-monitor.h | 2 ++ validate/gst/validate/gst-validate-pad-monitor.c | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/validate/gst/validate/gst-validate-element-monitor.c b/validate/gst/validate/gst-validate-element-monitor.c index a7690ecee3..e8b078fa19 100644 --- a/validate/gst/validate/gst-validate-element-monitor.c +++ b/validate/gst/validate/gst-validate-element-monitor.c @@ -181,6 +181,7 @@ gst_validate_element_monitor_inspect (GstValidateElementMonitor * monitor) monitor->is_decoder = strstr (klassname, "Decoder") != NULL; monitor->is_encoder = strstr (klassname, "Encoder") != NULL; monitor->is_demuxer = strstr (klassname, "Demuxer") != NULL; + monitor->is_converter = strstr (klassname, "Converter") != NULL; } else GST_ERROR_OBJECT (element, "no klassname"); } diff --git a/validate/gst/validate/gst-validate-element-monitor.h b/validate/gst/validate/gst-validate-element-monitor.h index d113e224dc..8ee499b13d 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_DECODER(m) (GST_VALIDATE_ELEMENT_MONITOR_CAST (m)->is_decoder) #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) typedef struct _GstValidateElementMonitor GstValidateElementMonitor; typedef struct _GstValidateElementMonitorClass GstValidateElementMonitorClass; @@ -63,6 +64,7 @@ struct _GstValidateElementMonitor { gboolean is_decoder; gboolean is_encoder; gboolean is_demuxer; + gboolean is_converter; }; /** diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index e6dee8642f..ea342d884b 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -530,8 +530,9 @@ gst_validate_pad_monitor_pad_should_proxy_othercaps (GstValidatePadMonitor * return FALSE; /* We only know how to handle othercaps checks for codecs so far */ - return GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DECODER (parent) || - GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_ENCODER (parent); + return (GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_DECODER (parent) || + GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_ENCODER (parent)) && + !GST_VALIDATE_ELEMENT_MONITOR_ELEMENT_IS_CONVERTER (parent); }