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