changeset 19477:2a6520a36e96

implemented STREAM_CTRL_GET_NUM_CHAPTERS
author nicodvb
date Mon, 21 Aug 2006 19:16:39 +0000
parents edab36622800
children bab82c53e433
files stream/stream_dvdnav.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvdnav.c	Mon Aug 21 19:13:36 2006 +0000
+++ b/stream/stream_dvdnav.c	Mon Aug 21 19:16:39 2006 +0000
@@ -356,6 +356,17 @@
         break;
       return 1;
     }
+    case STREAM_CTRL_GET_NUM_CHAPTERS:
+    {
+      if(dvdnav_current_title_info(dvdnav_priv->dvdnav, &tit, &part) != DVDNAV_STATUS_OK)
+        break;
+      if(dvdnav_get_number_of_parts(dvdnav_priv->dvdnav, tit, &part) != DVDNAV_STATUS_OK)
+        break;
+      if(!part)
+        break;
+      *((unsigned int *)arg) = part;
+      return 1;
+    }
     case STREAM_CTRL_GET_CURRENT_CHAPTER:
     {
       if(dvdnav_current_title_info(dvdnav_priv->dvdnav, &tit, &part) != DVDNAV_STATUS_OK)