changeset 19476:edab36622800

implemented STREAM_CTRL_GET_NUM_CHAPTERS
author nicodvb
date Mon, 21 Aug 2006 19:13:36 +0000
parents 1f117b5fb5a1
children 2a6520a36e96
files stream/stream_dvd.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Mon Aug 21 19:10:18 2006 +0000
+++ b/stream/stream_dvd.c	Mon Aug 21 19:13:36 2006 +0000
@@ -514,6 +514,12 @@
             *((unsigned int *)arg) = mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1);
             return 1;
         }
+        case STREAM_CTRL_GET_NUM_CHAPTERS:
+        {
+            if(! d->cur_pgc->nr_of_programs) return STREAM_UNSUPORTED;
+            *((unsigned int *)arg) = d->cur_pgc->nr_of_programs; 
+            return 1;
+        }
         case STREAM_CTRL_SEEK_TO_CHAPTER:
         {
             int r = seek_to_chapter(stream, d->vts_file, d->tt_srpt, d->cur_title-1, *((unsigned int *)arg));