gst_element_query_position and gst_element_query_duration always returns 0

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Tue Dec 18 21:12:46 PST 2012


>     GstFormat fmt = GST_FORMAT_TIME;
>     gint64 pos;
>     qint64 dur;
>     if (gst_element_query_position(GST_ELEMENT(getPipeline()), &fmt, &pos)
> &&
>         gst_element_query_duration(GST_ELEMENT(getPipeline()), &fmt, &dur))
>     {
>
>     }
>     else
>     {
>         printf("GStreamer: Could not query position and duration\n");
>     }
>
>
> Any suggestions?

When are you posting this query? Is the pipeline in the playing state?

Did you try using the playbin/uridecode element to decode this media
and then issue position/duration queries on it?

I remember, my manually setup pipeline (on an embedded board) was
giving trouble with these queries. But switching to using playbin
fixed it (maybe I was setting up the pipeline incorrectly, I'm not
sure).

HTH,
-mandeep


>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gst-element-query-position-and-gst-element-query-duration-always-returns-0-tp4657521.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list