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
This commit is contained in:
Thiago Santos 2014-11-19 17:16:02 -03:00
parent 163d286f5b
commit db67a92b3f
3 changed files with 6 additions and 2 deletions

View file

@ -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");
}

View file

@ -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;
};
/**

View file

@ -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);
}