2004-07-09 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
+ * docs/gst/tmpl/gstelement.sgml:
+ * docs/gst/tmpl/gstplugin.sgml:
+ * docs/gst/tmpl/gsttypes.sgml:
+ * docs/pwg/building-state.xml:
+ * gst/elements/gstfakesrc.c: (gst_fakesrc_change_state):
+ * gst/gstelement.c: (gst_element_change_state):
+ * gst/gstthread.c: (gst_thread_change_state):
+ catch wrong state changes in element base class.
+
+2004-07-09 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
+
* gst/gstinfo.h:
clean up layout a little.
</para>
+@:
+
@gstelement: the object which received the signal.
<!-- ##### SIGNAL GstElement::error ##### -->
</para>
+@:
+@:
+@:
+@:
+
@gstelement: the object which received the signal.
@arg1:
@arg2:
</para>
+@:
+@:
+@:
+
@gstelement: the object which received the signal.
@arg1:
@arg2:
</para>
+@:
+@:
+
@gstelement: the object which received the signal.
@arg1:
</para>
+@:
+
@gstelement: the object which received the signal.
<!-- ##### SIGNAL GstElement::pad-removed ##### -->
</para>
+@:
+@:
+
@gstelement: the object which received the signal.
@arg1:
</para>
+@:
+@:
+@:
+
@gstelement: the object which received the signal.
@arg1:
@arg2:
@obj: a #GstElement to query
-<!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
-<para>
-Get the manager of this element.
-</para>
-
-@obj: a #GstElement to query
-
-
<!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
<para>
Get the scheduler of this element.
@Returns:
+<!-- ##### FUNCTION gst_plugin_check_file ##### -->
+<para>
+
+</para>
+
+@filename:
+@error:
+@Returns:
+
+
<!-- ##### FUNCTION gst_plugin_load_file ##### -->
<para>
</para>
-@:
+@gstelement: the object which received the signal.
<!-- ##### SIGNAL GstElement::error ##### -->
<para>
</para>
-@:
-@:
-@:
-@:
+@gstelement: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
<!-- ##### SIGNAL GstElement::found-tag ##### -->
<para>
</para>
-@:
-@:
-@:
+@gstelement: the object which received the signal.
+@arg1:
+@arg2:
<!-- ##### SIGNAL GstElement::new-pad ##### -->
<para>
</para>
-@:
-@:
+@gstelement: the object which received the signal.
+@arg1:
<!-- ##### SIGNAL GstElement::no-more-pads ##### -->
<para>
</para>
-@:
+@gstelement: the object which received the signal.
<!-- ##### SIGNAL GstElement::pad-removed ##### -->
<para>
</para>
-@:
-@:
+@gstelement: the object which received the signal.
+@arg1:
<!-- ##### SIGNAL GstElement::state-change ##### -->
<para>
</para>
-@:
-@:
-@:
+@gstelement: the object which received the signal.
+@arg1:
+@arg2:
<!-- ##### STRUCT GstElementClass ##### -->
<para>
specific data needed by the element, and it can optionally fail to
go from one state to another.
</para>
+ <para>
+ Do not g_assert for unhandled state changes; this is taken care of by
+ the GstElement base class.
+ </para>
<programlisting>
static GstElementStateReturn
gst_my_filter_change_state (GstElement *element);
case GST_STATE_READY_TO_NULL:
break;
default:
- g_assert_not_reached ();
break;
}
old_pending = GST_STATE_PENDING (element);
old_transition = GST_STATE_TRANSITION (element);
+ /* if the element already is in the given state, we just return success */
if (old_pending == GST_STATE_VOID_PENDING ||
old_state == GST_STATE_PENDING (element)) {
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
element->base_time = 0;
gst_element_clear_pad_caps (element);
break;
+ case GST_STATE_NULL_TO_READY:
+ case GST_STATE_READY_TO_NULL:
+ break;
default:
+ /* this will catch real but unhandled state changes;
+ * can only be caused by:
+ * - a new state was added
+ * - somehow the element was asked to jump across an intermediate state
+ */
+ g_assert_not_reached ();
break;
}
/* it should be dead now */
break;
default:
- GST_ERROR_OBJECT (element, "unhandled state change! %x",
- GST_STATE_TRANSITION (element));
- g_warning ("thread %s: UNHANDLED STATE CHANGE! %x",
- GST_STR_NULL (GST_OBJECT_NAME (element)),
- GST_STATE_TRANSITION (element));
- /* FIXME: not doable with current threading mess:
- g_assert_not_reached ();
- */
break;
}
case GST_STATE_READY_TO_NULL:
break;
default:
- g_assert_not_reached ();
break;
}