comparison stream/stream_dvd.c @ 34386:206264c532f5

Add new stream control command STREAM_CTRL_GET_NUM_TITLES. This provides the total number of titles (aka tracks) of CDs / VCDs / DVDs. Additionally, add a titles property to the get_property slave command.
author ib
date Sat, 31 Dec 2011 12:20:08 +0000
parents c80d57ec577b
children 26eddbd6353a
comparison
equal deleted inserted replaced
34385:cd6376c5cc94 34386:206264c532f5
661 switch(cmd) 661 switch(cmd)
662 { 662 {
663 case STREAM_CTRL_GET_TIME_LENGTH: 663 case STREAM_CTRL_GET_TIME_LENGTH:
664 { 664 {
665 *((double *)arg) = (double) mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1)/1000.0; 665 *((double *)arg) = (double) mp_get_titleset_length(d->vts_file, d->tt_srpt, d->cur_title-1)/1000.0;
666 return 1;
667 }
668 case STREAM_CTRL_GET_NUM_TITLES:
669 {
670 *((unsigned int *)arg) = d->vmg_file->tt_srpt->nr_of_srpts;
666 return 1; 671 return 1;
667 } 672 }
668 case STREAM_CTRL_GET_NUM_CHAPTERS: 673 case STREAM_CTRL_GET_NUM_CHAPTERS:
669 { 674 {
670 int r; 675 int r;