gboolean active);
static GstStateChangeReturn gst_ogg_demux_change_state (GstElement * element,
GstStateChange transition);
-static void gst_ogg_demux_send_event (GstOggDemux * ogg, GstEvent * event);
+static gboolean gst_ogg_demux_send_event (GstOggDemux * ogg, GstEvent * event);
static void gst_ogg_print (GstOggDemux * demux);
ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad));
switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_FLUSH_START:
+ res = gst_ogg_demux_send_event (ogg, event);
+ break;
+ case GST_EVENT_FLUSH_STOP:
+ GST_DEBUG_OBJECT (ogg, "got a flush stop event");
+ ogg_sync_reset (&ogg->sync);
+ res = gst_ogg_demux_send_event (ogg, event);
+ break;
case GST_EVENT_NEWSEGMENT:
- /* FIXME */
GST_DEBUG_OBJECT (ogg, "got a new segment event");
- ogg_sync_reset (&ogg->sync);
gst_event_unref (event);
res = TRUE;
break;
case GST_EVENT_EOS:
{
GST_DEBUG_OBJECT (ogg, "got an EOS event");
- res = gst_pad_event_default (pad, event);
+ res = gst_ogg_demux_send_event (ogg, event);
if (ogg->current_chain == NULL) {
GST_ELEMENT_ERROR (ogg, STREAM, DEMUX, (NULL),
("can't get first chain"));
break;
}
default:
- res = gst_pad_event_default (pad, event);
+ res = gst_ogg_demux_send_event (ogg, event);
break;
}
gst_object_unref (ogg);
return result;
}
-static void
+static gboolean
gst_ogg_demux_send_event (GstOggDemux * ogg, GstEvent * event)
{
GstOggChain *chain = ogg->current_chain;
+ gboolean res = TRUE;
if (chain) {
gint i;
gst_event_ref (event);
GST_DEBUG_OBJECT (pad, "Pushing event %" GST_PTR_FORMAT, event);
- gst_pad_push_event (GST_PAD (pad), event);
+ res &= gst_pad_push_event (GST_PAD (pad), event);
}
}
gst_event_unref (event);
+
+ return res;
}
static GstFlowReturn