changeset 25177:a43d99a80f4a

-identify also shows the duration(s) of the title(s)
author nicodvb
date Thu, 29 Nov 2007 23:25:14 +0000
parents 6d9212e61af8
children e9d23081b4ab
files stream/stream_dvdnav.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvdnav.c	Thu Nov 29 23:01:46 2007 +0000
+++ b/stream/stream_dvdnav.c	Thu Nov 29 23:25:14 2007 +0000
@@ -350,10 +350,12 @@
 
 static void identify_chapters(dvdnav_t *nav, uint32_t title)
 {
-  uint64_t *parts=NULL;
+  uint64_t *parts=NULL, duration=0;
   uint32_t n, i, t;
-  n = dvdnav_describe_title_chapters(nav, title, &parts);
+  n = dvdnav_describe_title_chapters(nav, title, &parts, &duration);
   if(parts) {
+    t = duration / 90;
+    mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title, t / 1000, t % 1000);
     mp_msg(MSGT_IDENTIFY, MSGL_INFO, "TITLE %u, CHAPTERS: ", title);
     for(i=0; i<n; i++) {
       t = parts[i] /  90000;