#include <gst/gst.h>
#include <string.h>
-
+
#define GRAPH_LENGTH 80
-
+
/* playbin2 flags */
typedef enum {
GST_PLAY_FLAG_DOWNLOAD = (1 << 7) /* Enable progressive download (on selected formats) */
static gboolean refresh_ui (CustomData *data) {
GstQuery *query;
gboolean result;
-
+
query = gst_query_new_buffering (GST_FORMAT_PERCENT);
result = gst_element_query (data->pipeline, query);
if (result) {
gchar graph[GRAPH_LENGTH + 1];
GstFormat format = GST_FORMAT_TIME;
gint64 position = 0, duration = 0;
-
+
memset (graph, ' ', GRAPH_LENGTH);
graph[GRAPH_LENGTH] = '\0';
-
+
n_ranges = gst_query_get_n_buffering_ranges (query);
for (range = 0; range < n_ranges; range++) {
gint64 start, stop;
}
g_print ("\r");
}
-
+
return TRUE;
-
+
}
int main(int argc, char *argv[]) {