Duration and position read problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Duration and position read problem

Paolo Micanti

Hi all,

I’m using the gstreamer api to play some videos on an embedded system. The playback is fine, but I get a strange problem when trying to get the duration and position of the playback. In particular, I regularly call a function that reads the total duration and position of the playback, using the lines below

 

len = 0;

pos = 0;

gst_element_query_duration(pipeline,&fmt,&len);

gst_element_query_position (pipeline, &fmt, &pos);

 

My problem is that when the playback is finished, the position is greater than the total duration, for example:

 

0:00:46.007844442 / 0:00:45.680000000

 

This happens only with some kind of videos, in particular with mpeg 1 and mpeg 2, while using h.254/mpeg 4 it seems to work fine. Is this some kind of bug, or am I missing something?

 

Thanks


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Duration and position read problem

Stefan Sauer
On 12/19/2011 11:58 AM, Paolo Micanti wrote:

Hi all,

I’m using the gstreamer api to play some videos on an embedded system. The playback is fine, but I get a strange problem when trying to get the duration and position of the playback. In particular, I regularly call a function that reads the total duration and position of the playback, using the lines below

 

len = 0;

pos = 0;

gst_element_query_duration(pipeline,&fmt,&len);

gst_element_query_position (pipeline, &fmt, &pos);

 

My problem is that when the playback is finished, the position is greater than the total duration, for example:

 

0:00:46.007844442 / 0:00:45.680000000

 

This happens only with some kind of videos, in particular with mpeg 1 and mpeg 2, while using h.254/mpeg 4 it seems to work fine. Is this some kind of bug, or am I missing something?

Sounds like a bug. Please file a bug to bugzilla.gnome.org, ideally link to sample video where it happens.

Stefan

 

Thanks

_______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel