diff dvdnav/dvdnav.h @ 409:9b8bfc56a7fe src

Add dvdnav_program_play & dvdnav_current_title_program Using title parts w/ dvdnav_part_play and dvdnav_current_title_info is not reliable for use as chapter marks in files made from transcoding. The start of a part does not necessarily fall strictly inside the main title. Parts can have an intro sequence before getting into the title. So we use program boundaries instead of part markers to test when we have reached a chapter point during encoding of the title. The same would apply to displaying the current chapter during playback. The program boundaries should be checked instead of looking for a part. Patch from John Stebbins. Thanks!
author erik
date Fri, 30 Jul 2010 23:34:16 +0000
parents 390fbf2a9602
children f30f443d3841
line wrap: on
line diff
--- a/dvdnav/dvdnav.h	Fri Jul 30 23:34:13 2010 +0000
+++ b/dvdnav/dvdnav.h	Fri Jul 30 23:34:16 2010 +0000
@@ -279,6 +279,11 @@
 dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part);
 
 /*
+ * Plays the specified title, starting from the specified program
+ */
+dvdnav_status_t dvdnav_program_play(dvdnav_t *this, int32_t title, int32_t pgcn, int32_t pgn);
+
+/*
  * Stores in *times an array (that the application *must* free) of
  * dvdtimes corresponding to the chapter times for the chosen title.
  * *duration will have the duration of the title
@@ -320,6 +325,13 @@
 					  int32_t *part);
 
 /*
+ * Return the title number, pgcn and pgn currently being played.
+ * A title of 0 indicates, we are in a menu.
+ */
+dvdnav_status_t dvdnav_current_title_program(dvdnav_t *self, int32_t *title,
+					  int32_t *pgcn, int32_t *pgn);
+
+/*
  * Return the current position (in blocks) within the current
  * title and the length (in blocks) of said title.
  *