+2004-01-29 Julien MOUTTE <julien@moutte.net>
+
+ * gst/elements/gstfilesrc.c: (gst_filesrc_get),
+ (gst_filesrc_uri_handler_init): Fixing seeking by making FLUSH happen
+ again and even before DISCONT.
+ * gst/gstpad.c: (gst_pad_event_default): Remove a unused switch case.
+ * libs/gst/bytestream/bytestream.c: (gst_bytestream_get_next_buf): Fix
+ bytestream so that it's not stopping to fill the bytestream if events
+ different than EOS or DISCONT are received. Instead it process them so
+ that they go downstream.
+
2004-01-29 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/Makefile.am:
src = GST_FILESRC (gst_pad_get_parent (pad));
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL);
+ /* check for flush */
+ if (src->need_flush) {
+ src->need_flush = FALSE;
+ GST_DEBUG_OBJECT (src, "sending flush");
+ return GST_DATA (gst_event_new_flush ());
+ }
/* check for seek */
if (src->seek_happened) {
GstEvent *event;
src->seek_happened = FALSE;
GST_DEBUG_OBJECT (src, "sending discont");
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, src->curoffset, NULL);
- src->need_flush = FALSE;
return GST_DATA (event);
}
- /* check for flush */
- if (src->need_flush) {
- src->need_flush = FALSE;
- GST_DEBUG_OBJECT (src, "sending flush");
- return GST_DATA (gst_event_new_flush ());
- }
/* check for EOF */
g_assert (src->curoffset <= src->filelen);
iface->get_uri = gst_filesrc_uri_get_uri;
iface->set_uri = gst_filesrc_uri_set_uri;
}
-
}
}
}
- case GST_EVENT_FLUSH:
default:
return gst_pad_event_default_dispatch (pad, element, event);
}
return FALSE;
if (GST_IS_EVENT (nextbuf)) {
- bs->event = GST_EVENT (nextbuf);
- return FALSE;
+ GstEvent *event = GST_EVENT (nextbuf);
+ switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_EOS:
+ case GST_EVENT_DISCONTINUOUS:
+ GST_DEBUG ("get_next_buf: received EOS event.");
+ bs->event = event;
+ return FALSE;
+ default:
+ GST_DEBUG ("get_next_buf: received event %d, forwarding",
+ GST_EVENT_TYPE (event));
+ gst_pad_event_default (bs->pad, event);
+ return TRUE;
+ }
}
if (GST_BUFFER_TIMESTAMP_IS_VALID (nextbuf))
src = GST_FILESRC (gst_pad_get_parent (pad));
g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL);
+ /* check for flush */
+ if (src->need_flush) {
+ src->need_flush = FALSE;
+ GST_DEBUG_OBJECT (src, "sending flush");
+ return GST_DATA (gst_event_new_flush ());
+ }
/* check for seek */
if (src->seek_happened) {
GstEvent *event;
src->seek_happened = FALSE;
GST_DEBUG_OBJECT (src, "sending discont");
event = gst_event_new_discontinuous (FALSE, GST_FORMAT_BYTES, src->curoffset, NULL);
- src->need_flush = FALSE;
return GST_DATA (event);
}
- /* check for flush */
- if (src->need_flush) {
- src->need_flush = FALSE;
- GST_DEBUG_OBJECT (src, "sending flush");
- return GST_DATA (gst_event_new_flush ());
- }
/* check for EOF */
g_assert (src->curoffset <= src->filelen);
iface->get_uri = gst_filesrc_uri_get_uri;
iface->set_uri = gst_filesrc_uri_set_uri;
}
-