[gst-devel] Problems with the use of SCR/PTS times to get position in time format on DVDs

Simone Gotti simone.gotti at email.it
Wed Sep 12 12:39:11 CEST 2007

Hi all,

during patching and testing on dvdnavsrc I discovered an important thing
on position queries:

SRC/PTS times provided by the stream are used to report newsegments
downstream. This is the right way as they are the unique high precision
times to do syncronization on the clock. So no problem on this point.

But I don't think that they are the right way when we are doing position
The problem is that I have some DVD where the SCR and pts restarts from
0 after some time in the same title:

t1: 0
tX: 342242432
tX+Y: 0 (again)

As a query on the pipeline is asked starting from the sinks a
position query with a time format is reported in the wrong way as the
position time will restart from 0 at some time. This can be noticed also
in totem that uses playbin (and so dvdreadsrc). When you seek to 1:20:0
and the RSC reset happens at 0:50:0 the seek goes in the right place but
the position reported after the seek is at 0:30.0.

By now I think that the unique right way to get a position is asking
directly to the source element (dvdnavsrc or dvdreadsrc when it reports
position in time format).
In dvdnavsrc (with my patch on bugzilla 476149) the position will be an
aproximation (calculted using tmaps or time interpolation) but it will
be quite right and continous.
Looking at various codes around, looks like this way to get the position
is the same done by other projects like VLC and xine.

What do you think about this? The applications that uses dvdnavsrc ord
dvdreadsrc should do the position query directly on it instead of the
pipeline? But how to handle this with playbin?


Simone Gotti
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070912/6d855703/attachment.pgp>

More information about the gstreamer-devel mailing list