mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-09 17:44:14 +00:00
oggdemux: gather some more stats about bisection
https://bugzilla.gnome.org/show_bug.cgi?id=662475
This commit is contained in:
parent
dbd694c7c4
commit
db21375406
2 changed files with 22 additions and 0 deletions
ext/ogg
|
@ -1440,6 +1440,19 @@ gst_ogg_pad_handle_push_mode_state (GstOggPad * pad, ogg_page * page)
|
|||
}
|
||||
GST_INFO_OBJECT (ogg, "Bisection needed %d + %d steps",
|
||||
ogg->push_bisection_steps[0], ogg->push_bisection_steps[1]);
|
||||
ogg->stats_bisection_steps[0] += ogg->push_bisection_steps[0];
|
||||
ogg->stats_bisection_steps[1] += ogg->push_bisection_steps[1];
|
||||
if (ogg->stats_bisection_max_steps[0] < ogg->push_bisection_steps[0])
|
||||
ogg->stats_bisection_max_steps[0] = ogg->push_bisection_steps[0];
|
||||
if (ogg->stats_bisection_max_steps[1] < ogg->push_bisection_steps[1])
|
||||
ogg->stats_bisection_max_steps[1] = ogg->push_bisection_steps[1];
|
||||
ogg->stats_nbisections++;
|
||||
GST_INFO_OBJECT (ogg,
|
||||
"So far, %.2f + %.2f bisections needed per seek (max %d + %d)",
|
||||
ogg->stats_bisection_steps[0] / (float) ogg->stats_nbisections,
|
||||
ogg->stats_bisection_steps[1] / (float) ogg->stats_nbisections,
|
||||
ogg->stats_bisection_max_steps[0],
|
||||
ogg->stats_bisection_max_steps[1]);
|
||||
}
|
||||
}
|
||||
} else if (ogg->push_state == PUSH_LINEAR1) {
|
||||
|
@ -1853,6 +1866,12 @@ gst_ogg_demux_init (GstOggDemux * ogg, GstOggDemuxClass * g_class)
|
|||
ogg->push_lock = g_mutex_new ();
|
||||
ogg->chains = g_array_new (FALSE, TRUE, sizeof (GstOggChain *));
|
||||
|
||||
ogg->stats_nbisections = 0;
|
||||
ogg->stats_bisection_steps[0] = 0;
|
||||
ogg->stats_bisection_steps[1] = 0;
|
||||
ogg->stats_bisection_max_steps[0] = 0;
|
||||
ogg->stats_bisection_max_steps[1] = 0;
|
||||
|
||||
ogg->newsegment = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -188,6 +188,9 @@ struct _GstOggDemux
|
|||
gboolean push_disable_seeking;
|
||||
|
||||
gint push_bisection_steps[2];
|
||||
gint stats_bisection_steps[2];
|
||||
gint stats_bisection_max_steps[2];
|
||||
gint stats_nbisections;
|
||||
|
||||
/* ogg stuff */
|
||||
ogg_sync_state sync;
|
||||
|
|
Loading…
Reference in a new issue