Mercurial > libdvdread4.hg
annotate ifo_print.c @ 17:5aeaa695eadb src
Drop unnecessary include.
author | rathann |
---|---|
date | Sat, 30 Aug 2008 20:10:36 +0000 |
parents | 4e610984cc3f |
children | fce16251755c |
rev | line source |
---|---|
3 | 1 /* |
2 * This program is free software; you can redistribute it and/or modify | |
3 * it under the terms of the GNU General Public License as published by | |
4 * the Free Software Foundation; either version 2 of the License, or | |
5 * (at your option) any later version. | |
6 * | |
7 * This program is distributed in the hope that it will be useful, | |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 * GNU General Public License for more details. | |
11 * | |
12 * You should have received a copy of the GNU General Public License | |
13 * along with this program; if not, write to the Free Software | |
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
15 * | |
16 * $Id$ | |
17 * | |
18 */ | |
19 | |
20 #include <stdio.h> | |
21 #include <stdlib.h> | |
22 #include <unistd.h> | |
23 #include <inttypes.h> | |
24 #include <string.h> | |
25 #include <ctype.h> | |
26 #include <assert.h> | |
27 | |
28 #include "ifo_types.h" | |
29 #include "ifo_read.h" | |
30 #include "ifo_print.h" | |
31 | |
32 /* Put this in some other file / package? It's used in nav_print too. */ | |
33 static void ifo_print_time(int level, dvd_time_t *dtime) { | |
34 const char *rate; | |
35 assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa); | |
36 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); | |
37 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); | |
38 assert((dtime->frame_u&0xf) < 0xa); | |
39 | |
40 printf("%02x:%02x:%02x.%02x", | |
41 dtime->hour, | |
42 dtime->minute, | |
43 dtime->second, | |
44 dtime->frame_u & 0x3f); | |
45 switch((dtime->frame_u & 0xc0) >> 6) { | |
46 case 1: | |
47 rate = "25.00"; | |
48 break; | |
49 case 3: | |
50 rate = "29.97"; | |
51 break; | |
52 default: | |
53 if(dtime->hour == 0 && dtime->minute == 0 | |
54 && dtime->second == 0 && dtime->frame_u == 0) | |
55 rate = "no"; | |
56 else | |
57 rate = "(please send a bug report)"; | |
58 break; | |
59 } | |
60 printf(" @ %s fps", rate); | |
61 } | |
62 | |
13
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
63 void dvdread_print_time(dvd_time_t *dtime) { |
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
64 ifo_print_time(5, dtime); |
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
65 } |
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
66 |
3 | 67 /* Put this in some other file / package? It's used in nav_print too. |
68 Possibly also by the vm / navigator. */ | |
69 static void ifo_print_cmd(int row, vm_cmd_t *command) { | |
70 int i; | |
71 | |
72 printf("(%03d) ", row + 1); | |
73 for(i=0;i<8;i++) | |
74 printf("%02x ", command->bytes[i]); | |
75 printf("| "); | |
76 #if 0 | |
77 //disabled call of dvdnav function | |
78 vm_print_mnemonic(command); | |
79 #endif | |
80 printf("\n"); | |
81 } | |
82 | |
83 static void ifo_print_video_attributes(int level, video_attr_t *attr) { | |
84 | |
85 /* The following test is shorter but not correct ISO C, | |
86 memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */ | |
87 if(attr->mpeg_version == 0 | |
88 && attr->video_format == 0 | |
89 && attr->display_aspect_ratio == 0 | |
90 && attr->permitted_df == 0 | |
91 && attr->unknown1 == 0 | |
92 && attr->line21_cc_1 == 0 | |
93 && attr->line21_cc_2 == 0 | |
94 && attr->video_format == 0 | |
95 && attr->letterboxed == 0 | |
96 && attr->film_mode == 0) { | |
97 printf("-- Unspecified --"); | |
98 return; | |
99 } | |
100 | |
101 switch(attr->mpeg_version) { | |
102 case 0: | |
103 printf("mpeg1, "); | |
104 break; | |
105 case 1: | |
106 printf("mpeg2, "); | |
107 break; | |
108 default: | |
109 printf("(please send a bug report), "); | |
110 } | |
111 | |
112 switch(attr->video_format) { | |
113 case 0: | |
114 printf("ntsc, "); | |
115 break; | |
116 case 1: | |
117 printf("pal, "); | |
118 break; | |
119 default: | |
120 printf("(please send a bug report), "); | |
121 } | |
122 | |
123 switch(attr->display_aspect_ratio) { | |
124 case 0: | |
125 printf("4:3, "); | |
126 break; | |
127 case 3: | |
128 printf("16:9, "); | |
129 break; | |
130 default: | |
131 printf("(please send a bug report), "); | |
132 } | |
133 | |
134 // Wide is allways allowed..!!! | |
135 switch(attr->permitted_df) { | |
136 case 0: | |
137 printf("pan&scan+letterboxed, "); | |
138 break; | |
139 case 1: | |
140 printf("only pan&scan, "); //?? | |
141 break; | |
142 case 2: | |
143 printf("only letterboxed, "); | |
144 break; | |
145 case 3: | |
146 printf("not specified, "); | |
147 break; | |
148 default: | |
149 printf("(please send a bug report), "); | |
150 } | |
151 | |
152 printf("U%x, ", attr->unknown1); | |
153 assert(!attr->unknown1); | |
154 | |
155 if(attr->line21_cc_1 || attr->line21_cc_2) { | |
156 printf("NTSC CC "); | |
157 if(attr->line21_cc_1) | |
158 printf("1, "); | |
159 if(attr->line21_cc_2) | |
160 printf("2, "); | |
161 } | |
162 | |
163 { | |
164 int height = 480; | |
165 if(attr->video_format != 0) | |
166 height = 576; | |
167 switch(attr->picture_size) { | |
168 case 0: | |
169 printf("720x%d, ", height); | |
170 break; | |
171 case 1: | |
172 printf("704x%d, ", height); | |
173 break; | |
174 case 2: | |
175 printf("352x%d, ", height); | |
176 break; | |
177 case 3: | |
178 printf("352x%d, ", height/2); | |
179 break; | |
180 default: | |
181 printf("(please send a bug report), "); | |
182 } | |
183 } | |
184 | |
185 if(attr->letterboxed) { | |
186 printf("source letterboxed, "); | |
187 } | |
188 | |
189 if(attr->film_mode) { | |
190 printf("film. "); | |
191 } else { | |
192 printf("video. "); //camera | |
193 } | |
194 } | |
195 | |
196 static void ifo_print_audio_attributes(int level, audio_attr_t *attr) { | |
197 | |
198 if(attr->audio_format == 0 | |
199 && attr->multichannel_extension == 0 | |
200 && attr->lang_type == 0 | |
201 && attr->application_mode == 0 | |
202 && attr->quantization == 0 | |
203 && attr->sample_frequency == 0 | |
204 && attr->channels == 0 | |
205 && attr->lang_extension == 0 | |
206 && attr->unknown1 == 0 | |
207 && attr->unknown3 == 0) { | |
208 printf("-- Unspecified --"); | |
209 return; | |
210 } | |
211 | |
212 switch(attr->audio_format) { | |
213 case 0: | |
214 printf("ac3 "); | |
215 if(attr->quantization != 3) | |
216 printf("(please send a bug report) ac3 quant/drc not 3 (%d)", attr->quantization); | |
217 break; | |
218 case 1: | |
219 printf("(please send a bug report) "); | |
220 break; | |
221 case 2: | |
222 printf("mpeg1 "); | |
223 case 3: | |
224 printf("mpeg2ext "); | |
225 switch(attr->quantization) { | |
226 case 0: | |
227 printf("no drc "); | |
228 break; | |
229 case 1: | |
230 printf("drc "); | |
231 break; | |
232 default: | |
233 printf("(please send a bug report) mpeg reserved quant/drc (%d)", attr->quantization); | |
234 } | |
235 break; | |
236 case 4: | |
237 printf("lpcm "); | |
238 switch(attr->quantization) { | |
239 case 0: | |
240 printf("16bit "); | |
241 break; | |
242 case 1: | |
243 printf("20bit "); | |
244 break; | |
245 case 2: | |
246 printf("24bit "); | |
247 break; | |
248 case 3: | |
249 printf("(please send a bug report) lpcm reserved quant/drc (%d)", attr->quantization); | |
250 break; | |
251 } | |
252 break; | |
253 case 5: | |
254 printf("(please send a bug report) "); | |
255 break; | |
256 case 6: | |
257 printf("dts "); | |
258 if(attr->quantization != 3) | |
259 printf("(please send a bug report) dts quant/drc not 3 (%d)", attr->quantization); | |
260 break; | |
261 default: | |
262 printf("(please send a bug report) "); | |
263 } | |
264 | |
265 if(attr->multichannel_extension) | |
266 printf("multichannel_extension "); | |
267 | |
268 switch(attr->lang_type) { | |
269 case 0: | |
270 // not specified | |
271 assert(attr->lang_code == 0 || attr->lang_code == 0xffff); | |
272 break; | |
273 case 1: | |
274 printf("%c%c ", attr->lang_code>>8, attr->lang_code & 0xff); | |
275 break; | |
276 default: | |
277 printf("(please send a bug report) "); | |
278 } | |
279 | |
280 switch(attr->application_mode) { | |
281 case 0: | |
282 // not specified | |
283 break; | |
284 case 1: | |
285 printf("karaoke mode "); | |
286 break; | |
287 case 2: | |
288 printf("surround sound mode "); | |
289 break; | |
290 default: | |
291 printf("(please send a bug report) "); | |
292 } | |
293 | |
294 switch(attr->quantization) { | |
295 case 0: | |
296 printf("16bit "); | |
297 break; | |
298 case 1: | |
299 printf("20bit "); | |
300 break; | |
301 case 2: | |
302 printf("24bit "); | |
303 break; | |
304 case 3: | |
305 printf("drc "); | |
306 break; | |
307 default: | |
308 printf("(please send a bug report) "); | |
309 } | |
310 | |
311 switch(attr->sample_frequency) { | |
312 case 0: | |
313 printf("48kHz "); | |
314 break; | |
315 case 1: | |
316 printf("??kHz "); | |
317 break; | |
318 default: | |
319 printf("sample_frequency %i (please send a bug report) ", | |
320 attr->sample_frequency); | |
321 } | |
322 | |
323 printf("%dCh ", attr->channels + 1); | |
324 | |
325 switch(attr->lang_extension) { | |
326 case 0: | |
327 printf("Not specified "); | |
328 break; | |
329 case 1: // Normal audio | |
330 printf("Normal Caption "); | |
331 break; | |
332 case 2: // visually imparied | |
333 printf("Audio for visually impaired "); | |
334 break; | |
335 case 3: // Directors 1 | |
336 printf("Director's comments 1 "); | |
337 break; | |
338 case 4: // Directors 2 | |
339 printf("Director's comments 2 "); | |
340 break; | |
341 //case 4: // Music score ? | |
342 default: | |
343 printf("(please send a bug report) "); | |
344 } | |
345 | |
346 printf("%d ", attr->unknown1); | |
347 printf("%d ", attr->unknown3); | |
348 } | |
349 | |
350 static void ifo_print_subp_attributes(int level, subp_attr_t *attr) { | |
351 | |
352 if(attr->type == 0 | |
353 && attr->lang_code == 0 | |
354 && attr->zero1 == 0 | |
355 && attr->zero2 == 0 | |
356 && attr->lang_extension== 0) { | |
357 printf("-- Unspecified --"); | |
358 return; | |
359 } | |
360 | |
361 printf("type %02x ", attr->type); | |
362 | |
363 if(isalpha((int)(attr->lang_code >> 8)) | |
364 && isalpha((int)(attr->lang_code & 0xff))) { | |
365 printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff); | |
366 } else { | |
367 printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8), | |
368 0xff & (unsigned)(attr->lang_code & 0xff)); | |
369 } | |
370 | |
371 printf("%d ", attr->zero1); | |
372 printf("%d ", attr->zero2); | |
373 | |
374 switch(attr->lang_extension) { | |
375 case 0: | |
376 printf("Not specified "); | |
377 break; | |
378 case 1: | |
379 printf("Caption with normal size character "); | |
380 break; | |
381 case 2: | |
382 printf("Caption with bigger size character "); | |
383 break; | |
384 case 3: | |
385 printf("Caption for children "); | |
386 break; | |
387 case 4: | |
388 printf("reserved "); | |
389 break; | |
390 case 5: | |
391 printf("Closed Caption with normal size character "); | |
392 break; | |
393 case 6: | |
394 printf("Closed Caption with bigger size character "); | |
395 break; | |
396 case 7: | |
397 printf("Closed Caption for children "); | |
398 break; | |
399 case 8: | |
400 printf("reserved "); | |
401 break; | |
402 case 9: | |
403 printf("Forced Caption"); | |
404 break; | |
405 case 10: | |
406 printf("reserved "); | |
407 break; | |
408 case 11: | |
409 printf("reserved "); | |
410 break; | |
411 case 12: | |
412 printf("reserved "); | |
413 break; | |
414 case 13: | |
415 printf("Director's comments with normal size character "); | |
416 break; | |
417 case 14: | |
418 printf("Director's comments with bigger size character "); | |
419 break; | |
420 case 15: | |
421 printf("Director's comments for children "); | |
422 break; | |
423 default: | |
424 printf("(please send a bug report) "); | |
425 } | |
426 | |
427 } | |
428 | |
429 | |
430 static void ifo_print_USER_OPS(user_ops_t *user_ops) { | |
431 uint32_t uops; | |
432 unsigned char *ptr = (unsigned char *)user_ops; | |
433 | |
434 uops = (*ptr++ << 24); | |
435 uops |= (*ptr++ << 16); | |
436 uops |= (*ptr++ << 8); | |
437 uops |= (*ptr++); | |
438 | |
439 if(uops == 0) { | |
440 printf("None\n"); | |
441 } else if(uops == 0x01ffffff) { | |
442 printf("All\n"); | |
443 } else { | |
444 if(user_ops->title_or_time_play) | |
445 printf("Title or Time Play, "); | |
446 if(user_ops->chapter_search_or_play) | |
447 printf("Chapter Search or Play, "); | |
448 if(user_ops->title_play) | |
449 printf("Title Play, "); | |
450 if(user_ops->stop) | |
451 printf("Stop, "); | |
452 if(user_ops->go_up) | |
453 printf("Go Up, "); | |
454 if(user_ops->time_or_chapter_search) | |
455 printf("Time or Chapter Search, "); | |
456 if(user_ops->prev_or_top_pg_search) | |
457 printf("Prev or Top PG Search, "); | |
458 if(user_ops->next_pg_search) | |
459 printf("Next PG Search, "); | |
460 if(user_ops->forward_scan) | |
461 printf("Forward Scan, "); | |
462 if(user_ops->backward_scan) | |
463 printf("Backward Scan, "); | |
464 if(user_ops->title_menu_call) | |
465 printf("Title Menu Call, "); | |
466 if(user_ops->root_menu_call) | |
467 printf("Root Menu Call, "); | |
468 if(user_ops->subpic_menu_call) | |
469 printf("SubPic Menu Call, "); | |
470 if(user_ops->audio_menu_call) | |
471 printf("Audio Menu Call, "); | |
472 if(user_ops->angle_menu_call) | |
473 printf("Angle Menu Call, "); | |
474 if(user_ops->chapter_menu_call) | |
475 printf("Chapter Menu Call, "); | |
476 if(user_ops->resume) | |
477 printf("Resume, "); | |
478 if(user_ops->button_select_or_activate) | |
479 printf("Button Select or Activate, "); | |
480 if(user_ops->still_off) | |
481 printf("Still Off, "); | |
482 if(user_ops->pause_on) | |
483 printf("Pause On, "); | |
484 if(user_ops->audio_stream_change) | |
485 printf("Audio Stream Change, "); | |
486 if(user_ops->subpic_stream_change) | |
487 printf("SubPic Stream Change, "); | |
488 if(user_ops->angle_change) | |
489 printf("Angle Change, "); | |
490 if(user_ops->karaoke_audio_pres_mode_change) | |
491 printf("Karaoke Audio Pres Mode Change, "); | |
492 if(user_ops->video_pres_mode_change) | |
493 printf("Video Pres Mode Change, "); | |
494 printf("\n"); | |
495 } | |
496 } | |
497 | |
498 | |
499 void ifo_print_VMGI_MAT(vmgi_mat_t *vmgi_mat) { | |
500 | |
501 printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier); | |
502 printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector); | |
503 printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector); | |
504 printf("Specification version number: %01x.%01x\n", | |
505 vmgi_mat->specification_version >> 4, | |
506 vmgi_mat->specification_version & 0xf); | |
507 /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */ | |
508 printf("VMG Category: %08x (Region Code=%02x)\n", vmgi_mat->vmg_category, ((vmgi_mat->vmg_category >> 16) & 0xff) ^0xff); | |
509 printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes); | |
510 printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr); | |
511 printf("Disc side %i\n", vmgi_mat->disc_side); | |
512 printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets); | |
513 printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier); | |
514 printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32)); | |
515 printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code); | |
516 printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte); | |
517 printf("Start byte of First Play PGC (FP PGC): %08x\n", | |
518 vmgi_mat->first_play_pgc); | |
519 printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs); | |
520 printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt); | |
521 printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut); | |
522 printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait); | |
523 printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt); | |
524 printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi); | |
525 printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt); | |
526 printf("Start sector of VMGM_VOBU_ADMAP: %08x\n", | |
527 vmgi_mat->vmgm_vobu_admap); | |
528 printf("Video attributes of VMGM_VOBS: "); | |
529 ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr); | |
530 printf("\n"); | |
531 printf("VMGM Number of Audio attributes: %i\n", | |
532 vmgi_mat->nr_of_vmgm_audio_streams); | |
533 if(vmgi_mat->nr_of_vmgm_audio_streams > 0) { | |
534 printf("\tstream %i status: ", 1); | |
535 ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr); | |
536 printf("\n"); | |
537 } | |
538 printf("VMGM Number of Sub-picture attributes: %i\n", | |
539 vmgi_mat->nr_of_vmgm_subp_streams); | |
540 if(vmgi_mat->nr_of_vmgm_subp_streams > 0) { | |
541 printf("\tstream %2i status: ", 1); | |
542 ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr); | |
543 printf("\n"); | |
544 } | |
545 } | |
546 | |
547 | |
548 void ifo_print_VTSI_MAT(vtsi_mat_t *vtsi_mat) { | |
549 int i; | |
550 | |
551 printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier); | |
552 printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector); | |
553 printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector); | |
554 printf("Specification version number: %01x.%01x\n", | |
555 vtsi_mat->specification_version>>4, | |
556 vtsi_mat->specification_version&0xf); | |
557 printf("VTS Category: %08x\n", vtsi_mat->vts_category); | |
558 printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte); | |
559 printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs); | |
560 printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs); | |
561 printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt); | |
562 printf("Start sector of VTS_PGCIT: %08x\n", vtsi_mat->vts_pgcit); | |
563 printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut); | |
564 printf("Start sector of VTS_TMAPT: %08x\n", vtsi_mat->vts_tmapt); | |
565 printf("Start sector of VTSM_C_ADT: %08x\n", vtsi_mat->vtsm_c_adt); | |
566 printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_admap); | |
567 printf("Start sector of VTS_C_ADT: %08x\n", vtsi_mat->vts_c_adt); | |
568 printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_admap); | |
569 | |
570 printf("Video attributes of VTSM_VOBS: "); | |
571 ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr); | |
572 printf("\n"); | |
573 | |
574 printf("VTSM Number of Audio attributes: %i\n", | |
575 vtsi_mat->nr_of_vtsm_audio_streams); | |
576 if(vtsi_mat->nr_of_vtsm_audio_streams > 0) { | |
577 printf("\tstream %i status: ", 1); | |
578 ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr); | |
579 printf("\n"); | |
580 } | |
581 | |
582 printf("VTSM Number of Sub-picture attributes: %i\n", | |
583 vtsi_mat->nr_of_vtsm_subp_streams); | |
584 if(vtsi_mat->nr_of_vtsm_subp_streams > 0) { | |
585 printf("\tstream %2i status: ", 1); | |
586 ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr); | |
587 printf("\n"); | |
588 } | |
589 | |
590 printf("Video attributes of VTS_VOBS: "); | |
591 ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr); | |
592 printf("\n"); | |
593 | |
594 printf("VTS Number of Audio attributes: %i\n", | |
595 vtsi_mat->nr_of_vts_audio_streams); | |
596 for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) { | |
597 printf("\tstream %i status: ", i); | |
598 ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]); | |
599 printf("\n"); | |
600 } | |
601 | |
602 printf("VTS Number of Subpicture attributes: %i\n", | |
603 vtsi_mat->nr_of_vts_subp_streams); | |
604 for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) { | |
605 printf("\tstream %2i status: ", i); | |
606 ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]); | |
607 printf("\n"); | |
608 } | |
609 } | |
610 | |
611 | |
612 static void ifo_print_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) { | |
613 int i; | |
614 | |
615 if(cmd_tbl == NULL) { | |
616 printf("No Command table present\n"); | |
617 return; | |
618 } | |
619 | |
620 printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre); | |
621 for(i = 0; i < cmd_tbl->nr_of_pre; i++) { | |
622 ifo_print_cmd(i, &cmd_tbl->pre_cmds[i]); | |
623 } | |
624 | |
625 printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post); | |
626 for(i = 0; i < cmd_tbl->nr_of_post; i++) { | |
627 ifo_print_cmd(i, &cmd_tbl->post_cmds[i]); | |
628 } | |
629 | |
630 printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell); | |
631 for(i = 0; i < cmd_tbl->nr_of_cell; i++) { | |
632 ifo_print_cmd(i, &cmd_tbl->cell_cmds[i]); | |
633 } | |
634 } | |
635 | |
636 | |
637 static void ifo_print_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int nr) { | |
638 int i; | |
639 | |
640 if(program_map == NULL) { | |
641 printf("No Program map present\n"); | |
642 return; | |
643 } | |
644 | |
645 for(i = 0; i < nr; i++) { | |
646 printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]); | |
647 } | |
648 } | |
649 | |
650 | |
651 static void ifo_print_CELL_PLAYBACK(cell_playback_t *cell_playback, int nr) { | |
652 int i; | |
653 | |
654 if(cell_playback == NULL) { | |
655 printf("No Cell Playback info present\n"); | |
656 return; | |
657 } | |
658 | |
659 for(i=0;i<nr;i++) { | |
660 printf("Cell: %3i ", i + 1); | |
661 | |
13
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
662 dvdread_print_time(&cell_playback[i].playback_time); |
3 | 663 printf("\t"); |
664 | |
665 if(cell_playback[i].block_mode || cell_playback[i].block_type) { | |
666 const char *s; | |
667 switch(cell_playback[i].block_mode) { | |
668 case 0: | |
669 s = "not a"; break; | |
670 case 1: | |
671 s = "the first"; break; | |
672 case 2: | |
673 default: | |
674 s = ""; break; | |
675 case 3: | |
676 s = "last"; break; | |
677 } | |
678 printf("%s cell in the block ", s); | |
679 | |
680 switch(cell_playback[i].block_type) { | |
681 case 0: | |
682 printf("not part of the block "); | |
683 break; | |
684 case 1: | |
685 printf("angle block "); | |
686 break; | |
687 case 2: | |
688 case 3: | |
689 printf("(send bug repport) "); | |
690 break; | |
691 } | |
692 } | |
693 if(cell_playback[i].seamless_play) | |
694 printf("presented seamlessly "); | |
695 if(cell_playback[i].interleaved) | |
696 printf("cell is interleaved "); | |
697 if(cell_playback[i].stc_discontinuity) | |
698 printf("STC_discontinuty "); | |
699 if(cell_playback[i].seamless_angle) | |
700 printf("only seamless angle "); | |
701 if(cell_playback[i].playback_mode) | |
702 printf("only still VOBUs "); | |
703 if(cell_playback[i].restricted) | |
704 printf("restricted cell "); | |
705 if(cell_playback[i].unknown2) | |
706 printf("Unknown 0x%x ", cell_playback[i].unknown2); | |
707 if(cell_playback[i].still_time) | |
708 printf("still time %d ", cell_playback[i].still_time); | |
709 if(cell_playback[i].cell_cmd_nr) | |
710 printf("cell command %d", cell_playback[i].cell_cmd_nr); | |
711 | |
712 printf("\n\tStart sector: %08x\tFirst ILVU end sector: %08x\n", | |
713 cell_playback[i].first_sector, | |
714 cell_playback[i].first_ilvu_end_sector); | |
715 printf("\tEnd sector: %08x\tLast VOBU start sector: %08x\n", | |
716 cell_playback[i].last_sector, | |
717 cell_playback[i].last_vobu_start_sector); | |
718 } | |
719 } | |
720 | |
721 static void ifo_print_CELL_POSITION(cell_position_t *cell_position, int nr) { | |
722 int i; | |
723 | |
724 if(cell_position == NULL) { | |
725 printf("No Cell Position info present\n"); | |
726 return; | |
727 } | |
728 | |
729 for(i=0;i<nr;i++) { | |
730 printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1, | |
731 cell_position[i].vob_id_nr, cell_position[i].cell_nr); | |
732 } | |
733 } | |
734 | |
735 | |
736 void ifo_print_PGC(pgc_t *pgc) { | |
737 int i; | |
738 | |
739 if (!pgc) { | |
740 printf("None\n"); | |
741 return; | |
742 } | |
743 printf("Number of Programs: %i\n", pgc->nr_of_programs); | |
744 printf("Number of Cells: %i\n", pgc->nr_of_cells); | |
745 /* Check that time is 0:0:0:0 also if nr_of_programs==0 */ | |
746 printf("Playback time: "); | |
13
4e610984cc3f
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents:
4
diff
changeset
|
747 dvdread_print_time(&pgc->playback_time); printf("\n"); |
3 | 748 |
749 /* If no programs/no time then does this mean anything? */ | |
750 printf("Prohibited user operations: "); | |
751 ifo_print_USER_OPS(&pgc->prohibited_ops); | |
752 | |
753 for(i = 0; i < 8; i++) { | |
754 if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */ | |
755 printf("Audio stream %i control: %04x\n", | |
756 i, pgc->audio_control[i]); | |
757 } | |
758 } | |
759 | |
760 for(i = 0; i < 32; i++) { | |
761 if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */ | |
762 printf("Subpicture stream %2i control: %08x: 4:3=%d, Wide=%d, Letterbox=%d, Pan-Scan=%d\n", | |
763 i, pgc->subp_control[i], | |
764 (pgc->subp_control[i] >>24) & 0x1f, | |
765 (pgc->subp_control[i] >>16) & 0x1f, | |
766 (pgc->subp_control[i] >>8) & 0x1f, | |
767 (pgc->subp_control[i] ) & 0x1f); | |
768 } | |
769 } | |
770 | |
771 printf("Next PGC number: %i\n", pgc->next_pgc_nr); | |
772 printf("Prev PGC number: %i\n", pgc->prev_pgc_nr); | |
773 printf("GoUp PGC number: %i\n", pgc->goup_pgc_nr); | |
774 if(pgc->nr_of_programs != 0) { | |
775 printf("Still time: %i seconds (255=inf)\n", pgc->still_time); | |
776 printf("PG Playback mode %02x\n", pgc->pg_playback_mode); | |
777 } | |
778 | |
779 if(pgc->nr_of_programs != 0) { | |
780 for(i = 0; i < 16; i++) { | |
781 printf("Color %2i: %08x\n", i, pgc->palette[i]); | |
782 } | |
783 } | |
784 | |
785 /* Memmory offsets to div. tables. */ | |
786 ifo_print_PGC_COMMAND_TBL(pgc->command_tbl); | |
787 ifo_print_PGC_PROGRAM_MAP(pgc->program_map, pgc->nr_of_programs); | |
788 ifo_print_CELL_PLAYBACK(pgc->cell_playback, pgc->nr_of_cells); | |
789 ifo_print_CELL_POSITION(pgc->cell_position, pgc->nr_of_cells); | |
790 } | |
791 | |
792 | |
793 void ifo_print_TT_SRPT(tt_srpt_t *tt_srpt) { | |
794 int i; | |
795 | |
796 printf("Number of TitleTrack search pointers: %i\n", | |
797 tt_srpt->nr_of_srpts); | |
798 for(i=0;i<tt_srpt->nr_of_srpts;i++) { | |
799 printf("Title Track index %i\n", i + 1); | |
800 printf("\tTitle set number (VTS): %i", | |
801 tt_srpt->title[i].title_set_nr); | |
802 printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn); | |
803 printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts); | |
804 printf("\tNumber of angles: %i\n", | |
805 tt_srpt->title[i].nr_of_angles); | |
806 | |
807 printf("\tTitle playback type: (%02x)\n", | |
808 *(uint8_t *)&(tt_srpt->title[i].pb_ty)); | |
809 printf("\t\t%s\n", | |
810 tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ? "Random or Shuffle" : "Sequencial"); | |
811 if (tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd) printf("\t\tJump/Link/Call exists in cell cmd\n"); | |
812 if (tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd) printf("\t\tJump/Link/Call exists in pre/post cmd\n"); | |
813 if (tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd) printf("\t\tJump/Link/Call exists in button cmd\n"); | |
814 if (tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom) printf("\t\tJump/Link/Call exists in tt_dom cmd\n"); | |
815 printf("\t\tTitle or time play:%d\n", tt_srpt->title[i].pb_ty.title_or_time_play); | |
816 printf("\t\tChapter search or play:%d\n", tt_srpt->title[i].pb_ty.chapter_search_or_play); | |
817 | |
818 printf("\tParental ID field: %04x\n", | |
819 tt_srpt->title[i].parental_id); | |
820 printf("\tTitle set starting sector %08x\n", | |
821 tt_srpt->title[i].title_set_sector); | |
822 } | |
823 } | |
824 | |
825 | |
826 void ifo_print_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) { | |
827 int i, j; | |
828 printf(" nr_of_srpts %i last byte %i\n", | |
829 vts_ptt_srpt->nr_of_srpts, | |
830 vts_ptt_srpt->last_byte); | |
831 for(i=0;i<vts_ptt_srpt->nr_of_srpts;i++) { | |
832 for(j=0;j<vts_ptt_srpt->title[i].nr_of_ptts;j++) { | |
833 printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n", | |
834 i + 1, j + 1, | |
835 vts_ptt_srpt->title[i].ptt[j].pgcn, | |
836 vts_ptt_srpt->title[i].ptt[j].pgn ); | |
837 } | |
838 } | |
839 } | |
840 | |
841 | |
842 static void hexdump(uint8_t *ptr, int len) { | |
843 while(len--) | |
844 printf("%02x ", *ptr++); | |
845 } | |
846 | |
847 void ifo_print_PTL_MAIT(ptl_mait_t *ptl_mait) { | |
848 int i, j; | |
849 | |
850 printf("Number of Countries: %i\n", ptl_mait->nr_of_countries); | |
851 printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss); | |
852 //printf("Last byte: %i\n", ptl_mait->last_byte); | |
853 | |
854 for(i = 0; i < ptl_mait->nr_of_countries; i++) { | |
855 printf("Country code: %c%c\n", | |
856 ptl_mait->countries[i].country_code >> 8, | |
857 ptl_mait->countries[i].country_code & 0xff); | |
858 /* | |
859 printf("Start byte: %04x %i\n", | |
860 ptl_mait->countries[i].pf_ptl_mai_start_byte, | |
861 ptl_mait->countries[i].pf_ptl_mai_start_byte); | |
862 */ | |
863 /* This seems to be pointing at a array with 8 2byte fields per VTS | |
864 ? and one extra for the menu? always an odd number of VTSs on | |
865 all the dics I tested so it might be padding to even also. | |
866 If it is for the menu it probably the first entry. */ | |
867 for(j=0;j<8;j++) { | |
868 hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE | |
869 + ptl_mait->countries[i].pf_ptl_mai_start_byte | |
870 + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2); | |
871 printf("\n"); | |
872 } | |
873 } | |
874 } | |
875 | |
876 void ifo_print_VTS_TMAPT(vts_tmapt_t *vts_tmapt) { | |
877 unsigned int timeunit; | |
878 int i, j; | |
879 | |
880 printf("Number of VTS_TMAPS: %i\n", vts_tmapt->nr_of_tmaps); | |
881 printf("Last byte: %i\n", vts_tmapt->last_byte); | |
882 | |
883 for(i = 0; i < vts_tmapt->nr_of_tmaps; i++) { | |
884 printf("TMAP %i (number matches title PGC number.)\n", i + 1); | |
885 printf(" offset %d relative to VTS_TMAPTI\n", vts_tmapt->tmap_offset[i]); | |
886 printf(" Time unit (seconds): %i\n", vts_tmapt->tmap[i].tmu); | |
887 printf(" Number of entries: %i\n", vts_tmapt->tmap[i].nr_of_entries); | |
888 timeunit = vts_tmapt->tmap[i].tmu; | |
889 for(j = 0; j < vts_tmapt->tmap[i].nr_of_entries; j++) { | |
890 unsigned int ac_time = timeunit * (j + 1); | |
891 printf("Time: %2i:%02i:%02i VOBU Sector: 0x%08x %s\n", | |
892 ac_time / (60 * 60), (ac_time / 60) % 60, ac_time % 60, | |
893 vts_tmapt->tmap[i].map_ent[j] & 0x7fffffff, | |
894 (vts_tmapt->tmap[i].map_ent[j] >> 31) ? "discontinuity" : ""); | |
895 } | |
896 } | |
897 } | |
898 | |
899 void ifo_print_C_ADT(c_adt_t *c_adt) { | |
900 int i, entries; | |
901 | |
902 printf("Number of VOBs in this VOBS: %i\n", c_adt->nr_of_vobs); | |
903 //entries = c_adt->nr_of_vobs; | |
904 entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t); | |
905 | |
906 for(i = 0; i < entries; i++) { | |
907 printf("VOB ID: %3i, Cell ID: %3i ", | |
908 c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id); | |
909 printf("Sector (first): 0x%08x (last): 0x%08x\n", | |
910 c_adt->cell_adr_table[i].start_sector, | |
911 c_adt->cell_adr_table[i].last_sector); | |
912 } | |
913 } | |
914 | |
915 | |
916 void ifo_print_VOBU_ADMAP(vobu_admap_t *vobu_admap) { | |
917 int i, entries; | |
918 | |
919 entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4; | |
920 for(i = 0; i < entries; i++) { | |
921 printf("VOBU %5i First sector: 0x%08x\n", i + 1, | |
922 vobu_admap->vobu_start_sectors[i]); | |
923 } | |
924 } | |
925 | |
926 const char *ifo_print_menu_name(int type) { | |
927 const char *menu_name; | |
928 menu_name=""; | |
929 switch (type) { | |
930 case 2: | |
931 menu_name="Title"; | |
932 break; | |
933 case 3: | |
934 menu_name = "Root"; | |
935 break; | |
936 case 4: | |
937 menu_name = "Sub-Picture"; | |
938 break; | |
939 case 5: | |
940 menu_name = "Audio"; | |
941 break; | |
942 case 6: | |
943 menu_name = "Angle"; | |
944 break; | |
945 case 7: | |
946 menu_name = "PTT (Chapter)"; | |
947 break; | |
948 default: | |
949 menu_name = "Unknown"; | |
950 break; | |
951 } | |
952 return &menu_name[0]; | |
953 } | |
954 | |
955 /* pgc_type=1 for menu, 0 for title. */ | |
956 void ifo_print_PGCIT(pgcit_t *pgcit, int pgc_type) { | |
957 int i; | |
958 | |
959 printf("\nNumber of Program Chains: %3i\n", pgcit->nr_of_pgci_srp); | |
960 for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { | |
961 printf("\nProgram (PGC): %3i\n", i + 1); | |
962 if (pgc_type) { | |
963 printf("PGC Category: Entry PGC %d, Menu Type=0x%02x:%s (Entry id 0x%02x), ", | |
964 pgcit->pgci_srp[i].entry_id >> 7, | |
965 pgcit->pgci_srp[i].entry_id & 0xf, | |
966 ifo_print_menu_name(pgcit->pgci_srp[i].entry_id & 0xf), | |
967 pgcit->pgci_srp[i].entry_id); | |
968 } else { | |
969 printf("PGC Category: %s VTS_TTN:0x%02x (Entry id 0x%02x), ", | |
970 pgcit->pgci_srp[i].entry_id >> 7 ? "At Start of" : "During", | |
971 pgcit->pgci_srp[i].entry_id & 0xf, | |
972 pgcit->pgci_srp[i].entry_id); | |
973 } | |
974 printf("Parental ID mask 0x%04x\n", pgcit->pgci_srp[i].ptl_id_mask); | |
975 ifo_print_PGC(pgcit->pgci_srp[i].pgc); | |
976 } | |
977 } | |
978 | |
979 | |
980 void ifo_print_PGCI_UT(pgci_ut_t *pgci_ut) { | |
981 int i, menu; | |
982 | |
983 printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus); | |
984 for(i = 0; i < pgci_ut->nr_of_lus; i++) { | |
985 printf("\nMenu Language Unit %d\n", i+1); | |
986 printf("\nMenu Language Code: %c%c\n", | |
987 pgci_ut->lu[i].lang_code >> 8, | |
988 pgci_ut->lu[i].lang_code & 0xff); | |
989 | |
990 menu = pgci_ut->lu[i].exists; | |
991 printf("Menu Existence: %02x: ", menu); | |
992 if (menu == 0) { | |
993 printf("No menus "); | |
994 } | |
995 if (menu & 0x80) { | |
996 printf("Root "); | |
997 menu^=0x80; | |
998 } | |
999 if (menu & 0x40) { | |
1000 printf("Sub-Picture "); | |
1001 menu^=0x40; | |
1002 } | |
1003 if (menu & 0x20) { | |
1004 printf("Audio "); | |
1005 menu^=0x20; | |
1006 } | |
1007 if (menu & 0x10) { | |
1008 printf("Angle "); | |
1009 menu^=0x10; | |
1010 } | |
1011 if (menu & 0x08) { | |
1012 printf("PTT "); | |
1013 menu^=0x08; | |
1014 } | |
1015 if (menu > 0) { | |
1016 printf("Unknown extra menus "); | |
1017 menu^=0x08; | |
1018 } | |
1019 printf("\n"); | |
1020 ifo_print_PGCIT(pgci_ut->lu[i].pgcit, 1); | |
1021 } | |
1022 } | |
1023 | |
1024 | |
1025 static void ifo_print_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) { | |
1026 int i; | |
1027 | |
1028 printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat); | |
1029 | |
1030 printf("Video attributes of VTSM_VOBS: "); | |
1031 ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr); | |
1032 printf("\n"); | |
1033 printf("Number of Audio streams: %i\n", | |
1034 vts_attributes->nr_of_vtsm_audio_streams); | |
1035 if(vts_attributes->nr_of_vtsm_audio_streams > 0) { | |
1036 printf("\tstream %i attributes: ", 1); | |
1037 ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr); | |
1038 printf("\n"); | |
1039 } | |
1040 printf("Number of Subpicture streams: %i\n", | |
1041 vts_attributes->nr_of_vtsm_subp_streams); | |
1042 if(vts_attributes->nr_of_vtsm_subp_streams > 0) { | |
1043 printf("\tstream %2i attributes: ", 1); | |
1044 ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr); | |
1045 printf("\n"); | |
1046 } | |
1047 | |
1048 printf("Video attributes of VTSTT_VOBS: "); | |
1049 ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr); | |
1050 printf("\n"); | |
1051 printf("Number of Audio streams: %i\n", | |
1052 vts_attributes->nr_of_vtstt_audio_streams); | |
1053 for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) { | |
1054 printf("\tstream %i attributes: ", i); | |
1055 ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]); | |
1056 printf("\n"); | |
1057 } | |
1058 | |
1059 printf("Number of Subpicture streams: %i\n", | |
1060 vts_attributes->nr_of_vtstt_subp_streams); | |
1061 for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) { | |
1062 printf("\tstream %2i attributes: ", i); | |
1063 ifo_print_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]); | |
1064 printf("\n"); | |
1065 } | |
1066 } | |
1067 | |
1068 | |
1069 void ifo_print_VTS_ATRT(vts_atrt_t *vts_atrt) { | |
1070 int i; | |
1071 | |
1072 printf("Number of Video Title Sets: %3i\n", vts_atrt->nr_of_vtss); | |
1073 for(i = 0; i < vts_atrt->nr_of_vtss; i++) { | |
1074 printf("\nVideo Title Set %i\n", i + 1); | |
1075 ifo_print_VTS_ATTRIBUTES(&vts_atrt->vts[i]); | |
1076 } | |
1077 } | |
1078 | |
1079 | |
1080 void ifo_print(dvd_reader_t *dvd, int title) { | |
1081 ifo_handle_t *ifohandle; | |
1082 printf("Local ifo_print\n"); | |
1083 ifohandle = ifoOpen(dvd, title); | |
1084 if(!ifohandle) { | |
1085 fprintf(stderr, "Can't open info file for title %d\n", title); | |
1086 return; | |
1087 } | |
1088 | |
1089 | |
1090 if(ifohandle->vmgi_mat) { | |
1091 | |
1092 printf("VMG top level\n-------------\n"); | |
1093 ifo_print_VMGI_MAT(ifohandle->vmgi_mat); | |
1094 | |
1095 printf("\nFirst Play PGC\n--------------\n"); | |
1096 if(ifohandle->first_play_pgc) | |
1097 ifo_print_PGC(ifohandle->first_play_pgc); | |
1098 else | |
1099 printf("No First Play PGC present\n"); | |
1100 | |
1101 printf("\nTitle Track search pointer table\n"); | |
1102 printf( "------------------------------------------------\n"); | |
1103 ifo_print_TT_SRPT(ifohandle->tt_srpt); | |
1104 | |
1105 printf("\nMenu PGCI Unit table\n"); | |
1106 printf( "--------------------\n"); | |
1107 if(ifohandle->pgci_ut) { | |
1108 ifo_print_PGCI_UT(ifohandle->pgci_ut); | |
1109 } else { | |
1110 printf("No PGCI Unit table present\n"); | |
1111 } | |
1112 | |
1113 printf("\nParental Manegment Information table\n"); | |
1114 printf( "------------------------------------\n"); | |
1115 if(ifohandle->ptl_mait) { | |
1116 ifo_print_PTL_MAIT(ifohandle->ptl_mait); | |
1117 } else { | |
1118 printf("No Parental Management Information present\n"); | |
1119 } | |
1120 | |
1121 printf("\nVideo Title Set Attribute Table\n"); | |
1122 printf( "-------------------------------\n"); | |
1123 ifo_print_VTS_ATRT(ifohandle->vts_atrt); | |
1124 | |
1125 printf("\nText Data Manager Information\n"); | |
1126 printf( "-----------------------------\n"); | |
1127 if(ifohandle->txtdt_mgi) { | |
1128 //ifo_print_TXTDT_MGI(&(vmgi->txtdt_mgi)); | |
1129 } else { | |
1130 printf("No Text Data Manager Information present\n"); | |
1131 } | |
1132 | |
1133 printf("\nMenu Cell Adress table\n"); | |
1134 printf( "-----------------\n"); | |
1135 if(ifohandle->menu_c_adt) { | |
1136 ifo_print_C_ADT(ifohandle->menu_c_adt); | |
1137 } else { | |
1138 printf("No Menu Cell Adress table present\n"); | |
1139 } | |
1140 | |
1141 printf("\nVideo Manager Menu VOBU address map\n"); | |
1142 printf( "-----------------\n"); | |
1143 if(ifohandle->menu_vobu_admap) { | |
1144 ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); | |
1145 } else { | |
1146 printf("No Menu VOBU address map present\n"); | |
1147 } | |
1148 } | |
1149 | |
1150 | |
1151 if(ifohandle->vtsi_mat) { | |
1152 | |
1153 printf("VTS top level\n-------------\n"); | |
1154 ifo_print_VTSI_MAT(ifohandle->vtsi_mat); | |
1155 | |
1156 printf("\nPart of Title Track search pointer table\n"); | |
1157 printf( "----------------------------------------------\n"); | |
1158 ifo_print_VTS_PTT_SRPT(ifohandle->vts_ptt_srpt); | |
1159 | |
1160 printf("\nPGCI Unit table\n"); | |
1161 printf( "--------------------\n"); | |
1162 ifo_print_PGCIT(ifohandle->vts_pgcit, 0); | |
1163 | |
1164 printf("\nMenu PGCI Unit table\n"); | |
1165 printf( "--------------------\n"); | |
1166 if(ifohandle->pgci_ut) { | |
1167 ifo_print_PGCI_UT(ifohandle->pgci_ut); | |
1168 } else { | |
1169 printf("No Menu PGCI Unit table present\n"); | |
1170 } | |
1171 | |
1172 printf("\nVTS Time Map table\n"); | |
1173 printf( "-----------------\n"); | |
1174 if(ifohandle->vts_tmapt) { | |
1175 ifo_print_VTS_TMAPT(ifohandle->vts_tmapt); | |
1176 } else { | |
1177 printf("No VTS Time Map table present\n"); | |
1178 } | |
1179 | |
1180 printf("\nMenu Cell Adress table\n"); | |
1181 printf( "-----------------\n"); | |
1182 if(ifohandle->menu_c_adt) { | |
1183 ifo_print_C_ADT(ifohandle->menu_c_adt); | |
1184 } else { | |
1185 printf("No Cell Adress table present\n"); | |
1186 } | |
1187 | |
1188 printf("\nVideo Title Set Menu VOBU address map\n"); | |
1189 printf( "-----------------\n"); | |
1190 if(ifohandle->menu_vobu_admap) { | |
1191 ifo_print_VOBU_ADMAP(ifohandle->menu_vobu_admap); | |
1192 } else { | |
1193 printf("No Menu VOBU address map present\n"); | |
1194 } | |
1195 | |
1196 printf("\nCell Adress table\n"); | |
1197 printf( "-----------------\n"); | |
1198 ifo_print_C_ADT(ifohandle->vts_c_adt); | |
1199 | |
1200 printf("\nVideo Title Set VOBU address map\n"); | |
1201 printf( "-----------------\n"); | |
1202 ifo_print_VOBU_ADMAP(ifohandle->vts_vobu_admap); | |
1203 } | |
1204 | |
1205 ifoClose(ifohandle); | |
1206 } | |
1207 | |
1208 /* | |
1209 * $Log$ | |
1210 * Revision 1.3 2004/10/22 11:36:19 jcdutton | |
1211 * Stop seg fault when using ifo_dump. | |
1212 * | |
1213 * Revision 1.2 2004/09/27 12:24:01 jcdutton | |
1214 * Add extra info to printout when using ifo_dump. | |
1215 * | |
1216 * Revision 1.1 2004/01/11 21:43:13 mroi | |
1217 * big build system changes | |
1218 * * cleaned up all Makefiles and added a Makefile.common | |
1219 * * added relchk script | |
1220 * * moved libdvdread files to a dvdread subdir | |
1221 * * moved DVD VM to a vm subdir | |
1222 * * removed unused code in read_cache.c | |
1223 * | |
1224 * Revision 1.4 2004/01/01 15:13:13 jcdutton | |
1225 * Put ifo_print.c and .h back in. | |
1226 * | |
1227 * Revision 1.7 2003/04/28 15:17:17 jcdutton | |
1228 * Update ifodump to work with new libdvdnav cvs, instead of needing libdvdread. | |
1229 * | |
1230 * Revision 1.6 2003/04/05 22:49:04 jcdutton | |
1231 * Update with more info from the latest libdvdread. | |
1232 * | |
1233 * Revision 1.5 2003/04/05 13:03:49 jcdutton | |
1234 * Small updates. | |
1235 * | |
1236 * Revision 1.4 2003/04/01 08:01:03 jcdutton | |
1237 * Add VTS Time map display. Requires libdvdread 0.9.4. The same version that comes with xine. | |
1238 * | |
1239 * Revision 1.3 2003/03/14 15:49:18 mroi | |
1240 * adjust to new libdvdread version | |
1241 * | |
1242 * Revision 1.2 2002/08/30 05:12:33 jcdutton | |
1243 * Minor update now that I know what PGC Entry IDs are for. | |
1244 * | |
1245 * Revision 1.1.1.1 2002/08/28 09:48:35 jcdutton | |
1246 * Initial import into CVS. | |
1247 * | |
1248 * | |
1249 * | |
1250 */ | |
1251 |