Mercurial > libdvdnav.hg
comparison navigation.c @ 95:e7ebabe059b9 src
Start to get dvd mrl working in xine.
author | jcdutton |
---|---|
date | Mon, 16 Sep 2002 16:54:41 +0000 |
parents | e29110f67f3a |
children | b6834e6359cf |
comparison
equal
deleted
inserted
replaced
94:e29110f67f3a | 95:e7ebabe059b9 |
---|---|
60 (*titles) = vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts; | 60 (*titles) = vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts; |
61 | 61 |
62 return S_OK; | 62 return S_OK; |
63 } | 63 } |
64 | 64 |
65 /* This function should not be used. FIXME: Suggest alternative */ | 65 dvdnav_status_t dvdnav_get_number_of_parts(dvdnav_t *this, int title, int *parts) { |
66 dvdnav_status_t dvdnav_get_number_of_programs(dvdnav_t *this, int *programs) { | |
67 if(!this) | 66 if(!this) |
68 return S_ERR; | 67 return S_ERR; |
69 | 68 |
70 if(!programs) { | 69 if(!parts) { |
71 printerr("Passed a NULL pointer"); | 70 printerr("Passed a NULL pointer"); |
72 return S_ERR; | 71 return S_ERR; |
73 } | 72 } |
74 | 73 if(!this->started) { |
75 (*programs) = this->vm->state.pgc->nr_of_programs; | 74 printerr("Virtual DVD machine not started."); |
76 | 75 return S_ERR; |
76 } | |
77 if ((title < 1) || (title > vm_get_vmgi(this->vm)->tt_srpt->nr_of_srpts) ) { | |
78 printerr("Passed a title number out of range"); | |
79 return S_ERR; | |
80 } | |
81 (*parts) = vm_get_vmgi(this->vm)->tt_srpt->title[title-1].nr_of_ptts; | |
77 return S_OK; | 82 return S_OK; |
78 } | 83 } |
79 | 84 |
80 dvdnav_status_t dvdnav_current_title_info(dvdnav_t *this, int *title, int *part) { | 85 dvdnav_status_t dvdnav_current_title_info(dvdnav_t *this, int *title, int *part) { |
81 if(!this || !this->vm) | 86 if(!this || !this->vm) |