Mercurial > mplayer.hg
annotate dvdread/libdvdread_changes.diff @ 24093:e0b1c50aa9bd
synced with r24110
author | Gabrov |
---|---|
date | Tue, 21 Aug 2007 07:27:05 +0000 |
parents | 97a8394bec58 |
children | cda2c4f38003 |
rev | line source |
---|---|
24054 | 1 --- dvdread.orig/dvd_reader.c 2007-08-06 13:34:37.000000000 +0200 |
2 +++ dvdread/dvd_reader.c 2007-08-06 13:35:19.000000000 +0200 | |
24066 | 3 @@ -39,9 +43,11 @@ |
14937 | 4 |
5 #if defined(__sun) | |
6 #include <sys/mnttab.h> | |
7 +#elif defined(hpux) | |
8 +#include </usr/conf/h/mnttab.h> | |
9 #elif defined(SYS_BSD) | |
10 #include <fstab.h> | |
15535 | 11 -#elif defined(__linux__) |
12 +#elif defined(__linux__) || defined(__CYGWIN__) | |
14937 | 13 #include <mntent.h> |
14 #endif | |
15 | |
24066 | 16 @@ -52,7 +58,7 @@ |
24054 | 17 |
18 #include "dvdread_internal.h" | |
15875
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
19 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
20 -#define DEFAULT_UDF_CACHE_LEVEL 1 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
21 +#define DEFAULT_UDF_CACHE_LEVEL 0 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
22 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
23 struct dvd_reader_s { |
24054 | 24 /* Basic information. */ |
24066 | 25 @@ -494,7 +500,7 @@ |
24054 | 26 char *path_copy; |
15535 | 27 #if defined(SYS_BSD) |
24054 | 28 struct fstab* fe; |
15535 | 29 -#elif defined(__sun) || defined(__linux__) |
30 +#elif defined(__sun) || defined(__linux__) || defined(__CYGWIN__) | |
24054 | 31 FILE *mntfile; |
15535 | 32 #endif |
33 | |
24066 | 34 @@ -598,7 +604,7 @@ |
24054 | 35 } |
36 fclose( mntfile ); | |
37 } | |
15535 | 38 -#elif defined(__linux__) |
39 +#elif defined(__linux__) || defined(__CYGWIN__) | |
24054 | 40 mntfile = fopen( MOUNTED, "r" ); |
41 if( mntfile ) { | |
42 struct mntent *me; | |
24066 | 43 @@ -623,6 +629,9 @@ |
24054 | 44 } |
45 fclose( mntfile ); | |
46 } | |
47 +#elif defined(__MINGW32__) | |
48 + dev_name = strdup(path); | |
49 + auth_drive = DVDOpenImageFile( path, have_css ); | |
14937 | 50 #endif |
24054 | 51 if( !dev_name ) { |
52 if(verbose >= 1) { | |
24066 | 53 @@ -841,8 +850,8 @@ |
24054 | 54 } |
14937 | 55 |
24054 | 56 if( dvd->css_state == 1 /* Need key init */ ) { |
57 - initAllCSSKeys( dvd ); | |
58 - dvd->css_state = 2; | |
59 +// initAllCSSKeys( dvd ); | |
60 +// dvd->css_state = 2; | |
61 } | |
62 /* | |
63 if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) { | |
64 | |
65 --- dvdread.orig/dvdread_internal.h 2005-09-12 21:42:12.000000000 +0200 | |
66 +++ dvdread/dvdread_internal.h 2007-08-06 12:57:08.000000000 +0200 | |
67 @@ -3,12 +3,7 @@ | |
15875
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
68 #define DVDREAD_INTERNAL_H |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
69 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
70 |
24054 | 71 -#define CHECK_VALUE(arg) \ |
72 - if(!(arg)) { \ | |
73 - fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" \ | |
74 - "\n*** for %s ***\n\n", \ | |
75 - __FILE__, __LINE__, # arg ); \ | |
76 - } | |
15875
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
77 +#define CHECK_VALUE(arg) |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
78 |
24054 | 79 |
80 int get_verbose(void); | |
81 | |
82 --- dvdread.orig/ifo_print.c 2005-09-15 18:54:29.000000000 +0200 | |
83 +++ dvdread/ifo_print.c 2007-08-06 12:52:32.000000000 +0200 | |
84 @@ -793,14 +797,14 @@ | |
16659 | 85 ifoPrint_USER_OPS(&pgc->prohibited_ops); |
86 | |
24054 | 87 for(i = 0; i < 8; i++) { |
88 - if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */ | |
89 + if(pgc->audio_control[i].present) { /* The 'is present' bit */ | |
90 printf("Audio stream %i control: %04x\n", | |
91 i, pgc->audio_control[i]); | |
16659 | 92 } |
24054 | 93 } |
16659 | 94 |
95 for(i = 0; i < 32; i++) { | |
96 - if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */ | |
24054 | 97 + if(pgc->subp_control[i].present) { /* The 'is present' bit */ |
16659 | 98 printf("Subpicture stream %2i control: %08x\n", |
24054 | 99 i, pgc->subp_control[i]); |
16659 | 100 } |
101 | |
24054 | 102 --- dvdread.orig/ifo_read.c 2006-01-22 13:19:19.000000000 +0100 |
103 +++ dvdread/ifo_read.c 2007-08-06 13:15:55.000000000 +0200 | |
104 @@ -110,7 +114,7 @@ | |
20790 | 105 ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) { |
106 ifo_handle_t *ifofile; | |
107 | |
108 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); | |
109 + ifofile = malloc(sizeof(ifo_handle_t)); | |
110 if(!ifofile) | |
24054 | 111 return NULL; |
20790 | 112 |
24054 | 113 @@ -240,7 +244,7 @@ |
20790 | 114 ifo_handle_t *ifoOpenVMGI(dvd_reader_t *dvd) { |
115 ifo_handle_t *ifofile; | |
116 | |
117 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); | |
118 + ifofile = malloc(sizeof(ifo_handle_t)); | |
119 if(!ifofile) | |
24054 | 120 return NULL; |
20790 | 121 |
24054 | 122 @@ -292,7 +296,7 @@ |
20790 | 123 ifo_handle_t *ifoOpenVTSI(dvd_reader_t *dvd, int title) { |
124 ifo_handle_t *ifofile; | |
125 | |
126 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t)); | |
127 + ifofile = malloc(sizeof(ifo_handle_t)); | |
128 if(!ifofile) | |
24054 | 129 return NULL; |
20790 | 130 |
24054 | 131 @@ -382,7 +386,7 @@ |
20790 | 132 static int ifoRead_VMG(ifo_handle_t *ifofile) { |
133 vmgi_mat_t *vmgi_mat; | |
134 | |
135 - vmgi_mat = (vmgi_mat_t *)malloc(sizeof(vmgi_mat_t)); | |
136 + vmgi_mat = malloc(sizeof(vmgi_mat_t)); | |
137 if(!vmgi_mat) | |
138 return 0; | |
139 | |
24054 | 140 @@ -473,7 +477,7 @@ |
20790 | 141 vtsi_mat_t *vtsi_mat; |
142 int i; | |
143 | |
144 - vtsi_mat = (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t)); | |
145 + vtsi_mat = malloc(sizeof(vtsi_mat_t)); | |
146 if(!vtsi_mat) | |
147 return 0; | |
148 | |
24054 | 149 @@ -606,7 +610,7 @@ |
150 | |
20790 | 151 if(cmd_tbl->nr_of_pre != 0) { |
152 unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE; | |
153 - cmd_tbl->pre_cmds = (vm_cmd_t *)malloc(pre_cmds_size); | |
154 + cmd_tbl->pre_cmds = malloc(pre_cmds_size); | |
155 if(!cmd_tbl->pre_cmds) | |
156 return 0; | |
157 | |
24054 | 158 @@ -618,7 +622,7 @@ |
159 | |
20790 | 160 if(cmd_tbl->nr_of_post != 0) { |
161 unsigned int post_cmds_size = cmd_tbl->nr_of_post * COMMAND_DATA_SIZE; | |
162 - cmd_tbl->post_cmds = (vm_cmd_t *)malloc(post_cmds_size); | |
163 + cmd_tbl->post_cmds = malloc(post_cmds_size); | |
164 if(!cmd_tbl->post_cmds) { | |
165 if(cmd_tbl->pre_cmds) | |
24054 | 166 free(cmd_tbl->pre_cmds); |
167 @@ -634,7 +638,7 @@ | |
20790 | 168 |
169 if(cmd_tbl->nr_of_cell != 0) { | |
170 unsigned int cell_cmds_size = cmd_tbl->nr_of_cell * COMMAND_DATA_SIZE; | |
171 - cmd_tbl->cell_cmds = (vm_cmd_t *)malloc(cell_cmds_size); | |
172 + cmd_tbl->cell_cmds = malloc(cell_cmds_size); | |
173 if(!cmd_tbl->cell_cmds) { | |
174 if(cmd_tbl->pre_cmds) | |
24054 | 175 free(cmd_tbl->pre_cmds); |
176 @@ -751,10 +755,6 @@ | |
16659 | 177 B2N_16(pgc->cell_playback_offset); |
178 B2N_16(pgc->cell_position_offset); | |
179 | |
180 - for(i = 0; i < 8; i++) | |
181 - B2N_16(pgc->audio_control[i]); | |
182 - for(i = 0; i < 32; i++) | |
183 - B2N_32(pgc->subp_control[i]); | |
184 for(i = 0; i < 16; i++) | |
185 B2N_32(pgc->palette[i]); | |
186 | |
24054 | 187 @@ -763,10 +763,10 @@ |
16659 | 188 |
189 /* verify time (look at print_time) */ | |
190 for(i = 0; i < 8; i++) | |
191 - if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */ | |
192 + if(!pgc->audio_control[i].present) | |
193 CHECK_ZERO(pgc->audio_control[i]); | |
194 for(i = 0; i < 32; i++) | |
195 - if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */ | |
196 + if(!pgc->subp_control[i].present) | |
197 CHECK_ZERO(pgc->subp_control[i]); | |
198 | |
199 /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */ | |
24054 | 200 @@ -880,7 +880,7 @@ |
20790 | 201 if(ifofile->vmgi_mat->first_play_pgc == 0) |
202 return 1; | |
203 | |
204 - ifofile->first_play_pgc = (pgc_t *)malloc(sizeof(pgc_t)); | |
205 + ifofile->first_play_pgc = malloc(sizeof(pgc_t)); | |
206 if(!ifofile->first_play_pgc) | |
207 return 0; | |
208 | |
24054 | 209 @@ -934,7 +934,7 @@ |
20790 | 210 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->tt_srpt * DVD_BLOCK_LEN)) |
211 return 0; | |
212 | |
213 - tt_srpt = (tt_srpt_t *)malloc(sizeof(tt_srpt_t)); | |
214 + tt_srpt = malloc(sizeof(tt_srpt_t)); | |
215 if(!tt_srpt) | |
216 return 0; | |
217 | |
24054 | 218 @@ -953,7 +953,7 @@ |
20790 | 219 |
220 info_length = tt_srpt->last_byte + 1 - TT_SRPT_SIZE; | |
221 | |
222 - tt_srpt->title = (title_info_t *)malloc(info_length); | |
24054 | 223 + tt_srpt->title = malloc(info_length); |
20790 | 224 if(!tt_srpt->title) { |
225 free(tt_srpt); | |
226 ifofile->tt_srpt = 0; | |
24054 | 227 @@ -1040,7 +1040,7 @@ |
228 ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN)) | |
20790 | 229 return 0; |
230 | |
231 - vts_ptt_srpt = (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t)); | |
232 + vts_ptt_srpt = malloc(sizeof(vts_ptt_srpt_t)); | |
233 if(!vts_ptt_srpt) | |
234 return 0; | |
235 | |
24054 | 236 @@ -1063,7 +1063,7 @@ |
20790 | 237 |
238 info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE; | |
239 | |
240 - data = (uint32_t *)malloc(info_length); | |
24054 | 241 + data = malloc(info_length); |
20790 | 242 if(!data) { |
243 free(vts_ptt_srpt); | |
244 ifofile->vts_ptt_srpt = 0; | |
24054 | 245 @@ -1183,7 +1183,7 @@ |
20790 | 246 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN)) |
247 return 0; | |
248 | |
249 - ptl_mait = (ptl_mait_t *)malloc(sizeof(ptl_mait_t)); | |
250 + ptl_mait = malloc(sizeof(ptl_mait_t)); | |
251 if(!ptl_mait) | |
252 return 0; | |
253 | |
24054 | 254 @@ -1207,7 +1207,7 @@ |
255 <= ptl_mait->last_byte + 1 - PTL_MAIT_SIZE); | |
20790 | 256 |
257 info_length = ptl_mait->nr_of_countries * sizeof(ptl_mait_country_t); | |
258 - ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length); | |
259 + ptl_mait->countries = malloc(info_length); | |
260 if(!ptl_mait->countries) { | |
261 free(ptl_mait); | |
262 ifofile->ptl_mait = 0; | |
24054 | 263 @@ -1252,7 +1252,7 @@ |
20790 | 264 return 0; |
265 } | |
266 info_length = (ptl_mait->nr_of_vtss + 1) * sizeof(pf_level_t); | |
267 - pf_temp = (uint16_t *)malloc(info_length); | |
268 + pf_temp = malloc(info_length); | |
269 if(!pf_temp) { | |
270 for(j = 0; j < i ; j++) { | |
24054 | 271 free(ptl_mait->countries[j].pf_ptl_mai); |
272 @@ -1276,7 +1276,7 @@ | |
20790 | 273 for (j = 0; j < ((ptl_mait->nr_of_vtss + 1) * 8); j++) { |
24054 | 274 B2N_16(pf_temp[j]); |
20790 | 275 } |
276 - ptl_mait->countries[i].pf_ptl_mai = (pf_level_t *)malloc(info_length); | |
277 + ptl_mait->countries[i].pf_ptl_mai = malloc(info_length); | |
278 if(!ptl_mait->countries[i].pf_ptl_mai) { | |
279 free(pf_temp); | |
280 for(j = 0; j < i ; j++) { | |
24054 | 281 @@ -1340,7 +1340,7 @@ |
20790 | 282 if(!DVDFileSeek_(ifofile->file, offset)) |
283 return 0; | |
284 | |
285 - vts_tmapt = (vts_tmapt_t *)malloc(sizeof(vts_tmapt_t)); | |
286 + vts_tmapt = malloc(sizeof(vts_tmapt_t)); | |
287 if(!vts_tmapt) | |
288 return 0; | |
289 | |
24054 | 290 @@ -1362,7 +1362,7 @@ |
20790 | 291 |
292 info_length = vts_tmapt->nr_of_tmaps * 4; | |
293 | |
294 - vts_tmap_srp = (uint32_t *)malloc(info_length); | |
295 + vts_tmap_srp = malloc(info_length); | |
296 if(!vts_tmap_srp) { | |
297 free(vts_tmapt); | |
298 ifofile->vts_tmapt = NULL; | |
24054 | 299 @@ -1388,7 +1388,7 @@ |
20790 | 300 |
301 info_length = vts_tmapt->nr_of_tmaps * sizeof(vts_tmap_t); | |
302 | |
303 - vts_tmapt->tmap = (vts_tmap_t *)malloc(info_length); | |
304 + vts_tmapt->tmap = malloc(info_length); | |
305 if(!vts_tmapt->tmap) { | |
306 free(vts_tmap_srp); | |
307 free(vts_tmapt); | |
24054 | 308 @@ -1422,7 +1422,7 @@ |
20790 | 309 |
310 info_length = vts_tmapt->tmap[i].nr_of_entries * sizeof(map_ent_t); | |
311 | |
312 - vts_tmapt->tmap[i].map_ent = (map_ent_t *)malloc(info_length); | |
313 + vts_tmapt->tmap[i].map_ent = malloc(info_length); | |
314 if(!vts_tmapt->tmap[i].map_ent) { | |
315 ifoFree_VTS_TMAPT(ifofile); | |
316 return 0; | |
24054 | 317 @@ -1472,7 +1472,7 @@ |
20790 | 318 if(ifofile->vtsi_mat->vts_c_adt == 0) /* mandatory */ |
319 return 0; | |
320 | |
321 - ifofile->vts_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t)); | |
322 + ifofile->vts_c_adt = malloc(sizeof(c_adt_t)); | |
323 if(!ifofile->vts_c_adt) | |
324 return 0; | |
325 | |
24054 | 326 @@ -1504,7 +1504,7 @@ |
20790 | 327 return 0; |
328 } | |
329 | |
330 - ifofile->menu_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t)); | |
331 + ifofile->menu_c_adt = malloc(sizeof(c_adt_t)); | |
332 if(!ifofile->menu_c_adt) | |
333 return 0; | |
334 | |
24054 | 335 @@ -1548,7 +1548,7 @@ |
20790 | 336 c_adt->nr_of_vobs = info_length / sizeof(cell_adr_t); |
337 } | |
338 | |
339 - c_adt->cell_adr_table = (cell_adr_t *)malloc(info_length); | |
340 + c_adt->cell_adr_table = malloc(info_length); | |
341 if(!c_adt->cell_adr_table) | |
342 return 0; | |
343 | |
24054 | 344 @@ -1608,7 +1608,7 @@ |
20790 | 345 if(ifofile->vtsi_mat->vts_vobu_admap == 0) /* mandatory */ |
346 return 0; | |
347 | |
348 - ifofile->vts_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t)); | |
349 + ifofile->vts_vobu_admap = malloc(sizeof(vobu_admap_t)); | |
350 if(!ifofile->vts_vobu_admap) | |
351 return 0; | |
352 | |
24054 | 353 @@ -1640,7 +1640,7 @@ |
20790 | 354 return 0; |
355 } | |
356 | |
357 - ifofile->menu_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t)); | |
358 + ifofile->menu_vobu_admap = malloc(sizeof(vobu_admap_t)); | |
359 if(!ifofile->menu_vobu_admap) | |
360 return 0; | |
361 | |
24054 | 362 @@ -1673,7 +1673,7 @@ |
20790 | 363 Titles with a VOBS that has no VOBUs. */ |
364 CHECK_VALUE(info_length % sizeof(uint32_t) == 0); | |
365 | |
366 - vobu_admap->vobu_start_sectors = (uint32_t *)malloc(info_length); | |
24054 | 367 + vobu_admap->vobu_start_sectors = malloc(info_length); |
20790 | 368 if(!vobu_admap->vobu_start_sectors) { |
369 return 0; | |
370 } | |
24054 | 371 @@ -1725,7 +1725,7 @@ |
20790 | 372 if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */ |
373 return 0; | |
374 | |
375 - ifofile->vts_pgcit = (pgcit_t *)malloc(sizeof(pgcit_t)); | |
376 + ifofile->vts_pgcit = malloc(sizeof(pgcit_t)); | |
377 if(!ifofile->vts_pgcit) | |
378 return 0; | |
379 | |
24054 | 380 @@ -1860,7 +1860,7 @@ |
20790 | 381 return 0; |
382 } | |
383 | |
384 - ifofile->pgci_ut = (pgci_ut_t *)malloc(sizeof(pgci_ut_t)); | |
385 + ifofile->pgci_ut = malloc(sizeof(pgci_ut_t)); | |
386 if(!ifofile->pgci_ut) | |
387 return 0; | |
388 | |
24054 | 389 @@ -2050,7 +2050,7 @@ |
20790 | 390 if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) |
391 return 0; | |
392 | |
393 - vts_atrt = (vts_atrt_t *)malloc(sizeof(vts_atrt_t)); | |
394 + vts_atrt = malloc(sizeof(vts_atrt_t)); | |
395 if(!vts_atrt) | |
396 return 0; | |
397 | |
24054 | 398 @@ -2072,7 +2072,7 @@ |
399 VTS_ATRT_SIZE < vts_atrt->last_byte + 1); | |
20790 | 400 |
401 info_length = vts_atrt->nr_of_vtss * sizeof(uint32_t); | |
402 - data = (uint32_t *)malloc(info_length); | |
403 + data = malloc(info_length); | |
404 if(!data) { | |
405 free(vts_atrt); | |
406 ifofile->vts_atrt = 0; | |
24054 | 407 @@ -2094,7 +2094,7 @@ |
20790 | 408 } |
409 | |
410 info_length = vts_atrt->nr_of_vtss * sizeof(vts_attributes_t); | |
411 - vts_atrt->vts = (vts_attributes_t *)malloc(info_length); | |
412 + vts_atrt->vts = malloc(info_length); | |
413 if(!vts_atrt->vts) { | |
414 free(data); | |
415 free(vts_atrt); | |
24054 | 416 @@ -2150,7 +2150,7 @@ |
417 ifofile->vmgi_mat->txtdt_mgi * DVD_BLOCK_LEN)) | |
20790 | 418 return 0; |
419 | |
420 - txtdt_mgi = (txtdt_mgi_t *)malloc(sizeof(txtdt_mgi_t)); | |
421 + txtdt_mgi = malloc(sizeof(txtdt_mgi_t)); | |
422 if(!txtdt_mgi) { | |
423 return 0; | |
424 } | |
16659 | 425 |
15875
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
426 --- dvdread.orig/ifo_types.h 2005-06-23 00:18:54.000000000 +0200 |
50960b929dd0
update mplayer specific libdvdread diff to match v0.9.4
aurel
parents:
15535
diff
changeset
|
427 +++ dvdread/ifo_types.h 2005-06-23 00:19:10.000000000 +0200 |
24054 | 428 @@ -403,6 +407,55 @@ |
16659 | 429 } ATTRIBUTE_PACKED user_ops_t; |
430 | |
431 /** | |
432 + * Subpicture stream mapping for a subtitle | |
433 + */ | |
434 +typedef struct { | |
435 +#ifdef WORDS_BIGENDIAN | |
436 + unsigned int present : 1; | |
437 + unsigned int zero1 : 2; | |
438 + unsigned int s_4p3 : 5; /* stream for 4:3 on any display */ | |
439 + | |
440 + unsigned int zero2 : 3; | |
441 + unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */ | |
442 + | |
443 + unsigned int zero3 : 3; | |
444 + unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */ | |
445 + | |
446 + unsigned int zero4 : 3; | |
447 + unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */ | |
448 +#else | |
449 + unsigned int s_4p3 : 5; /* stream for 4:3 on any display */ | |
450 + unsigned int zero1 : 2; | |
451 + unsigned int present : 1; | |
452 + | |
453 + unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */ | |
454 + unsigned int zero2 : 3; | |
455 + | |
456 + unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */ | |
457 + unsigned int zero3 : 3; | |
458 + | |
459 + unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */ | |
460 + unsigned int zero4 : 3; | |
461 +#endif | |
462 +} ATTRIBUTE_PACKED subp_mapping_t; | |
463 + | |
464 +/** | |
465 + * Audio stream mapping for a soundtrack | |
466 + */ | |
467 +typedef struct { | |
468 +#ifdef WORDS_BIGENDIAN | |
469 + unsigned int present : 1; | |
470 + unsigned int zero1 : 4; | |
471 + unsigned int s_audio : 3; | |
472 +#else | |
473 + unsigned int s_audio : 3; | |
474 + unsigned int zero1 : 4; | |
475 + unsigned int present : 1; | |
476 +#endif | |
477 + uint8_t zero2; | |
478 +} ATTRIBUTE_PACKED audio_mapping_t; | |
479 + | |
480 +/** | |
481 * Program Chain Information. | |
482 */ | |
483 typedef struct { | |
24054 | 484 @@ -411,8 +464,8 @@ |
16659 | 485 uint8_t nr_of_cells; |
486 dvd_time_t playback_time; | |
487 user_ops_t prohibited_ops; | |
488 - uint16_t audio_control[8]; /* New type? */ | |
489 - uint32_t subp_control[32]; /* New type? */ | |
490 + audio_mapping_t audio_control[8]; | |
491 + subp_mapping_t subp_control[32]; | |
492 uint16_t next_pgc_nr; | |
493 uint16_t prev_pgc_nr; | |
494 uint16_t goup_pgc_nr; |