Mercurial > libdvdnav.hg
annotate dvdnav.c @ 151:6439d00b1363 src
fill in new timing member in cell_change event
| author | mroi |
|---|---|
| date | Fri, 04 Apr 2003 14:21:32 +0000 |
| parents | 0b302ca31859 |
| children | 81b9602f780c |
| rev | line source |
|---|---|
| 0 | 1 /* |
| 2 * Copyright (C) 2000 Rich Wareham <richwareham@users.sourceforge.net> | |
| 3 * | |
| 4 * This file is part of libdvdnav, a DVD navigation library. | |
| 5 * | |
| 6 * libdvdnav is free software; you can redistribute it and/or modify | |
| 7 * it under the terms of the GNU General Public License as published by | |
| 8 * the Free Software Foundation; either version 2 of the License, or | |
| 9 * (at your option) any later version. | |
| 10 * | |
| 11 * libdvdnav is distributed in the hope that it will be useful, | |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 * GNU General Public License for more details. | |
| 15 * | |
| 16 * You should have received a copy of the GNU General Public License | |
| 17 * along with this program; if not, write to the Free Software | |
| 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | |
| 19 * | |
| 20 * $Id$ | |
| 21 * | |
| 22 */ | |
| 23 | |
| 24 #ifdef HAVE_CONFIG_H | |
| 25 #include "config.h" | |
| 26 #endif | |
| 27 | |
| 31 | 28 /* |
| 29 #define LOG_DEBUG | |
| 30 */ | |
| 31 | |
| 0 | 32 #include <pthread.h> |
| 33 #include "dvdnav_internal.h" | |
| 34 #include "read_cache.h" | |
| 35 | |
| 36 #include <dvdread/nav_read.h> | |
| 37 | |
| 38 #include <stdlib.h> | |
| 39 #include <stdio.h> | |
| 84 | 40 #include <sys/time.h> |
| 0 | 41 |
|
97
c1dff1899bda
First patch for personalized dvd viewing. I have not tested it yet.
jcdutton
parents:
92
diff
changeset
|
42 #include "remap.h" |
|
c1dff1899bda
First patch for personalized dvd viewing. I have not tested it yet.
jcdutton
parents:
92
diff
changeset
|
43 |
| 114 | 44 static dvdnav_status_t dvdnav_clear(dvdnav_t * this) { |
| 45 /* clear everything except file, vm, mutex, readahead */ | |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
46 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
47 if (this->file) DVDCloseFile(this->file); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
48 this->file = NULL; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
49 this->open_vtsN = -1; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
50 this->open_domain = -1; |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
51 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
52 memset(&this->pci,0,sizeof(this->pci)); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
53 memset(&this->dsi,0,sizeof(this->dsi)); |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
54 |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
55 /* Set initial values of flags */ |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
56 this->position_current.still = 0; |
| 23 | 57 this->skip_still = 0; |
| 116 | 58 this->sync_wait = 0; |
| 59 this->sync_wait_skip = 0; | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
60 this->spu_clut_changed = 0; |
| 114 | 61 this->started = 0; |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
62 |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
63 dvdnav_read_cache_clear(this->cache); |
|
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
64 |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
65 return S_OK; |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
66 } |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
67 |
| 114 | 68 dvdnav_status_t dvdnav_open(dvdnav_t** dest, const char *path) { |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
69 dvdnav_t *this; |
| 84 | 70 struct timeval time; |
| 0 | 71 |
| 72 /* Create a new structure */ | |
| 100 | 73 fprintf(MSG_OUT, "libdvdnav: Using dvdnav version %s from http://dvd.sf.net\n", VERSION); |
| 82 | 74 |
| 0 | 75 (*dest) = NULL; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
76 this = (dvdnav_t*)malloc(sizeof(dvdnav_t)); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
77 if(!this) |
| 114 | 78 return S_ERR; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
79 memset(this, 0, (sizeof(dvdnav_t) ) ); /* Make sure this structure is clean */ |
| 114 | 80 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
81 pthread_mutex_init(&this->vm_lock, NULL); |
| 0 | 82 /* Initialise the error string */ |
| 83 printerr(""); | |
| 84 | |
| 85 /* Initialise the VM */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
86 this->vm = vm_new_vm(); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
87 if(!this->vm) { |
| 114 | 88 printerr("Error initialising the DVD VM."); |
| 92 | 89 pthread_mutex_destroy(&this->vm_lock); |
| 90 free(this); | |
| 0 | 91 return S_ERR; |
| 92 } | |
| 114 | 93 if(!vm_reset(this->vm, path)) { |
| 94 printerr("Error starting the VM / opening the DVD device."); | |
| 92 | 95 pthread_mutex_destroy(&this->vm_lock); |
| 96 vm_free_vm(this->vm); | |
| 97 free(this); | |
| 0 | 98 return S_ERR; |
| 99 } | |
| 100 | |
| 101 /* Set the path. FIXME: Is a deep copy 'right' */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
102 strncpy(this->path, path, MAX_PATH_LEN); |
| 0 | 103 |
| 104 /* Pre-open and close a file so that the CSS-keys are cached. */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
105 this->file = DVDOpenFile(vm_get_dvd_reader(this->vm), 0, DVD_READ_MENU_VOBS); |
| 0 | 106 |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
107 /* Start the read-ahead cache. */ |
|
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
108 this->cache = dvdnav_read_cache_new(this); |
| 84 | 109 |
| 114 | 110 /* Seed the random numbers. So that the DVD VM Command rand() |
| 111 * gives a different start value each time a DVD is played. */ | |
| 112 gettimeofday(&time, NULL); | |
| 84 | 113 srand(time.tv_usec); |
| 114 | |
| 114 | 115 dvdnav_clear(this); |
| 116 | |
| 117 (*dest) = this; | |
| 0 | 118 return S_OK; |
| 119 } | |
| 120 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
121 dvdnav_status_t dvdnav_close(dvdnav_t *this) { |
| 114 | 122 |
| 31 | 123 #ifdef LOG_DEBUG |
| 76 | 124 fprintf(MSG_OUT, "libdvdnav: close:called\n"); |
| 31 | 125 #endif |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
126 |
| 114 | 127 if(!this) { |
| 128 printerr("Passed a NULL pointer."); | |
| 129 return S_ERR; | |
| 130 } | |
| 131 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
132 if (this->file) { |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
133 DVDCloseFile(this->file); |
| 31 | 134 #ifdef LOG_DEBUG |
| 76 | 135 fprintf(MSG_OUT, "libdvdnav: close:file closing\n"); |
| 31 | 136 #endif |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
137 this->file = NULL; |
| 0 | 138 } |
| 139 | |
| 140 /* Free the VM */ | |
| 114 | 141 if(this->vm) |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
142 vm_free_vm(this->vm); |
| 114 | 143 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
144 pthread_mutex_destroy(&this->vm_lock); |
| 60 | 145 |
| 146 /* We leave the final freeing of the entire structure to the cache, | |
| 147 * because we don't know, if there are still buffers out in the wild, | |
| 148 * that must return first. */ | |
| 114 | 149 if(this->cache) |
| 60 | 150 dvdnav_read_cache_free(this->cache); |
| 114 | 151 else |
| 152 free(this); | |
| 0 | 153 |
| 154 return S_OK; | |
| 155 } | |
| 156 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
157 dvdnav_status_t dvdnav_reset(dvdnav_t *this) { |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
158 dvdnav_status_t result; |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
159 |
| 31 | 160 #ifdef LOG_DEBUG |
| 76 | 161 fprintf(MSG_OUT, "libdvdnav: reset:called\n"); |
| 31 | 162 #endif |
| 114 | 163 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
164 if(!this) { |
| 114 | 165 printerr("Passed a NULL pointer."); |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
166 return S_ERR; |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
167 } |
| 114 | 168 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
169 pthread_mutex_lock(&this->vm_lock); |
| 114 | 170 |
| 31 | 171 #ifdef LOG_DEBUG |
| 76 | 172 fprintf(MSG_OUT, "libdvdnav: reseting vm\n"); |
| 31 | 173 #endif |
| 114 | 174 if(!vm_reset(this->vm, NULL)) { |
| 175 printerr("Error restarting the VM."); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
176 pthread_mutex_unlock(&this->vm_lock); |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
177 return S_ERR; |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
178 } |
| 31 | 179 #ifdef LOG_DEBUG |
| 76 | 180 fprintf(MSG_OUT, "libdvdnav: clearing dvdnav\n"); |
| 31 | 181 #endif |
| 114 | 182 result = dvdnav_clear(this); |
| 183 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
184 pthread_mutex_unlock(&this->vm_lock); |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
185 return result; |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
186 } |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
187 |
| 114 | 188 dvdnav_status_t dvdnav_path(dvdnav_t *this, const char** path) { |
| 189 | |
| 190 if(!this || !path) { | |
| 191 printerr("Passed a NULL pointer."); | |
| 0 | 192 return S_ERR; |
| 193 } | |
| 194 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
195 (*path) = this->path; |
| 0 | 196 |
| 197 return S_OK; | |
| 198 } | |
| 199 | |
| 114 | 200 const char* dvdnav_err_to_string(dvdnav_t *this) { |
| 201 | |
| 202 if(!this) | |
|
3
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
203 return "Hey! You gave me a NULL pointer you naughty person!"; |
| 0 | 204 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
205 return this->err_str; |
| 0 | 206 } |
| 207 | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
208 /* converts a dvd_time_t to PTS ticks */ |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
209 static int64_t dvdnav_convert_time(dvd_time_t *time) { |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
210 int64_t result; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
211 int frames; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
212 |
| 135 | 213 result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000; |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
214 result += (time->hour & 0x0f) * 60 * 60 * 90000; |
| 135 | 215 result += (time->minute >> 4 ) * 10 * 60 * 90000; |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
216 result += (time->minute & 0x0f) * 60 * 90000; |
| 135 | 217 result += (time->second >> 4 ) * 10 * 90000; |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
218 result += (time->second & 0x0f) * 90000; |
| 135 | 219 |
| 220 frames = ((time->frame_u & 0x30) >> 4) * 10; | |
| 221 frames += ((time->frame_u & 0x0f) ) ; | |
| 222 | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
223 if (time->frame_u & 0x80) |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
224 result += frames * 3000; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
225 else |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
226 result += frames * 3600; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
227 |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
228 return result; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
229 } |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
230 |
| 114 | 231 /* |
| 0 | 232 * Returns 1 if block contains NAV packet, 0 otherwise. |
| 233 * Precesses said NAV packet if present. | |
| 234 * | |
| 235 * Most of the code in here is copied from xine's MPEG demuxer | |
| 236 * so any bugs which are found in that should be corrected here also. | |
| 237 */ | |
| 114 | 238 static int dvdnav_decode_packet(dvdnav_t *this, uint8_t *p, dsi_t *nav_dsi, pci_t *nav_pci) { |
| 239 int bMpeg1 = 0; | |
| 0 | 240 uint32_t nHeaderLen; |
| 241 uint32_t nPacketLen; | |
| 242 uint32_t nStreamID; | |
| 243 | |
| 244 if (p[3] == 0xBA) { /* program stream pack header */ | |
| 245 int nStuffingBytes; | |
| 246 | |
| 247 bMpeg1 = (p[4] & 0x40) == 0; | |
| 248 | |
| 249 if (bMpeg1) { | |
| 114 | 250 p += 12; |
| 0 | 251 } else { /* mpeg2 */ |
| 252 nStuffingBytes = p[0xD] & 0x07; | |
| 253 p += 14 + nStuffingBytes; | |
| 254 } | |
| 255 } | |
| 256 | |
| 257 if (p[3] == 0xbb) { /* program stream system header */ | |
| 258 nHeaderLen = (p[4] << 8) | p[5]; | |
| 259 p += 6 + nHeaderLen; | |
| 260 } | |
| 261 | |
| 262 /* we should now have a PES packet here */ | |
| 263 if (p[0] || p[1] || (p[2] != 1)) { | |
| 76 | 264 fprintf(MSG_OUT, "libdvdnav: demux error! %02x %02x %02x (should be 0x000001) \n",p[0],p[1],p[2]); |
| 0 | 265 return 0; |
| 266 } | |
| 267 | |
| 268 nPacketLen = p[4] << 8 | p[5]; | |
| 269 nStreamID = p[3]; | |
| 270 | |
| 271 nHeaderLen = 6; | |
| 272 p += nHeaderLen; | |
| 273 | |
| 274 if (nStreamID == 0xbf) { /* Private stream 2 */ | |
| 114 | 275 #if 0 |
| 276 int i; | |
| 277 fprintf(MSG_OUT, "libdvdnav: nav packet=%u\n",p-p_start-6); | |
| 278 for(i=0;i<80;i++) | |
| 279 fprintf(MSG_OUT, "%02x ",p[i-6]); | |
| 280 fprintf(MSG_OUT, "\n"); | |
| 281 #endif | |
| 282 | |
| 0 | 283 if(p[0] == 0x00) { |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
284 navRead_PCI(nav_pci, p+1); |
| 0 | 285 } |
| 286 | |
| 287 p += nPacketLen; | |
| 288 | |
| 289 /* We should now have a DSI packet. */ | |
| 290 if(p[6] == 0x01) { | |
| 291 nPacketLen = p[4] << 8 | p[5]; | |
| 292 p += 6; | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
293 navRead_DSI(nav_dsi, p+1); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
294 } |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
295 return 1; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
296 } |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
297 return 0; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
298 } |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
299 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
300 /* DSI is used for most angle stuff. |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
301 * PCI is used for only non-seemless angle stuff |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
302 */ |
| 114 | 303 static int dvdnav_get_vobu(dvdnav_t *this, dsi_t *nav_dsi, pci_t *nav_pci, dvdnav_vobu_t *vobu) { |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
304 uint32_t next; |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
305 int angle, num_angle; |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
306 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
307 vobu->vobu_start = nav_dsi->dsi_gi.nv_pck_lbn; /* Absolute offset from start of disk */ |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
308 vobu->vobu_length = nav_dsi->dsi_gi.vobu_ea; /* Relative offset from vobu_start */ |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
309 |
|
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
42
diff
changeset
|
310 /* |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
311 * If we're not at the end of this cell, we can determine the next |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
312 * VOBU to display using the VOBU_SRI information section of the |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
313 * DSI. Using this value correctly follows the current angle, |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
314 * avoiding the doubled scenes in The Matrix, and makes our life |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
315 * really happy. |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
316 * |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
317 * vobu_next is an offset value, 0x3fffffff = SRI_END_OF_CELL |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
318 * DVDs are about 6 Gigs, which is only up to 0x300000 blocks |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
319 * Should really assert if bit 31 != 1 |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
320 */ |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
321 |
| 114 | 322 #if 0 |
| 323 /* Old code -- may still be useful one day */ | |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
324 if(nav_dsi->vobu_sri.next_vobu != SRI_END_OF_CELL ) { |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
325 vobu->vobu_next = ( nav_dsi->vobu_sri.next_vobu & 0x3fffffff ); |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
326 } else { |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
327 vobu->vobu_next = vobu->vobu_length; |
| 114 | 328 } |
| 329 #else | |
| 330 /* Relative offset from vobu_start */ | |
| 331 vobu->vobu_next = ( nav_dsi->vobu_sri.next_vobu & 0x3fffffff ); | |
| 332 #endif | |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
333 |
| 114 | 334 vm_get_angle_info(this->vm, &angle, &num_angle); |
| 335 | |
| 336 /* FIMXE: The angle reset doesn't work for some reason for the moment */ | |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
337 #if 0 |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
338 if((num_angle < angle) && (angle != 1)) { |
| 114 | 339 fprintf(MSG_OUT, "libdvdnav: angle ends!\n"); |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
340 |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
341 /* This is to switch back to angle one when we |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
342 * finish with angles. */ |
| 114 | 343 dvdnav_angle_change(this, 1); |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
344 } |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
345 #endif |
| 0 | 346 |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
347 if(num_angle != 0) { |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
348 |
| 114 | 349 if((next = nav_pci->nsml_agli.nsml_agl_dsta[angle-1]) != 0) { |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
350 if((next & 0x3fffffff) != 0) { |
| 114 | 351 if(next & 0x80000000) |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
352 vobu->vobu_next = - (int32_t)(next & 0x3fffffff); |
| 114 | 353 else |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
354 vobu->vobu_next = + (int32_t)(next & 0x3fffffff); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
355 } |
| 114 | 356 } else if((next = nav_dsi->sml_agli.data[angle-1].address) != 0) { |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
357 vobu->vobu_length = nav_dsi->sml_pbi.ilvu_ea; |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
358 |
| 114 | 359 if((next & 0x80000000) && (next != 0x7fffffff)) |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
360 vobu->vobu_next = - (int32_t)(next & 0x3fffffff); |
| 114 | 361 else |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
362 vobu->vobu_next = + (int32_t)(next & 0x3fffffff); |
| 0 | 363 } |
| 364 } | |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
365 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
366 return 1; |
| 0 | 367 } |
| 60 | 368 |
| 114 | 369 /* |
| 370 * These are the main get_next_block function which actually get the media stream video and audio etc. | |
| 371 * | |
| 372 * There are two versions: The second one is using the zero-copy read ahead cache and therefore | |
| 373 * hands out pointers targetting directly into the cache. | |
| 374 * The first one uses a memcopy to fill this cache block into the application provided memory. | |
| 375 * The benefit of this first one is that no special memory management is needed. The application is | |
| 376 * the only one responsible of allocating and freeing the memory associated with the pointer. | |
| 377 * The drawback is the additional memcopy. | |
| 28 | 378 */ |
| 60 | 379 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
380 dvdnav_status_t dvdnav_get_next_block(dvdnav_t *this, unsigned char *buf, |
| 114 | 381 int *event, int *len) { |
| 60 | 382 unsigned char *block; |
| 383 dvdnav_status_t status; | |
| 384 | |
| 385 block = buf; | |
| 386 status = dvdnav_get_next_cache_block(this, &block, event, len); | |
| 114 | 387 if (status == S_OK && block != buf) { |
| 60 | 388 /* we received a block from the cache, copy it, so we can give it back */ |
| 389 memcpy(buf, block, DVD_VIDEO_LB_LEN); | |
| 390 dvdnav_free_cache_block(this, block); | |
| 391 } | |
| 392 return status; | |
| 393 } | |
| 394 | |
| 395 dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, unsigned char **buf, | |
| 114 | 396 int *event, int *len) { |
| 0 | 397 dvd_state_t *state; |
| 398 int result; | |
| 114 | 399 |
| 60 | 400 if(!this || !event || !len || !buf || !*buf) { |
| 114 | 401 printerr("Passed a NULL pointer."); |
| 0 | 402 return S_ERR; |
| 403 } | |
| 114 | 404 |
| 405 pthread_mutex_lock(&this->vm_lock); | |
| 0 | 406 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
407 if(!this->started) { |
| 0 | 408 /* Start the VM */ |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
409 vm_start(this->vm); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
410 this->started = 1; |
| 0 | 411 } |
| 412 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
413 state = &(this->vm->state); |
| 0 | 414 (*event) = DVDNAV_NOP; |
| 415 (*len) = 0; | |
| 416 | |
| 417 /* Check the STOP flag */ | |
| 114 | 418 if(this->vm->stopped) { |
| 121 | 419 vm_stop(this->vm); |
| 0 | 420 (*event) = DVDNAV_STOP; |
| 114 | 421 this->started = 0; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
422 pthread_mutex_unlock(&this->vm_lock); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
423 return S_OK; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
424 } |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
425 |
| 114 | 426 vm_position_get(this->vm, &this->position_next); |
| 0 | 427 |
| 126 | 428 #ifdef LOG_DEBUG |
| 114 | 429 fprintf(MSG_OUT, "libdvdnav: POS-NEXT "); |
| 430 vm_position_print(this->vm, &this->position_next); | |
| 116 | 431 fprintf(MSG_OUT, "libdvdnav: POS-CUR "); |
| 114 | 432 vm_position_print(this->vm, &this->position_current); |
| 31 | 433 #endif |
| 114 | 434 |
| 435 /* did we hop? */ | |
| 436 if(this->position_current.hop_channel != this->position_next.hop_channel) { | |
| 437 (*event) = DVDNAV_HOP_CHANNEL; | |
| 58 | 438 #ifdef LOG_DEBUG |
| 114 | 439 fprintf(MSG_OUT, "libdvdnav: HOP_CHANNEL\n"); |
| 31 | 440 #endif |
| 115 | 441 if (this->position_next.hop_channel - this->position_current.hop_channel >= HOP_SEEK) { |
| 114 | 442 int num_angles = 0, current; |
| 443 | |
| 444 /* we seeked -> check for multiple angles */ | |
| 445 vm_get_angle_info(this->vm, ¤t, &num_angles); | |
| 446 if (num_angles > 1) { | |
| 447 int result, block; | |
| 448 /* we have to skip the first VOBU when seeking in a multiangle feature, | |
| 449 * because it might belong to the wrong angle */ | |
| 450 block = this->position_next.cell_start + this->position_next.block; | |
| 451 result = dvdnav_read_cache_block(this->cache, block, 1, buf); | |
| 452 if(result <= 0) { | |
| 453 printerr("Error reading NAV packet."); | |
| 454 pthread_mutex_unlock(&this->vm_lock); | |
| 455 return S_ERR; | |
| 456 } | |
| 457 /* Decode nav into pci and dsi. Then get next VOBU info. */ | |
| 458 if(!dvdnav_decode_packet(this, *buf, &this->dsi, &this->pci)) { | |
| 459 printerr("Expected NAV packet but none found."); | |
| 460 pthread_mutex_unlock(&this->vm_lock); | |
| 461 return S_ERR; | |
| 462 } | |
| 463 dvdnav_get_vobu(this, &this->dsi, &this->pci, &this->vobu); | |
| 464 /* skip to next, if there is a next */ | |
| 465 if (this->vobu.vobu_next != SRI_END_OF_CELL) { | |
| 466 this->vobu.vobu_start += this->vobu.vobu_next; | |
| 467 this->vobu.vobu_next = 0; | |
| 468 } | |
| 469 /* update VM state */ | |
| 470 this->vm->state.blockN = this->vobu.vobu_start - this->position_next.cell_start; | |
| 471 } | |
| 472 } | |
| 473 this->position_current.hop_channel = this->position_next.hop_channel; | |
|
141
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
474 /* update VOBU info */ |
|
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
475 this->vobu.vobu_start = this->position_next.cell_start + this->position_next.block; |
|
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
476 this->vobu.vobu_next = 0; |
| 127 | 477 /* Make blockN == vobu_length to do expected_nav */ |
| 114 | 478 this->vobu.vobu_length = 0; |
| 127 | 479 this->vobu.blockN = 0; |
| 116 | 480 this->sync_wait = 0; |
| 30 | 481 pthread_mutex_unlock(&this->vm_lock); |
| 482 return S_OK; | |
| 0 | 483 } |
| 484 | |
| 116 | 485 /* Check the HIGHLIGHT flag */ |
| 486 if(this->position_current.button != this->position_next.button) { | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
487 dvdnav_highlight_event_t *hevent = (dvdnav_highlight_event_t *)*buf; |
| 116 | 488 |
| 489 (*event) = DVDNAV_HIGHLIGHT; | |
| 490 #ifdef LOG_DEBUG | |
| 491 fprintf(MSG_OUT, "libdvdnav: HIGHLIGHT\n"); | |
| 492 #endif | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
493 (*len) = sizeof(dvdnav_highlight_event_t); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
494 hevent->display = 1; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
495 hevent->buttonN = this->position_next.button; |
| 116 | 496 this->position_current.button = this->position_next.button; |
| 497 pthread_mutex_unlock(&this->vm_lock); | |
| 498 return S_OK; | |
| 499 } | |
| 500 | |
| 501 /* Check the WAIT flag */ | |
| 502 if(this->sync_wait) { | |
| 503 (*event) = DVDNAV_WAIT; | |
| 504 #ifdef LOG_DEBUG | |
| 505 fprintf(MSG_OUT, "libdvdnav: WAIT\n"); | |
| 506 #endif | |
| 507 (*len) = 0; | |
| 508 pthread_mutex_unlock(&this->vm_lock); | |
| 509 return S_OK; | |
| 510 } | |
| 511 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
512 /* Check to see if we need to change the currently opened VOB */ |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
513 if((this->position_current.vts != this->position_next.vts) || |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
514 (this->position_current.domain != this->position_next.domain)) { |
| 0 | 515 dvd_read_domain_t domain; |
| 516 int vtsN; | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
517 dvdnav_vts_change_event_t *vts_event = (dvdnav_vts_change_event_t *)*buf; |
| 0 | 518 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
519 if(this->file) { |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
520 DVDCloseFile(this->file); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
521 this->file = NULL; |
| 0 | 522 } |
| 523 | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
524 vts_event->old_vtsN = this->open_vtsN; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
525 vts_event->old_domain = this->open_domain; |
| 0 | 526 |
| 114 | 527 /* Use the DOMAIN to find whether to open menu or title VOBs */ |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
528 switch(this->position_next.domain) { |
| 114 | 529 case FP_DOMAIN: |
| 530 case VMGM_DOMAIN: | |
| 0 | 531 domain = DVD_READ_MENU_VOBS; |
| 532 vtsN = 0; | |
| 533 break; | |
| 114 | 534 case VTSM_DOMAIN: |
| 0 | 535 domain = DVD_READ_MENU_VOBS; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
536 vtsN = this->position_next.vts; |
| 0 | 537 break; |
| 114 | 538 case VTS_DOMAIN: |
| 0 | 539 domain = DVD_READ_TITLE_VOBS; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
540 vtsN = this->position_next.vts; |
| 0 | 541 break; |
| 114 | 542 default: |
| 0 | 543 printerr("Unknown domain when changing VTS."); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
544 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 545 return S_ERR; |
| 546 } | |
| 547 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
548 this->position_current.vts = this->position_next.vts; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
549 this->position_current.domain = this->position_next.domain; |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
550 dvdnav_read_cache_clear(this->cache); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
551 this->file = DVDOpenFile(vm_get_dvd_reader(this->vm), vtsN, domain); |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
552 vts_event->new_vtsN = this->position_next.vts; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
553 vts_event->new_domain = this->position_next.domain; |
| 0 | 554 |
| 555 /* If couldn't open the file for some reason, moan */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
556 if(this->file == NULL) { |
| 0 | 557 printerrf("Error opening vtsN=%i, domain=%i.", vtsN, domain); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
558 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 559 return S_ERR; |
| 560 } | |
| 561 | |
| 562 /* File opened successfully so return a VTS change event */ | |
| 563 (*event) = DVDNAV_VTS_CHANGE; | |
| 114 | 564 #ifdef LOG_DEBUG |
| 565 fprintf(MSG_OUT, "libdvdnav: VTS_CHANGE\n"); | |
| 566 #endif | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
567 (*len) = sizeof(dvdnav_vts_change_event_t); |
| 0 | 568 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
569 this->spu_clut_changed = 1; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
570 this->position_current.cell = -1; /* Force an update */ |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
571 this->position_current.spu_channel = -1; /* Force an update */ |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
572 this->position_current.audio_channel = -1; /* Force an update */; |
| 0 | 573 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
574 pthread_mutex_unlock(&this->vm_lock); |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
575 return S_OK; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
576 } |
| 114 | 577 |
| 578 /* Check if the cell changed */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
579 if( (this->position_current.cell != this->position_next.cell) || |
|
50
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
580 (this->position_current.cell_restart != this->position_next.cell_restart) || |
| 114 | 581 (this->position_current.cell_start != this->position_next.cell_start) ) { |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
582 dvdnav_cell_change_event_t *cell_event = (dvdnav_cell_change_event_t *)*buf; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
583 int first_cell_nr, last_cell_nr, i; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
584 dvd_state_t *state = &this->vm->state; |
| 114 | 585 |
| 586 (*event) = DVDNAV_CELL_CHANGE; | |
| 587 #ifdef LOG_DEBUG | |
| 588 fprintf(MSG_OUT, "libdvdnav: CELL_CHANGE\n"); | |
| 589 #endif | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
590 (*len) = sizeof(dvdnav_cell_change_event_t); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
591 |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
592 cell_event->cellN = state->cellN; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
593 cell_event->pgN = state->pgN; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
594 cell_event->cell_length = |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
595 dvdnav_convert_time(&state->pgc->cell_playback[state->cellN-1].playback_time); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
596 cell_event->pg_length = 0; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
597 /* Find start cell of program. */ |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
598 first_cell_nr = state->pgc->program_map[state->pgN-1]; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
599 /* Find end cell of program */ |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
600 if(state->pgN < state->pgc->nr_of_programs) |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
601 last_cell_nr = state->pgc->program_map[state->pgN] - 1; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
602 else |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
603 last_cell_nr = state->pgc->nr_of_cells; |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
604 for (i = first_cell_nr; i <= last_cell_nr; i++) |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
605 cell_event->pg_length += |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
606 dvdnav_convert_time(&state->pgc->cell_playback[i - 1].playback_time); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
607 cell_event->pgc_length = dvdnav_convert_time(&state->pgc->playback_time); |
| 151 | 608 |
| 609 cell_event->cell_start = 0; | |
| 610 for (i = 1; i < state->cellN; i++) | |
| 611 cell_event->cell_start += | |
| 612 dvdnav_convert_time(&state->pgc->cell_playback[i - 1].playback_time); | |
| 114 | 613 |
| 614 this->position_current.cell = this->position_next.cell; | |
|
50
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
615 this->position_current.cell_restart = this->position_next.cell_restart; |
| 114 | 616 this->position_current.cell_start = this->position_next.cell_start; |
| 617 this->position_current.block = this->position_next.block; | |
| 618 | |
| 619 /* vobu info is used for mid cell resumes */ | |
| 620 this->vobu.vobu_start = this->position_next.cell_start + this->position_next.block; | |
| 621 this->vobu.vobu_next = 0; | |
| 127 | 622 /* Make blockN == vobu_length to do expected_nav */ |
| 114 | 623 this->vobu.vobu_length = 0; |
| 127 | 624 this->vobu.blockN = 0; |
| 114 | 625 |
| 626 /* update the spu palette at least on PGC changes */ | |
| 627 this->spu_clut_changed = 1; | |
| 628 this->position_current.spu_channel = -1; /* Force an update */ | |
| 629 this->position_current.audio_channel = -1; /* Force an update */ | |
| 630 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
631 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 632 return S_OK; |
| 633 } | |
| 634 | |
| 114 | 635 /* has the CLUT changed? */ |
| 636 if(this->spu_clut_changed) { | |
| 637 (*event) = DVDNAV_SPU_CLUT_CHANGE; | |
| 638 #ifdef LOG_DEBUG | |
| 639 fprintf(MSG_OUT, "libdvdnav: SPU_CLUT_CHANGE\n"); | |
| 640 #endif | |
| 641 (*len) = 16 * sizeof(uint32_t); | |
| 642 memcpy(*buf, &(state->pgc->palette), 16 * sizeof(uint32_t)); | |
| 643 this->spu_clut_changed = 0; | |
| 644 pthread_mutex_unlock(&this->vm_lock); | |
| 645 return S_OK; | |
| 646 } | |
| 647 | |
| 648 /* has the SPU channel changed? */ | |
| 649 if(this->position_current.spu_channel != this->position_next.spu_channel) { | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
650 dvdnav_spu_stream_change_event_t *stream_change = (dvdnav_spu_stream_change_event_t *)*buf; |
| 114 | 651 |
| 652 (*event) = DVDNAV_SPU_STREAM_CHANGE; | |
| 653 #ifdef LOG_DEBUG | |
| 654 fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE\n"); | |
| 655 #endif | |
| 656 (*len) = sizeof(dvdnav_spu_stream_change_event_t); | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
657 stream_change->physical_wide = vm_get_subp_active_stream(this->vm, 0); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
658 stream_change->physical_letterbox = vm_get_subp_active_stream(this->vm, 1); |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
659 stream_change->physical_pan_scan = vm_get_subp_active_stream(this->vm, 2); |
| 114 | 660 this->position_current.spu_channel = this->position_next.spu_channel; |
| 661 #ifdef LOG_DEBUG | |
|
143
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
662 fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_wide=%d\n",stream_change->physical_wide); |
|
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
663 fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_letterbox=%d\n",stream_change->physical_letterbox); |
|
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
664 fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_pan_scan=%d\n",stream_change->physical_pan_scan); |
| 114 | 665 #endif |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
666 if (stream_change->physical_wide != -1 && |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
667 stream_change->physical_letterbox != -1 && |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
668 stream_change->physical_pan_scan != -1) { |
| 114 | 669 #ifdef LOG_DEBUG |
| 670 fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE returning S_OK\n"); | |
| 671 #endif | |
| 672 pthread_mutex_unlock(&this->vm_lock); | |
| 673 return S_OK; | |
| 674 } | |
| 675 } | |
| 0 | 676 |
| 114 | 677 /* has the audio channel changed? */ |
| 678 if(this->position_current.audio_channel != this->position_next.audio_channel) { | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
679 dvdnav_audio_stream_change_event_t *stream_change = (dvdnav_audio_stream_change_event_t *)*buf; |
| 114 | 680 |
| 681 (*event) = DVDNAV_AUDIO_STREAM_CHANGE; | |
| 682 #ifdef LOG_DEBUG | |
| 683 fprintf(MSG_OUT, "libdvdnav: AUDIO_STREAM_CHANGE\n"); | |
| 684 #endif | |
| 685 (*len) = sizeof(dvdnav_audio_stream_change_event_t); | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
686 stream_change->physical = vm_get_audio_active_stream( this->vm ); |
| 114 | 687 this->position_current.audio_channel = this->position_next.audio_channel; |
| 688 #ifdef LOG_DEBUG | |
|
143
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
689 fprintf(MSG_OUT, "libdvdnav: AUDIO_STREAM_CHANGE stream_id=%d returning S_OK\n",stream_change->physical); |
| 114 | 690 #endif |
| 691 pthread_mutex_unlock(&this->vm_lock); | |
| 692 return S_OK; | |
| 693 } | |
| 694 | |
| 695 /* Check the STILLFRAME flag */ | |
| 696 if(this->position_current.still != 0) { | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
697 dvdnav_still_event_t *still_event = (dvdnav_still_event_t *)*buf; |
| 114 | 698 |
| 699 (*event) = DVDNAV_STILL_FRAME; | |
| 700 #ifdef LOG_DEBUG | |
| 701 fprintf(MSG_OUT, "libdvdnav: STILL_FRAME\n"); | |
| 702 #endif | |
| 703 (*len) = sizeof(dvdnav_still_event_t); | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
704 still_event->length = this->position_current.still; |
| 114 | 705 pthread_mutex_unlock(&this->vm_lock); |
| 706 return S_OK; | |
| 707 } | |
| 708 | |
| 709 /* Have we reached the end of a VOBU? */ | |
| 710 if (this->vobu.blockN >= this->vobu.vobu_length) { | |
| 711 | |
| 712 /* Have we reached the end of a cell? */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
713 if(this->vobu.vobu_next == SRI_END_OF_CELL) { |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
714 /* End of Cell from NAV DSI info */ |
| 31 | 715 #ifdef LOG_DEBUG |
| 76 | 716 fprintf(MSG_OUT, "libdvdnav: Still set to %x\n", this->position_next.still); |
| 31 | 717 #endif |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
718 this->position_current.still = this->position_next.still; |
| 0 | 719 |
| 116 | 720 /* we are about to leave a cell, so a lot of state changes could occur; |
| 721 * under certain conditions, the application should get in sync with us before this, | |
| 722 * otherwise it might show stills or menus too shortly */ | |
| 723 if ((this->position_current.still || this->pci.hli.hl_gi.hli_ss) && !this->sync_wait_skip) { | |
| 724 this->sync_wait = 1; | |
| 725 } else { | |
| 726 if( this->position_current.still == 0 || this->skip_still ) { | |
| 727 /* no active cell still -> get us to the next cell */ | |
| 728 vm_get_next_cell(this->vm); | |
| 729 this->position_current.still = 0; /* still gets activated at end of cell */ | |
| 730 this->skip_still = 0; | |
| 731 this->sync_wait_skip = 0; | |
| 732 } | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
733 } |
| 114 | 734 /* handle related state changes in next iteration */ |
| 735 (*event) = DVDNAV_NOP; | |
| 736 (*len) = 0; | |
| 737 pthread_mutex_unlock(&this->vm_lock); | |
| 738 return S_OK; | |
| 739 } | |
| 0 | 740 |
| 114 | 741 /* Perform remapping jump if necessary (this is always a |
| 0 | 742 * VOBU boundary). */ |
| 114 | 743 if (this->vm->map) { |
| 744 this->vobu.vobu_next = remap_block( this->vm->map, | |
| 745 this->vm->state.domain, this->vm->state.TTN_REG, | |
| 746 this->vm->state.pgN, | |
| 747 this->vobu.vobu_start, this->vobu.vobu_next); | |
| 748 } | |
| 0 | 749 |
| 114 | 750 /* at the start of the next VOBU -> expecting NAV packet */ |
| 45 | 751 result = dvdnav_read_cache_block(this->cache, this->vobu.vobu_start + this->vobu.vobu_next, 1, buf); |
| 0 | 752 |
| 753 if(result <= 0) { | |
| 754 printerr("Error reading NAV packet."); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
755 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 756 return S_ERR; |
| 757 } | |
| 114 | 758 /* Decode nav into pci and dsi. Then get next VOBU info. */ |
| 759 if(!dvdnav_decode_packet(this, *buf, &this->dsi, &this->pci)) { | |
| 0 | 760 printerr("Expected NAV packet but none found."); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
761 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 762 return S_ERR; |
| 763 } | |
| 114 | 764 /* We need to update the vm state->blockN with which VOBU we are in. |
| 765 * This is so RSM resumes to the VOBU level and not just the CELL level. | |
| 28 | 766 */ |
| 114 | 767 this->vm->state.blockN = this->vobu.vobu_start - this->position_current.cell_start; |
| 768 | |
| 769 dvdnav_get_vobu(this, &this->dsi, &this->pci, &this->vobu); | |
| 770 this->vobu.blockN = 0; | |
| 771 /* Give the cache a hint about the size of next VOBU. | |
| 772 * This improves pre-caching, because the VOBU will almost certainly be read entirely. | |
| 45 | 773 */ |
| 774 dvdnav_pre_cache_blocks(this->cache, this->vobu.vobu_start+1, this->vobu.vobu_length+1); | |
| 0 | 775 |
| 776 /* Successfully got a NAV packet */ | |
| 777 (*event) = DVDNAV_NAV_PACKET; | |
| 114 | 778 #ifdef LOG_DEBUG |
| 779 fprintf(MSG_OUT, "libdvdnav: NAV_PACKET\n"); | |
| 780 #endif | |
|
3
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
781 (*len) = 2048; |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
782 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 783 return S_OK; |
| 784 } | |
| 785 | |
| 786 /* If we've got here, it must just be a normal block. */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
787 if(!this->file) { |
| 114 | 788 printerr("Attempting to read without opening file."); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
789 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 790 return S_ERR; |
| 791 } | |
| 792 | |
| 114 | 793 this->vobu.blockN++; |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
794 result = dvdnav_read_cache_block(this->cache, this->vobu.vobu_start + this->vobu.blockN, 1, buf); |
| 0 | 795 if(result <= 0) { |
| 796 printerr("Error reading from DVD."); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
797 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 798 return S_ERR; |
| 799 } | |
| 114 | 800 (*event) = DVDNAV_BLOCK_OK; |
| 0 | 801 (*len) = 2048; |
| 802 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
803 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 804 return S_OK; |
| 805 } | |
| 806 | |
| 114 | 807 dvdnav_status_t dvdnav_get_title_string(dvdnav_t *this, const char **title_str) { |
| 808 | |
| 809 if(!this || !title_str) { | |
| 810 printerr("Passed a NULL pointer."); | |
| 811 return S_ERR; | |
| 812 } | |
| 813 | |
| 814 (*title_str) = this->vm->dvd_name; | |
| 815 return S_OK; | |
| 816 } | |
| 817 | |
| 818 uint8_t dvdnav_get_video_aspect(dvdnav_t *this) { | |
| 819 uint8_t retval; | |
| 820 | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
821 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
822 printerr("Passed a NULL pointer."); |
| 114 | 823 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
824 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
825 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
826 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
827 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
828 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
829 |
| 114 | 830 pthread_mutex_lock(&this->vm_lock); |
| 831 retval = (uint8_t)vm_get_video_aspect(this->vm); | |
| 832 pthread_mutex_unlock(&this->vm_lock); | |
| 833 | |
| 834 return retval; | |
| 835 } | |
| 836 | |
| 837 uint8_t dvdnav_get_video_scale_permission(dvdnav_t *this) { | |
| 838 uint8_t retval; | |
| 839 | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
840 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
841 printerr("Passed a NULL pointer."); |
| 114 | 842 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
843 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
844 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
845 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
846 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
847 } |
| 114 | 848 |
| 849 pthread_mutex_lock(&this->vm_lock); | |
| 850 retval = (uint8_t)vm_get_video_scale_permission(this->vm); | |
| 851 pthread_mutex_unlock(&this->vm_lock); | |
| 852 | |
| 853 return retval; | |
| 854 } | |
| 855 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
856 uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *this, uint8_t stream) { |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
857 audio_attr_t attr; |
| 0 | 858 |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
859 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
860 printerr("Passed a NULL pointer."); |
| 0 | 861 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
862 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
863 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
864 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
865 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
866 } |
| 0 | 867 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
868 pthread_mutex_lock(&this->vm_lock); |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
869 attr = vm_get_audio_attr(this->vm, stream); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
870 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 871 |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
872 if(attr.lang_type != 1) |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
873 return 0xffff; |
| 0 | 874 |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
875 return attr.lang_code; |
| 0 | 876 } |
| 877 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
878 uint16_t dvdnav_spu_stream_to_lang(dvdnav_t *this, uint8_t stream) { |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
879 subp_attr_t attr; |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
880 |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
881 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
882 printerr("Passed a NULL pointer."); |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
883 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
884 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
885 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
886 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
887 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
888 } |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
889 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
890 pthread_mutex_lock(&this->vm_lock); |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
891 attr = vm_get_subp_attr(this->vm, stream); |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
892 pthread_mutex_unlock(&this->vm_lock); |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
893 |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
894 if(attr.type != 1) |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
895 return 0xffff; |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
896 |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
897 return attr.lang_code; |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
898 } |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
899 |
| 114 | 900 int8_t dvdnav_get_audio_logical_stream(dvdnav_t *this, uint8_t audio_num) { |
| 901 int8_t retval; | |
| 902 | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
903 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
904 printerr("Passed a NULL pointer."); |
| 114 | 905 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
906 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
907 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
908 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
909 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
910 } |
| 114 | 911 |
| 912 pthread_mutex_lock(&this->vm_lock); | |
| 913 if (!this->vm->state.pgc) { | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
914 printerr("No current PGC."); |
| 114 | 915 pthread_mutex_unlock(&this->vm_lock); |
| 916 return -1; | |
| 917 } | |
| 918 retval = vm_get_audio_stream(this->vm, audio_num); | |
| 919 pthread_mutex_unlock(&this->vm_lock); | |
| 920 | |
| 921 return retval; | |
| 922 } | |
| 923 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
924 int8_t dvdnav_get_spu_logical_stream(dvdnav_t *this, uint8_t subp_num) { |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
925 int8_t retval; |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
926 |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
927 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
928 printerr("Passed a NULL pointer."); |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
929 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
930 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
931 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
932 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
933 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
934 } |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
935 |
| 114 | 936 pthread_mutex_lock(&this->vm_lock); |
| 937 if (!this->vm->state.pgc) { | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
938 printerr("No current PGC."); |
| 114 | 939 pthread_mutex_unlock(&this->vm_lock); |
| 940 return -1; | |
| 941 } | |
| 942 retval = vm_get_subp_stream(this->vm, subp_num, 0); | |
| 943 pthread_mutex_unlock(&this->vm_lock); | |
| 944 | |
| 945 return retval; | |
| 946 } | |
| 947 | |
| 948 int8_t dvdnav_get_active_audio_stream(dvdnav_t *this) { | |
| 949 int8_t retval; | |
| 950 | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
951 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
952 printerr("Passed a NULL pointer."); |
| 114 | 953 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
954 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
955 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
956 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
957 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
958 } |
| 114 | 959 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
960 pthread_mutex_lock(&this->vm_lock); |
| 114 | 961 if (!this->vm->state.pgc) { |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
962 printerr("No current PGC."); |
| 114 | 963 pthread_mutex_unlock(&this->vm_lock); |
| 964 return -1; | |
| 965 } | |
| 966 retval = vm_get_audio_active_stream(this->vm); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
967 pthread_mutex_unlock(&this->vm_lock); |
| 114 | 968 |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
969 return retval; |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
970 } |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
971 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
972 int8_t dvdnav_get_active_spu_stream(dvdnav_t *this) { |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
973 int8_t retval; |
| 0 | 974 |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
975 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
976 printerr("Passed a NULL pointer."); |
| 0 | 977 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
978 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
979 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
980 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
981 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
982 } |
| 0 | 983 |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
984 pthread_mutex_lock(&this->vm_lock); |
| 114 | 985 if (!this->vm->state.pgc) { |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
986 printerr("No current PGC."); |
| 114 | 987 pthread_mutex_unlock(&this->vm_lock); |
| 988 return -1; | |
| 989 } | |
| 990 retval = vm_get_subp_active_stream(this->vm, 0); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
991 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 992 |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
993 return retval; |
| 0 | 994 } |
| 995 | |
| 114 | 996 static int8_t dvdnav_is_domain(dvdnav_t *this, domain_t domain) { |
| 997 int8_t retval; | |
| 998 | |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
999 if(!this) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1000 printerr("Passed a NULL pointer."); |
| 114 | 1001 return -1; |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1002 } |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1003 if(!this->started) { |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1004 printerr("Virtual DVD machine not started."); |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1005 return -1; |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1006 } |
| 114 | 1007 |
| 1008 pthread_mutex_lock(&this->vm_lock); | |
| 1009 retval = (this->vm->state.domain == domain); | |
| 1010 pthread_mutex_unlock(&this->vm_lock); | |
| 1011 | |
| 1012 return retval; | |
| 1013 } | |
| 1014 | |
| 0 | 1015 /* First Play domain. (Menu) */ |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1016 int8_t dvdnav_is_domain_fp(dvdnav_t *this) { |
| 114 | 1017 return dvdnav_is_domain(this, FP_DOMAIN); |
| 0 | 1018 } |
| 1019 /* Video management Menu domain. (Menu) */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1020 int8_t dvdnav_is_domain_vmgm(dvdnav_t *this) { |
| 114 | 1021 return dvdnav_is_domain(this, VMGM_DOMAIN); |
| 0 | 1022 } |
| 1023 /* Video Title Menu domain (Menu) */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1024 int8_t dvdnav_is_domain_vtsm(dvdnav_t *this) { |
| 114 | 1025 return dvdnav_is_domain(this, VTSM_DOMAIN); |
| 0 | 1026 } |
| 1027 /* Video Title domain (playing movie). */ | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1028 int8_t dvdnav_is_domain_vts(dvdnav_t *this) { |
| 114 | 1029 return dvdnav_is_domain(this, VTS_DOMAIN); |
| 0 | 1030 } |
| 1031 | |
| 114 | 1032 /* Generally delegate angle information handling to VM */ |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1033 dvdnav_status_t dvdnav_angle_change(dvdnav_t *this, int angle) { |
| 0 | 1034 int num, current; |
| 1035 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1036 if(!this) { |
| 114 | 1037 printerr("Passed a NULL pointer."); |
| 0 | 1038 return S_ERR; |
| 1039 } | |
| 1040 | |
| 114 | 1041 pthread_mutex_lock(&this->vm_lock); |
| 1042 vm_get_angle_info(this->vm, ¤t, &num); | |
| 0 | 1043 /* Set angle SPRM if valid */ |
| 1044 if((angle > 0) && (angle <= num)) { | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1045 this->vm->state.AGL_REG = angle; |
| 0 | 1046 } else { |
| 114 | 1047 printerr("Passed an invalid angle number."); |
| 1048 pthread_mutex_unlock(&this->vm_lock); | |
| 0 | 1049 return S_ERR; |
| 1050 } | |
| 114 | 1051 pthread_mutex_unlock(&this->vm_lock); |
| 0 | 1052 |
| 1053 return S_OK; | |
| 1054 } | |
| 1055 | |
| 114 | 1056 dvdnav_status_t dvdnav_get_angle_info(dvdnav_t *this, int *current_angle, |
| 1057 int *number_of_angles) { | |
| 1058 if(!this || !current_angle || !number_of_angles) { | |
| 1059 printerr("Passed a NULL pointer."); | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1060 return S_ERR; |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1061 } |
| 114 | 1062 |
| 1063 pthread_mutex_lock(&this->vm_lock); | |
| 1064 vm_get_angle_info(this->vm, current_angle, number_of_angles); | |
| 1065 pthread_mutex_unlock(&this->vm_lock); | |
| 1066 | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1067 return S_OK; |
| 114 | 1068 } |
| 0 | 1069 |
|
67
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1070 pci_t* dvdnav_get_current_nav_pci(dvdnav_t *this) { |
| 114 | 1071 if(!this) return 0; |
|
67
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1072 return &this->pci; |
|
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1073 } |
|
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1074 |
|
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1075 dsi_t* dvdnav_get_current_nav_dsi(dvdnav_t *this) { |
| 114 | 1076 if(!this) return 0; |
|
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1077 return &this->dsi; |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1078 } |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1079 |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1080 uint32_t dvdnav_get_next_still_flag(dvdnav_t *this) { |
| 114 | 1081 if(!this) return -1; |
|
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1082 return this->position_next.still; |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1083 } |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1084 |
| 0 | 1085 /* |
| 1086 * $Log$ | |
| 151 | 1087 * Revision 1.51 2003/04/04 14:21:32 mroi |
| 1088 * fill in new timing member in cell_change event | |
| 1089 * | |
|
143
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
1090 * Revision 1.50 2003/04/01 11:30:56 mroi |
|
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
1091 * merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost |
|
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
1092 * on syncing |
|
0b302ca31859
merge James fixes from xine-lib cvs back into libdvdnav cvs so they will not be lost
mroi
parents:
142
diff
changeset
|
1093 * |
|
142
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1094 * Revision 1.49 2003/04/01 11:28:54 mroi |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1095 * some more sanity checking will prevent segfaults in these functions |
|
e375b765ebf5
some more sanity checking will prevent segfaults in these functions
mroi
parents:
141
diff
changeset
|
1096 * |
|
141
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
1097 * Revision 1.48 2003/03/31 13:48:36 mroi |
|
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
1098 * update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE |
|
8f63f4c25f2f
update position on HOP_CHANNEL, do not rely on a following CELL_CHANGE
mroi
parents:
135
diff
changeset
|
1099 * |
| 135 | 1100 * Revision 1.47 2003/03/26 14:37:22 mroi |
| 1101 * I should get a brain and learn how to handle BCD... | |
| 1102 * also fixing a possible mis-jump with angled cells | |
| 1103 * | |
|
134
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
1104 * Revision 1.46 2003/03/25 12:46:26 mroi |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
1105 * - new event on cell changes to report program and cell number and some time info |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
1106 * - get rid of memcopies in event handling |
|
d9d75a22a061
- new event on cell changes to report program and cell number and some time info
mroi
parents:
127
diff
changeset
|
1107 * |
| 127 | 1108 * Revision 1.45 2003/03/15 20:18:50 mroi |
| 1109 * start blockN from 0 | |
| 1110 * | |
| 126 | 1111 * Revision 1.44 2003/03/14 18:49:28 mroi |
| 1112 * less overwhelming TRACE info | |
| 1113 * | |
| 121 | 1114 * Revision 1.43 2003/03/12 11:38:51 mroi |
| 1115 * stop the VM here | |
| 1116 * | |
| 116 | 1117 * Revision 1.42 2003/02/25 14:08:14 mroi |
| 1118 * new event DVDNAV_WAIT | |
| 115 | 1119 * |
| 114 | 1120 * Revision 1.40 2003/02/20 15:32:15 mroi |
| 1121 * big libdvdnav cleanup, quoting the ChangeLog: | |
| 1122 * * some bugfixes | |
| 1123 * * code cleanup | |
| 1124 * * build process polishing | |
| 1125 * * more sensible event order in get_next_block to ensure useful event delivery | |
| 1126 * * VOBU level resume | |
| 1127 * * fixed: seeking in a multiangle feature briefly showed the wrong angle | |
| 1128 * | |
|
106
e984044bbe7b
port Stephen's comment fixing to avoid problems when syncing xine-lib's copy of
mroi
parents:
100
diff
changeset
|
1129 * Revision 1.39 2002/10/23 11:38:09 mroi |
|
e984044bbe7b
port Stephen's comment fixing to avoid problems when syncing xine-lib's copy of
mroi
parents:
100
diff
changeset
|
1130 * port Stephen's comment fixing to avoid problems when syncing xine-lib's copy of |
|
e984044bbe7b
port Stephen's comment fixing to avoid problems when syncing xine-lib's copy of
mroi
parents:
100
diff
changeset
|
1131 * libdvdnav |
|
e984044bbe7b
port Stephen's comment fixing to avoid problems when syncing xine-lib's copy of
mroi
parents:
100
diff
changeset
|
1132 * |
| 100 | 1133 * Revision 1.38 2002/09/19 04:48:28 jcdutton |
| 1134 * Update version info. | |
| 1135 * The "note2" bit if to help developers know which version of libdvdnav the user is using. | |
| 1136 * | |
| 99 | 1137 * Revision 1.37 2002/09/18 14:26:42 mroi |
| 1138 * fix possible unlock on not locked mutex | |
| 1139 * | |
|
97
c1dff1899bda
First patch for personalized dvd viewing. I have not tested it yet.
jcdutton
parents:
92
diff
changeset
|
1140 * Revision 1.36 2002/09/17 11:00:21 jcdutton |
|
c1dff1899bda
First patch for personalized dvd viewing. I have not tested it yet.
jcdutton
parents:
92
diff
changeset
|
1141 * First patch for personalized dvd viewing. I have not tested it yet. |
|
c1dff1899bda
First patch for personalized dvd viewing. I have not tested it yet.
jcdutton
parents:
92
diff
changeset
|
1142 * |
| 92 | 1143 * Revision 1.35 2002/09/05 12:55:05 mroi |
| 1144 * fix memleaks in dvdnav_open | |
| 1145 * | |
|
89
0fbef4901e2c
Add a comment so I can tell which version of the CVS a user is using.
jcdutton
parents:
84
diff
changeset
|
1146 * Revision 1.34 2002/09/03 00:41:48 jcdutton |
|
0fbef4901e2c
Add a comment so I can tell which version of the CVS a user is using.
jcdutton
parents:
84
diff
changeset
|
1147 * Add a comment so I can tell which version of the CVS a user is using. |
|
0fbef4901e2c
Add a comment so I can tell which version of the CVS a user is using.
jcdutton
parents:
84
diff
changeset
|
1148 * Also add a FIXME to remind me to fix the Chapter number display. |
|
0fbef4901e2c
Add a comment so I can tell which version of the CVS a user is using.
jcdutton
parents:
84
diff
changeset
|
1149 * |
| 84 | 1150 * Revision 1.33 2002/08/31 11:05:27 jcdutton |
| 1151 * Properly seed the DVD VM Instruction rand(). | |
| 1152 * | |
| 82 | 1153 * Revision 1.32 2002/08/31 02:50:27 jcdutton |
| 1154 * Improve some debug messages. | |
| 1155 * Add some comments about dvdnav_open memory leaks. | |
| 1156 * | |
| 76 | 1157 * Revision 1.31 2002/08/27 19:15:08 mroi |
| 1158 * more consistent console output | |
| 1159 * | |
|
73
a23d50ba81d3
update spu clut, spu channel and audio channel more often
mroi
parents:
67
diff
changeset
|
1160 * Revision 1.30 2002/08/09 21:34:27 mroi |
|
a23d50ba81d3
update spu clut, spu channel and audio channel more often
mroi
parents:
67
diff
changeset
|
1161 * update spu clut, spu channel and audio channel more often |
|
a23d50ba81d3
update spu clut, spu channel and audio channel more often
mroi
parents:
67
diff
changeset
|
1162 * |
|
67
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1163 * Revision 1.29 2002/07/25 14:51:40 richwareham |
|
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1164 * Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled' |
|
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1165 * check_packet. |
|
61c0ee1bbb7a
Moved get_current_nav_pci into dvdnac.c, changed example to use it instead of 'home-rolled'
richwareham
parents:
66
diff
changeset
|
1166 * |
|
66
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1167 * Revision 1.28 2002/07/25 14:42:33 richwareham |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1168 * Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead' |
|
2bd4a78eefce
Patch from aschultz@cs.uni-magdeburg.de to allow for still-frame 'peek-ahead'
richwareham
parents:
60
diff
changeset
|
1169 * |
| 60 | 1170 * Revision 1.27 2002/07/12 15:46:44 mroi |
| 1171 * use new memcopy'less read ahead cache | |
| 1172 * | |
| 58 | 1173 * Revision 1.26 2002/07/06 16:24:54 mroi |
| 1174 * * fix debug messages | |
| 1175 * * send spu stream change event only, when there are new streams | |
| 1176 * (should fix problems with Terminator disk 2) | |
| 1177 * | |
|
55
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
54
diff
changeset
|
1178 * Revision 1.25 2002/07/05 14:18:54 mroi |
|
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
54
diff
changeset
|
1179 * report all spu types (widescreen, letterbox and pan&scan), not widescreen |
|
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
54
diff
changeset
|
1180 * only and report the stream's scale permissions to detect pan&scan material |
|
5674fbd44f26
report all spu types (widescreen, letterbox and pan&scan), not widescreen
mroi
parents:
54
diff
changeset
|
1181 * |
| 54 | 1182 * Revision 1.24 2002/07/05 01:42:30 jcdutton |
| 1183 * Add more debug info for Menu language selection. | |
| 1184 * Only do vm_start when we have to. | |
| 1185 * | |
|
50
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
1186 * Revision 1.23 2002/07/02 22:57:09 jcdutton |
|
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
1187 * Rename some of the functions in vm.c to help readability. |
|
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
1188 * Hopefully fix __FUNCTION__ problem. Use __func_ as recommended in C99. |
|
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
1189 * Fix bug where libdvdnav would not immeadiately replay the same cell due to menu buttons. |
|
578ce1d41479
Rename some of the functions in vm.c to help readability.
jcdutton
parents:
45
diff
changeset
|
1190 * |
| 45 | 1191 * Revision 1.22 2002/06/25 13:37:11 jcdutton |
| 1192 * Revert back to old read_cache method. | |
| 1193 * Some new optimizations added to the old read_cache method, thus reducing the amount of calls to read blocks from the DVD device. | |
| 1194 * | |
|
43
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
42
diff
changeset
|
1195 * Revision 1.21 2002/06/06 15:03:09 richwareham |
|
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
42
diff
changeset
|
1196 * Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice. |
|
0ba15bf3dc25
Biiiiiiig change to let doxygen generate some docs for the library. Note that I'm in no way sure that the autoconf stuff plays nice.
richwareham
parents:
42
diff
changeset
|
1197 * |
| 42 | 1198 * Revision 1.20 2002/06/04 13:35:16 richwareham |
| 1199 * Removed more C++ style comments | |
| 1200 * | |
| 39 | 1201 * Revision 1.19 2002/05/30 23:15:14 richwareham |
| 1202 * First draft of removing HAVE_DVDREAD9 | |
| 1203 * | |
|
34
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
1204 * Revision 1.18 2002/05/30 09:52:29 richwareham |
|
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
1205 * 'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book. |
|
1f29402ef2ef
'Objectified' the read-ahead cache in preparation to implement a 'proper' threaded cache a-la that recommended in the DVD Demystified book.
richwareham
parents:
33
diff
changeset
|
1206 * |
|
33
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
1207 * Revision 1.17 2002/05/09 11:57:24 richwareham |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
1208 * Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus) |
|
ef2136c4e7b2
Angles now work (still a few wrinkles though -- e.g. angle does not reset to '1' when returning to menus)
richwareham
parents:
31
diff
changeset
|
1209 * |
| 31 | 1210 * Revision 1.16 2002/04/24 21:15:25 jcdutton |
| 1211 * Quiet please!!! | |
| 1212 * | |
| 30 | 1213 * Revision 1.15 2002/04/24 00:47:46 jcdutton |
| 1214 * Some more cleanups. | |
| 1215 * Improve button passing. | |
| 1216 * | |
| 28 | 1217 * Revision 1.14 2002/04/23 13:26:08 jcdutton |
| 1218 * Add some comments, FIXMEs. | |
| 1219 * The main point being that dvdnav_get_next_block is almost in a state where it can be optional whether the application programmer uses it, or implements their own version of the function. That is been the main reason for the re-write of this function recently. | |
| 1220 * | |
| 26 | 1221 * Revision 1.13 2002/04/23 12:55:40 jcdutton |
| 1222 * Removed un-needed variables. | |
| 1223 * General Clean up. | |
| 1224 * | |
|
25
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
1225 * Revision 1.12 2002/04/23 12:34:39 f1rmb |
|
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
1226 * Why rewrite vm function, use it instead (this remark is for me, of course ;-) ). |
|
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
1227 * Comment unused var, shut compiler warnings. |
|
df024077cbc1
Why rewrite vm function, use it instead (this remark is for me, of course ;-) ).
f1rmb
parents:
24
diff
changeset
|
1228 * |
| 24 | 1229 * Revision 1.11 2002/04/23 02:12:27 jcdutton |
| 1230 * Re-implemented seeking. | |
| 1231 * | |
| 23 | 1232 * Revision 1.10 2002/04/23 00:07:16 jcdutton |
| 1233 * Name stills work better. | |
| 1234 * | |
|
22
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1235 * Revision 1.9 2002/04/22 22:00:48 jcdutton |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1236 * Start of rewrite of libdvdnav. Still need to re-implement seeking. |
|
3c1df0cb3aee
Start of rewrite of libdvdnav. Still need to re-implement seeking.
jcdutton
parents:
21
diff
changeset
|
1237 * |
|
21
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
1238 * Revision 1.8 2002/04/22 20:57:14 f1rmb |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
1239 * Change/fix SPU active stream id. Same for audio. Few new functions, largely |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
1240 * inspired from libogle ;-). |
|
d2d73f2ad8d3
Change/fix SPU active stream id. Same for audio. Few new functions, largely
f1rmb
parents:
17
diff
changeset
|
1241 * |
| 17 | 1242 * Revision 1.7 2002/04/10 16:45:57 jcdutton |
| 1243 * Actually fix the const this time! | |
| 1244 * | |
|
8
66708b4a1b5e
Stop C++ bitching about some things and extend the menus example
richwareham
parents:
7
diff
changeset
|
1245 * Revision 1.6 2002/04/07 14:10:11 richwareham |
|
66708b4a1b5e
Stop C++ bitching about some things and extend the menus example
richwareham
parents:
7
diff
changeset
|
1246 * Stop C++ bitching about some things and extend the menus example |
|
66708b4a1b5e
Stop C++ bitching about some things and extend the menus example
richwareham
parents:
7
diff
changeset
|
1247 * |
|
7
7fdefafa624f
Slight correction to handle quicker menu transitions.
jcdutton
parents:
6
diff
changeset
|
1248 * Revision 1.5 2002/04/06 18:42:05 jcdutton |
|
7fdefafa624f
Slight correction to handle quicker menu transitions.
jcdutton
parents:
6
diff
changeset
|
1249 * Slight correction to handle quicker menu transitions. |
|
7fdefafa624f
Slight correction to handle quicker menu transitions.
jcdutton
parents:
6
diff
changeset
|
1250 * |
| 6 | 1251 * Revision 1.4 2002/04/06 18:31:50 jcdutton |
| 1252 * Some cleaning up. | |
| 1253 * changed exit(1) to assert(0) so they actually get seen by the user so that it helps developers more. | |
| 1254 * | |
|
4
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
1255 * Revision 1.3 2002/04/02 18:22:27 richwareham |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
1256 * Added reset patch from Kees Cook <kees@outflux.net> |
|
99bed5d6db2f
Added reset patch from Kees Cook <kees@outflux.net>
richwareham
parents:
3
diff
changeset
|
1257 * |
|
3
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
1258 * Revision 1.2 2002/04/01 18:56:28 richwareham |
|
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
1259 * Added initial example programs directory and make sure all debug/error output goes to stderr. |
|
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
1260 * |
|
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
1261 * Revision 1.1.1.1 2002/03/12 19:45:57 richwareham |
|
328eadb3f37e
Added initial example programs directory and make sure all debug/error output goes to stderr.
richwareham
parents:
0
diff
changeset
|
1262 * Initial import |
| 0 | 1263 * |
| 1264 * Revision 1.28 2002/02/02 23:26:20 richwareham | |
| 1265 * Restored title selection | |
| 1266 * | |
| 1267 * Revision 1.27 2002/02/01 15:48:10 richwareham | |
| 1268 * Re-implemented angle selection and title/chapter display | |
| 1269 * | |
| 1270 * Revision 1.26 2002/01/31 16:53:49 richwareham | |
| 1271 * Big patch from Daniel Caujolle-Bert to (re)implement SPU/Audio language display | |
| 1272 * | |
| 1273 * Revision 1.25 2002/01/24 20:53:50 richwareham | |
| 1274 * Added option to _not_ use DVD read-ahead to options | |
| 1275 * | |
| 1276 * Revision 1.24 2002/01/20 15:54:59 jcdutton | |
| 1277 * Implement seeking. | |
| 1278 * It is still a bit buggy, but works sometimes. | |
| 1279 * I need to find out how to make the jump clean. | |
| 1280 * At the moment, some corruption of the mpeg2 stream occurs, | |
| 1281 * which causes libmpeg2 to crash. | |
| 1282 * | |
| 1283 * Revision 1.23 2002/01/18 00:23:52 jcdutton | |
| 1284 * Support Ejecting of DVD. | |
| 1285 * It will first un-mount the DVD, then eject it. | |
| 1286 * | |
| 1287 * Revision 1.22 2002/01/17 14:50:32 jcdutton | |
| 1288 * Fix corruption of stream during menu transitions. | |
| 1289 * Menu transitions are now clean. | |
| 1290 * | |
| 1291 * Revision 1.21 2002/01/15 00:37:03 jcdutton | |
| 1292 * Just a few cleanups, and a assert fix. (memset fixed it) | |
| 1293 * | |
| 1294 * Revision 1.20 2002/01/13 22:17:57 jcdutton | |
| 1295 * Change logging. | |
| 1296 * | |
| 1297 * | |
| 1298 */ |
