gnlsource: remove useless "controls_one" field.

This commit is contained in:
Mathieu Duponchelle 2014-06-24 12:52:24 +02:00 committed by Thibault Saunier
parent 81a0ee66c1
commit bd7d8776a1
2 changed files with 2 additions and 5 deletions

View file

@ -103,7 +103,6 @@ gnl_source_class_init (GnlSourceClass * klass)
parent_class = g_type_class_ref (GNL_TYPE_OBJECT);
klass->controls_one = TRUE;
klass->control_element = GST_DEBUG_FUNCPTR (gnl_source_control_element_func);
gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_source_prepare);
@ -422,7 +421,7 @@ gnl_source_add_element (GstBin * bin, GstElement * element)
GST_DEBUG_OBJECT (source, "Adding element %s", GST_ELEMENT_NAME (element));
if (GNL_SOURCE_GET_CLASS (source)->controls_one && source->element) {
if (source->element) {
GST_WARNING_OBJECT (bin, "GnlSource can only handle one element at a time");
return FALSE;
}
@ -430,7 +429,7 @@ gnl_source_add_element (GstBin * bin, GstElement * element)
/* call parent add_element */
pret = GST_BIN_CLASS (parent_class)->add_element (bin, element);
if (pret && GNL_SOURCE_GET_CLASS (source)->controls_one) {
if (pret) {
gnl_source_control_element_func (source, element);
}
return pret;

View file

@ -56,8 +56,6 @@ struct _GnlSourceClass
{
GnlObjectClass parent_class;
/* controls_one is TRUE if the class only controls one element */
gboolean controls_one;
/* control_element() takes care of controlling the given element */
gboolean (*control_element) (GnlSource * source, GstElement * element);
};