ext/ogg/gstoggdemux.c: consideratly speedup ogg chain detection by not trying to...
authorWim Taymans <wim.taymans@gmail.com>
Tue, 5 Jun 2007 16:02:57 +0000 (16:02 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 5 Jun 2007 16:02:57 +0000 (16:02 +0000)
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.

ChangeLog
ext/ogg/gstoggdemux.c

index e444314..c697dcd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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),
        (gst_multi_fd_sink_class_init), (gst_multi_fd_sink_add_full),
        (gst_multi_fd_sink_remove_flush),
index a806588..96f61e1 100644 (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 */
-      done &= (pad->start_time != GST_CLOCK_TIME_NONE);
-      GST_LOG_OBJECT (ogg, "done %08lx now %d", serial, done);
+      if (!pad->is_skeleton)
+        done &= (pad->start_time != GST_CLOCK_TIME_NONE);
+      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;
 }