mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
manual: update for position/duration query API change
This commit is contained in:
parent
6248fefaa5
commit
9e308d150a
1 changed files with 2 additions and 3 deletions
|
@ -78,11 +78,10 @@ my_bus_message_cb (GstBus *bus,
|
||||||
static gboolean
|
static gboolean
|
||||||
cb_print_position (GstElement *pipeline)
|
cb_print_position (GstElement *pipeline)
|
||||||
{
|
{
|
||||||
GstFormat fmt = GST_FORMAT_TIME;
|
|
||||||
gint64 pos, len;
|
gint64 pos, len;
|
||||||
|
|
||||||
if (gst_element_query_position (pipeline, &fmt, &pos)
|
if (gst_element_query_position (pipeline, GST_FORMAT_TIME, &pos)
|
||||||
&& gst_element_query_duration (pipeline, &fmt, &len)) {
|
&& gst_element_query_duration (pipeline, GST_FORMAT_TIME, &len)) {
|
||||||
g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\r",
|
g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\r",
|
||||||
GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
|
GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue