mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
tutorials/playback: Fix more occurences of GST_TIME_FORMAT / GST_FORMAT_TIME mixups
https://bugzilla.gnome.org/show_bug.cgi?id=777734
This commit is contained in:
parent
282851deef
commit
2e29b1e5c3
1 changed files with 2 additions and 2 deletions
|
@ -136,9 +136,9 @@ static gboolean refresh_ui (CustomData *data) {
|
||||||
for (i = (gint)start; i < stop; i++)
|
for (i = (gint)start; i < stop; i++)
|
||||||
graph [i] = '-';
|
graph [i] = '-';
|
||||||
}
|
}
|
||||||
if (gst_element_query_position (data->pipeline, GST_TIME_FORMAT, &position) &&
|
if (gst_element_query_position (data->pipeline, GST_FORMAT_TIME, &position) &&
|
||||||
GST_CLOCK_TIME_IS_VALID (position) &&
|
GST_CLOCK_TIME_IS_VALID (position) &&
|
||||||
gst_element_query_duration (data->pipeline, GST_TIME_FORMAT, &duration) &&
|
gst_element_query_duration (data->pipeline, GST_FORMAT_TIME, &duration) &&
|
||||||
GST_CLOCK_TIME_IS_VALID (duration)) {
|
GST_CLOCK_TIME_IS_VALID (duration)) {
|
||||||
i = (gint)(GRAPH_LENGTH * (double)position / (double)(duration + 1));
|
i = (gint)(GRAPH_LENGTH * (double)position / (double)(duration + 1));
|
||||||
graph [i] = data->buffering_level < 100 ? 'X' : '>';
|
graph [i] = data->buffering_level < 100 ? 'X' : '>';
|
||||||
|
|
Loading…
Reference in a new issue