playback-test: fix buffering query

It was using the wrong values from the buffering query.
This commit is contained in:
Wim Taymans 2012-07-19 12:45:17 +02:00
parent 55f692eff6
commit 9eb8b64bb0

View file

@ -389,8 +389,9 @@ update_fill (PlaybackApp * app)
GstQuery *query;
query = gst_query_new_buffering (GST_FORMAT_PERCENT);
if (gst_element_query (app->pipeline, query)) {
gint64 start, stop, buffering_total;
gint64 start, stop, estimated_total;
GstFormat format;
gdouble fill;
gboolean busy;
@ -400,15 +401,15 @@ update_fill (PlaybackApp * app)
gint64 buffering_left;
gst_query_parse_buffering_percent (query, &busy, &percent);
gst_query_parse_buffering_range (query, &format, &start, &stop,
&buffering_total);
gst_query_parse_buffering_stats (query, &mode, &avg_in, &avg_out,
&buffering_left);
gst_query_parse_buffering_range (query, &format, &start, &stop,
&estimated_total);
/* note that we could start the playback when buffering_left < remaining
* playback time */
GST_DEBUG ("buffering total %" G_GINT64_FORMAT " ms, left %"
G_GINT64_FORMAT " ms", buffering_total, buffering_left);
G_GINT64_FORMAT " ms", estimated_total, buffering_left);
GST_DEBUG ("start %" G_GINT64_FORMAT ", stop %" G_GINT64_FORMAT,
start, stop);