ext/ogg/gstoggdemux.c: consideratly speedup ogg chain detection by not trying to find a base timestamp for skeleton s...

Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_parse_skeleton_fisbone),
(gst_ogg_pad_submit_packet), (gst_ogg_demux_perform_seek),
(gst_ogg_demux_read_chain), (gst_ogg_demux_collect_chain_info):
consideratly speedup ogg chain detection by not trying to find a base
timestamp for skeleton streams.
This commit is contained in:
Wim Taymans 2007-06-05 16:02:57 +00:00
parent 56e2a6b516
commit c6ecd5bec8
2 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2007-06-05 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_parse_skeleton_fisbone),
(gst_ogg_pad_submit_packet), (gst_ogg_demux_perform_seek),
(gst_ogg_demux_read_chain), (gst_ogg_demux_collect_chain_info):
consideratly speedup ogg chain detection by not trying to find a base
timestamp for skeleton streams.
2007-06-05 Wim Taymans <wim@fluendo.com>
* gst/tcp/gstmultifdsink.c: (gst_client_status_get_type),

View file

@ -598,7 +598,7 @@ gst_ogg_pad_parse_skeleton_fisbone (GstOggPad * pad, ogg_packet * packet)
fisbone_pad->granuleshift);
GST_INFO_OBJECT (pad->ogg, "skeleton fisbone parsed "
"(serialno: %" G_GUINT32_FORMAT " start time: %" GST_TIME_FORMAT
"(serialno: %08x start time: %" GST_TIME_FORMAT
" granulerate_n: %" G_GINT64_FORMAT " granulerate_d: %" G_GINT64_FORMAT
" preroll: %" G_GUINT32_FORMAT " granuleshift: %d)",
serialno, GST_TIME_ARGS (fisbone_pad->start_time),
@ -2390,6 +2390,9 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
for (i = 0; i < chain->streams->len; i++) {
GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i);
GST_LOG_OBJECT (ogg, "serial %08lx time %" GST_TIME_FORMAT, pad->serialno,
GST_TIME_ARGS (pad->start_time));
if (pad->serialno == serial) {
known_serial = TRUE;
@ -2404,14 +2407,16 @@ gst_ogg_demux_read_chain (GstOggDemux * ogg, GstOggChain ** res_chain)
gst_ogg_pad_submit_page (pad, &op);
}
/* the timestamp will be filled in when we submit the pages */
if (!pad->is_skeleton)
done &= (pad->start_time != GST_CLOCK_TIME_NONE);
GST_LOG_OBJECT (ogg, "done %08lx now %d", serial, done);
GST_LOG_OBJECT (ogg, "done %08lx now %d", pad->serialno, done);
}
/* we read a page not belonging to the current chain: seek back to the
* beginning of the chain
*/
if (!known_serial) {
GST_LOG_OBJECT (ogg, "unknown serial %08lx", serial);
gst_ogg_demux_seek (ogg, offset);
break;
}
@ -2574,6 +2579,8 @@ gst_ogg_demux_collect_chain_info (GstOggDemux * ogg, GstOggChain * chain)
chain->total_time = GST_CLOCK_TIME_NONE;
chain->segment_start = G_MAXINT64;
GST_DEBUG_OBJECT (ogg, "trying to collect chain info");
for (i = 0; i < chain->streams->len; i++) {
GstOggPad *pad = g_array_index (chain->streams, GstOggPad *, i);
@ -2591,6 +2598,8 @@ gst_ogg_demux_collect_chain_info (GstOggDemux * ogg, GstOggChain * chain)
&& chain->segment_start != G_MAXINT64)
chain->total_time = chain->segment_stop - chain->segment_start;
GST_DEBUG_OBJECT (ogg, "return %d", res);
return res;
}