+2005-06-23 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * gst/elements/gsttypefindelement.c:
+ (gst_type_find_element_handle_event):
+ Don't restart typefinding on a discont.
+ * gst/gstelement.c: (gst_element_set_state):
+ Debug spelling fix.
+ * gst/gstpad.c: (gst_pad_set_active), (gst_pad_send_event):
+ Allow changing mode of an active pad.
+ Debug output fixes.
+ * gst/registries/gstlibxmlregistry.c: (load_feature):
+ Don't cast a static pad template to a normal pad template.
+
2005-06-23 Thomas Vander Stichele <thomas at apestaart dot org>
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
oldactive = GST_PAD_MODE_ACTIVATE (old);
/* if nothing changed, we can just exit */
- if (G_UNLIKELY (oldactive == active))
+ if (G_UNLIKELY (oldactive == active && old == mode))
goto was_ok;
/* FIXME, no mode switching yet, need more design docs first */
goto was_ok;
#endif
- /* make sure data is disallowed when going inactive */
- if (!active) {
+ /* make sure data is disallowed when going inactive or changing
+ * mode
+ */
+ if (!active || oldactive) {
GST_CAT_DEBUG (GST_CAT_PADS, "de-activating pad %s:%s",
GST_DEBUG_PAD_NAME (pad));
GST_PAD_SET_FLUSHING (pad);
if (GST_EVENT_SRC (event) == NULL)
GST_EVENT_SRC (event) = gst_object_ref (GST_OBJECT (pad));
- GST_CAT_DEBUG (GST_CAT_EVENT, "have event type %d on pad %s:%s",
- GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (pad));
-
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
- GST_CAT_DEBUG (GST_CAT_EVENT, "have flush event");
+ GST_CAT_DEBUG (GST_CAT_EVENT, "have event type %d (FLUSH) on pad %s:%s",
+ GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (pad));
+
if (GST_EVENT_FLUSH_DONE (event)) {
GST_PAD_UNSET_FLUSHING (pad);
GST_CAT_DEBUG (GST_CAT_EVENT, "cleared flush flag");
}
break;
default:
+ GST_CAT_DEBUG (GST_CAT_EVENT, "have event type %d on pad %s:%s",
+ GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (pad));
+
if (GST_PAD_IS_FLUSHING (pad))
goto flushing;
break;
flushing:
{
GST_UNLOCK (pad);
- GST_CAT_DEBUG (GST_CAT_EVENT, "received event on flushing pad");
+ GST_CAT_DEBUG (GST_CAT_EVENT, "Received event on flushing pad. Discarding");
gst_event_unref (event);
return FALSE;
}