manual: update for position/duration query API change
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 28 Jul 2011 11:01:58 +0000 (12:01 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 28 Jul 2011 11:01:58 +0000 (12:01 +0100)
docs/manual/advanced-position.xml

index 5957231..1786339 100644 (file)
@@ -78,11 +78,10 @@ my_bus_message_cb (GstBus     *bus,
 static gboolean
 cb_print_position (GstElement *pipeline)
 {
-  GstFormat fmt = GST_FORMAT_TIME;
   gint64 pos, len;
 
-  if (gst_element_query_position (pipeline, &amp;fmt, &amp;pos)
-    &amp;&amp; gst_element_query_duration (pipeline, &amp;fmt, &amp;len)) {
+  if (gst_element_query_position (pipeline, GST_FORMAT_TIME, &amp;pos)
+    &amp;&amp; gst_element_query_duration (pipeline, GST_FORMAT_TIME, &amp;len)) {
     g_print ("Time: %" GST_TIME_FORMAT " / %" GST_TIME_FORMAT "\r",
             GST_TIME_ARGS (pos), GST_TIME_ARGS (len));
   }