[gstreamer-bugs] [Bug 372797] Seek on DVD not performed relative to title
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Fri Nov 10 15:58:24 PST 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=372797
GStreamer | gst-plugins-ugly | Ver: 0.10.4
------- Comment #6 from Jason Gerard DeRose 2006-11-10 23:57 UTC -------
Well, I think this is a correctly functioning implementation of
gst_dvd_read_src_get_sector_from_time(). On all the DVDs I've testing it on,
it seems to be returning the correct map_ent from the correct tmap. However,
seeking still isn't working correctly as there seems to be seek related bugs
elsewhere.
/* returns the sector in the index at (or before) the given time, or -1 */
static gint
gst_dvd_read_src_get_sector_from_time (GstDvdReadSrc * src, GstClockTime ts)
{
gint i, j;
vts_tmap_t tmap;
if (src->vts_tmapt == NULL)
return -1;
i = src->pgc_id - 1;
if (!i < src->vts_tmapt->nr_of_tmaps)
return -1;
tmap = src->vts_tmapt->tmap[i];
j = ts / GST_SECOND / tmap.tmu - 1;
if (j < 0) {
/* FIXME: we should actually return the start sector for the title */
return tmap.map_ent[0] & 0x7fffffff;
}
else if (j >= tmap.nr_of_entries) {
/* This means we are trying to seek beyond the end time of the current
title. */
return tmap.map_ent[tmap.nr_of_entries-1] & 0x7fffffff;
}
else {
return tmap.map_ent[j] & 0x7fffffff;
}
}
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
More information about the Gstreamer-bugs
mailing list