#include <stdio.h>
#include <dvdread/dvd_reader.h>
#include <dvdread/ifo_types.h>
#include <dvdread/ifo_read.h>
#include <dvdread/nav_read.h>
#include <dvdread/nav_print.h>
int main(){
int titleid, chapid;
dvd_reader_t *dvd;
ifo_handle_t *vmg_file;
tt_srpt_t *tt_srpt;
dvd = DVDOpen("/dev/dvd");
vmg_file = ifoOpen(dvd,0);
tt_srpt = vmg_file->tt_srpt;
printf("There are %d titles on this DVD.\n",tt_srpt->nr_of_srpts);
printf("chapter 1 has %d chapters\n",tt_srpt->title[0].nr_of_ptts);
DVDClose(dvd);
return(0);
} |