# HG changeset patch # User mroi # Date 1049634345 0 # Node ID 81b9602f780c3fbbdfdfeb9739f56f2892f10301 # Parent cd96ef8a62045d936258cc578fb5244bdd81513d report start of PG as well diff -r cd96ef8a6204 -r 81b9602f780c dvdnav.c --- a/dvdnav.c Sun Apr 06 12:47:32 2003 +0000 +++ b/dvdnav.c Sun Apr 06 13:05:45 2003 +0000 @@ -593,6 +593,7 @@ 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]; @@ -610,7 +611,12 @@ 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; this->position_current.cell_start = this->position_next.cell_start; @@ -1084,6 +1090,9 @@ /* * $Log$ + * Revision 1.52 2003/04/06 13:05:45 mroi + * report start of PG as well + * * Revision 1.51 2003/04/04 14:21:32 mroi * fill in new timing member in cell_change event * diff -r cd96ef8a6204 -r 81b9602f780c dvdnav_events.h --- a/dvdnav_events.h Sun Apr 06 12:47:32 2003 +0000 +++ b/dvdnav_events.h Sun Apr 06 13:05:45 2003 +0000 @@ -151,6 +151,7 @@ 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 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;