From b54ab67c8468570227378ada43119581b6d97aba Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 6 Apr 2003 13:09:38 +0000 Subject: report start of PG as well CVS patchset: 4548 CVS date: 2003/04/06 13:09:38 --- src/input/libdvdnav/dvdnav.c | 11 ++++++++++- src/input/libdvdnav/dvdnav_events.h | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/input/libdvdnav/dvdnav.c b/src/input/libdvdnav/dvdnav.c index bf9002ef7..a42c06bfc 100644 --- a/src/input/libdvdnav/dvdnav.c +++ b/src/input/libdvdnav/dvdnav.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dvdnav.c,v 1.22 2003/04/05 12:28:16 miguelfreitas Exp $ + * $Id: dvdnav.c,v 1.23 2003/04/06 13:09:38 mroi Exp $ * */ @@ -590,6 +590,7 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, unsigned char **buf, cell_event->pgN = state->pgN; cell_event->cell_length = dvdnav_convert_time(&state->pgc->cell_playback[state->cellN-1].playback_time); + cell_event->pg_length = 0; /* Find start cell of program. */ first_cell_nr = state->pgc->program_map[state->pgN-1]; @@ -607,6 +608,11 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, unsigned char **buf, for (i = 1; i < state->cellN; i++) cell_event->cell_start += dvdnav_convert_time(&state->pgc->cell_playback[i - 1].playback_time); + + cell_event->pg_start = 0; + for (i = 1; i < state->pgc->program_map[state->pgN-1]; i++) + cell_event->pg_start += + dvdnav_convert_time(&state->pgc->cell_playback[i - 1].playback_time); this->position_current.cell = this->position_next.cell; this->position_current.cell_restart = this->position_next.cell_restart; @@ -1023,6 +1029,9 @@ uint32_t dvdnav_get_next_still_flag(dvdnav_t *this) { /* * $Log: dvdnav.c,v $ + * Revision 1.23 2003/04/06 13:09:38 mroi + * report start of PG as well + * * Revision 1.22 2003/04/05 12:28:16 miguelfreitas * "perfect" time display for dvds * (see thread on xine-devel for details) diff --git a/src/input/libdvdnav/dvdnav_events.h b/src/input/libdvdnav/dvdnav_events.h index 918e5df3d..4d08665d3 100644 --- a/src/input/libdvdnav/dvdnav_events.h +++ b/src/input/libdvdnav/dvdnav_events.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dvdnav_events.h,v 1.9 2003/04/05 12:28:16 miguelfreitas Exp $ + * $Id: dvdnav_events.h,v 1.10 2003/04/06 13:09:38 mroi Exp $ * */ @@ -99,7 +99,8 @@ typedef struct { int64_t cell_length; /*!< The length of the current cell in PTS ticks */ int64_t pg_length; /*!< The length of the current program in PTS ticks */ int64_t pgc_length; /*!< The length of the current program chain in PTS ticks */ - int64_t cell_start; /*!< The start of the current cell in PTS ticks */ + int64_t cell_start; /*!< The start time of the current cell relatively to the PGC in PTS ticks */ + int64_t pg_start; /*!< The start time of the current PG relatively to the PGC in PTS ticks */ } dvdnav_cell_change_event_t; /* FIXME: These are unused. */ -- cgit v1.2.3