add debug info flush after seek (julien)

Original commit message from CVS:
add debug info
flush after seek (julien)
parent f7b8aa0a
2004-01-30 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_event),
(gst_ogg_demux_push):
add some seeking debug info
send a flush when seeking
2004-01-30 Benjamin Otte <in7y118@public.uni-hamburg.de>
* configure.ac:
......
......@@ -331,12 +331,20 @@ gst_ogg_demux_src_event (GstPad *pad, GstEvent *event)
g_warning ("invalid seek method in seek event");
break;
}
g_print ("DEBUG: oggdemux: offset %lld, known %lld\n", offset, cur->known_offset);
if (offset < cur->known_offset) {
GstEvent *restart = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0);
GstEvent *restart = gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, 0);
if (!gst_pad_send_event (GST_PAD_PEER (ogg->sinkpad), restart))
break;
}
else {
GstEvent *flush = gst_event_new_flush ();
if (!gst_pad_send_event (GST_PAD_PEER (ogg->sinkpad), flush))
break;
}
GST_OGG_SET_STATE (ogg, GST_OGG_STATE_SEEK);
GST_DEBUG_OBJECT (ogg, "initiating seeking to offset %"G_GUINT64_FORMAT, offset);
ogg->seek_pad = cur;
ogg->seek_to = offset;
gst_event_unref (event);
......@@ -637,6 +645,7 @@ br:
if (cur == ogg->seek_pad) {
if (ogg_page_granulepos (page) > ogg->seek_to) {
GST_OGG_SET_STATE (ogg, GST_OGG_STATE_PLAY);
GST_DEBUG_OBJECT (ogg, "ended seek at offset %"G_GUINT64_FORMAT" (requested %"G_GUINT64_FORMAT, cur->known_offset, ogg->seek_to);
ogg->seek_pad = NULL;
ogg->seek_to = 0;
/* send discont everywhere */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment