Howto determine size?

Stef Bon stefbon at
Tue Jul 5 01:56:21 PDT 2011

In addition to this, when I've rewritten the progress function to this:

static gboolean cb_reportprogress (GstElement *pipeline)
  GstFormat fmt = GST_FORMAT_BYTES;
  gint64 pos, len;

    if (gst_element_query_position (pipeline, &fmt, &pos) &&
gst_element_query_duration (pipeline, &fmt, &len)) {

        g_print ("Pos: %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "
\r", pos, len);


    /* call me again */
    return TRUE;


it reports something like this:

Pos: 14262736 / 67950761

where of course the second number is the total size, which is not
correct. The counter is already bigger than that number.... and is
still counting.


More information about the gstreamer-devel mailing list