static double em_buffer_size_get(void *video) { Emotion_Gstreamer_Video *ev; GstQuery *query; gboolean busy; gint percent; ev = video; if (!ev->pipeline) return 0.0; query = gst_query_new_buffering(GST_FORMAT_DEFAULT); if (gst_element_query(ev->pipeline, query)) gst_query_parse_buffering_percent(query, &busy, &percent); else percent = 100; gst_query_unref(query); return ((float)(percent)) / 100.0; }
BufferingQueryPtr BufferingQuery::create(Format format) { return BufferingQueryPtr::wrap(gst_query_new_buffering(static_cast<GstFormat>(format)), false); }