+2005-11-10 Michael Smith <msmith@fluendo.com>
+
+ * ext/ogg/gstoggmux.c: (gst_ogg_mux_request_new_pad),
+ (gst_ogg_mux_push_buffer), (gst_ogg_mux_dequeue_page),
+ (gst_ogg_mux_pad_queue_page), (gst_ogg_mux_queue_pads),
+ (gst_ogg_mux_collected):
+ Fix EOS handling, partially. Now forwarding an EOS event once we have
+ EOS on all pads works correctly. However, we still don't properly set
+ EOS on the actual ogg stream pages.
+
2005-11-09 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gstplaybin.c: (gst_play_bin_dispose):
pad->state = GST_OGG_PAD_STATE_DATA;
}
}
+ } else {
+ GST_DEBUG ("EOS on pad");
+ pad->eos = TRUE;
}
+
pad->buffer = buf;
}
if (pad->buffer) {
if (gst_ogg_mux_compare_pads (ogg_mux, bestpad, pad) > 0)
bestpad = pad;
- } else {
+ } else if (!pad->eos) {
still_hungry = pad;
}
}
* packet is the last of the stream. We need to do this because the ogg
* spec mandates that the last packet should have the EOS flag set before
* sending it to ogg. FIXME: Apparently we're allowed to send empty 'nil'
- * pages with the EOS flag set for EOS, so we could do this.
+ * pages with the EOS flag set for EOS, so we could do this. Not sure how
+ * that works, though. TODO: 'read ahead one more buffer' is a bit funky
+ * with collectpads. Rethink this.
* 4) pages get queued on a per-pad queue. Every time a page is queued, a
* dequeue is called, which will dequeue the oldest page on any pad, provided
- * that ALL pads have at least one marked page in the queue (TODO: or that
- * pad is at EOS?)
+ * that ALL pads have at least one marked page in the queue (or remaining
+ * pad are at EOS)
*/
static GstFlowReturn
gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux)
GST_DEBUG ("best pad %p", best);
- if (!best) { /* EOS : FIXME !! We need to handle EOS correctly */
+ if (!best) { /* EOS : FIXME !! We need to handle EOS correctly, and set EOS
+ flags on the ogg pages. */
+ GST_DEBUG ("Pushing EOS");
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
return GST_FLOW_WRONG_STATE;
}