comparison ifo_print.c @ 26:0d82d0f30c98 src

cosmetics: Convert all tabs to spaces.
author diego
date Tue, 23 Sep 2008 09:14:45 +0000
parents 3552a3d11604
children 98951f8ec89c
comparison
equal deleted inserted replaced
25:17258a7b3239 26:0d82d0f30c98
35 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); 35 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
36 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); 36 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
37 assert((dtime->frame_u&0xf) < 0xa); 37 assert((dtime->frame_u&0xf) < 0xa);
38 38
39 printf("%02x:%02x:%02x.%02x", 39 printf("%02x:%02x:%02x.%02x",
40 dtime->hour, 40 dtime->hour,
41 dtime->minute, 41 dtime->minute,
42 dtime->second, 42 dtime->second,
43 dtime->frame_u & 0x3f); 43 dtime->frame_u & 0x3f);
44 switch((dtime->frame_u & 0xc0) >> 6) { 44 switch((dtime->frame_u & 0xc0) >> 6) {
45 case 1: 45 case 1:
46 rate = "25.00"; 46 rate = "25.00";
47 break; 47 break;
48 case 3: 48 case 3:
314 case 1: 314 case 1:
315 printf("??kHz "); 315 printf("??kHz ");
316 break; 316 break;
317 default: 317 default:
318 printf("sample_frequency %i (please send a bug report) ", 318 printf("sample_frequency %i (please send a bug report) ",
319 attr->sample_frequency); 319 attr->sample_frequency);
320 } 320 }
321 321
322 printf("%dCh ", attr->channels + 1); 322 printf("%dCh ", attr->channels + 1);
323 323
324 switch(attr->lang_extension) { 324 switch(attr->lang_extension) {
362 if(isalpha((int)(attr->lang_code >> 8)) 362 if(isalpha((int)(attr->lang_code >> 8))
363 && isalpha((int)(attr->lang_code & 0xff))) { 363 && isalpha((int)(attr->lang_code & 0xff))) {
364 printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff); 364 printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff);
365 } else { 365 } else {
366 printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8), 366 printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8),
367 0xff & (unsigned)(attr->lang_code & 0xff)); 367 0xff & (unsigned)(attr->lang_code & 0xff));
368 } 368 }
369 369
370 printf("%d ", attr->zero1); 370 printf("%d ", attr->zero1);
371 printf("%d ", attr->zero2); 371 printf("%d ", attr->zero2);
372 372
499 499
500 printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier); 500 printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier);
501 printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector); 501 printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector);
502 printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector); 502 printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector);
503 printf("Specification version number: %01x.%01x\n", 503 printf("Specification version number: %01x.%01x\n",
504 vmgi_mat->specification_version >> 4, 504 vmgi_mat->specification_version >> 4,
505 vmgi_mat->specification_version & 0xf); 505 vmgi_mat->specification_version & 0xf);
506 /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */ 506 /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */
507 printf("VMG Category: %08x (Region Code=%02x)\n", vmgi_mat->vmg_category, ((vmgi_mat->vmg_category >> 16) & 0xff) ^0xff); 507 printf("VMG Category: %08x (Region Code=%02x)\n", vmgi_mat->vmg_category, ((vmgi_mat->vmg_category >> 16) & 0xff) ^0xff);
508 printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes); 508 printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes);
509 printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr); 509 printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr);
510 printf("Disc side %i\n", vmgi_mat->disc_side); 510 printf("Disc side %i\n", vmgi_mat->disc_side);
512 printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier); 512 printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier);
513 printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32)); 513 printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32));
514 printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code); 514 printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code);
515 printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte); 515 printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte);
516 printf("Start byte of First Play PGC (FP PGC): %08x\n", 516 printf("Start byte of First Play PGC (FP PGC): %08x\n",
517 vmgi_mat->first_play_pgc); 517 vmgi_mat->first_play_pgc);
518 printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs); 518 printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs);
519 printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt); 519 printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt);
520 printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut); 520 printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut);
521 printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait); 521 printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait);
522 printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt); 522 printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt);
523 printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi); 523 printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi);
524 printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt); 524 printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt);
525 printf("Start sector of VMGM_VOBU_ADMAP: %08x\n", 525 printf("Start sector of VMGM_VOBU_ADMAP: %08x\n",
526 vmgi_mat->vmgm_vobu_admap); 526 vmgi_mat->vmgm_vobu_admap);
527 printf("Video attributes of VMGM_VOBS: "); 527 printf("Video attributes of VMGM_VOBS: ");
528 ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr); 528 ifo_print_video_attributes(5, &vmgi_mat->vmgm_video_attr);
529 printf("\n"); 529 printf("\n");
530 printf("VMGM Number of Audio attributes: %i\n", 530 printf("VMGM Number of Audio attributes: %i\n",
531 vmgi_mat->nr_of_vmgm_audio_streams); 531 vmgi_mat->nr_of_vmgm_audio_streams);
532 if(vmgi_mat->nr_of_vmgm_audio_streams > 0) { 532 if(vmgi_mat->nr_of_vmgm_audio_streams > 0) {
533 printf("\tstream %i status: ", 1); 533 printf("\tstream %i status: ", 1);
534 ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr); 534 ifo_print_audio_attributes(5, &vmgi_mat->vmgm_audio_attr);
535 printf("\n"); 535 printf("\n");
536 } 536 }
537 printf("VMGM Number of Sub-picture attributes: %i\n", 537 printf("VMGM Number of Sub-picture attributes: %i\n",
538 vmgi_mat->nr_of_vmgm_subp_streams); 538 vmgi_mat->nr_of_vmgm_subp_streams);
539 if(vmgi_mat->nr_of_vmgm_subp_streams > 0) { 539 if(vmgi_mat->nr_of_vmgm_subp_streams > 0) {
540 printf("\tstream %2i status: ", 1); 540 printf("\tstream %2i status: ", 1);
541 ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr); 541 ifo_print_subp_attributes(5, &vmgi_mat->vmgm_subp_attr);
542 printf("\n"); 542 printf("\n");
543 } 543 }
549 549
550 printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier); 550 printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier);
551 printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector); 551 printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector);
552 printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector); 552 printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector);
553 printf("Specification version number: %01x.%01x\n", 553 printf("Specification version number: %01x.%01x\n",
554 vtsi_mat->specification_version>>4, 554 vtsi_mat->specification_version>>4,
555 vtsi_mat->specification_version&0xf); 555 vtsi_mat->specification_version&0xf);
556 printf("VTS Category: %08x\n", vtsi_mat->vts_category); 556 printf("VTS Category: %08x\n", vtsi_mat->vts_category);
557 printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte); 557 printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte);
558 printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs); 558 printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs);
559 printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs); 559 printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs);
560 printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt); 560 printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt);
569 printf("Video attributes of VTSM_VOBS: "); 569 printf("Video attributes of VTSM_VOBS: ");
570 ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr); 570 ifo_print_video_attributes(5, &vtsi_mat->vtsm_video_attr);
571 printf("\n"); 571 printf("\n");
572 572
573 printf("VTSM Number of Audio attributes: %i\n", 573 printf("VTSM Number of Audio attributes: %i\n",
574 vtsi_mat->nr_of_vtsm_audio_streams); 574 vtsi_mat->nr_of_vtsm_audio_streams);
575 if(vtsi_mat->nr_of_vtsm_audio_streams > 0) { 575 if(vtsi_mat->nr_of_vtsm_audio_streams > 0) {
576 printf("\tstream %i status: ", 1); 576 printf("\tstream %i status: ", 1);
577 ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr); 577 ifo_print_audio_attributes(5, &vtsi_mat->vtsm_audio_attr);
578 printf("\n"); 578 printf("\n");
579 } 579 }
580 580
581 printf("VTSM Number of Sub-picture attributes: %i\n", 581 printf("VTSM Number of Sub-picture attributes: %i\n",
582 vtsi_mat->nr_of_vtsm_subp_streams); 582 vtsi_mat->nr_of_vtsm_subp_streams);
583 if(vtsi_mat->nr_of_vtsm_subp_streams > 0) { 583 if(vtsi_mat->nr_of_vtsm_subp_streams > 0) {
584 printf("\tstream %2i status: ", 1); 584 printf("\tstream %2i status: ", 1);
585 ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr); 585 ifo_print_subp_attributes(5, &vtsi_mat->vtsm_subp_attr);
586 printf("\n"); 586 printf("\n");
587 } 587 }
589 printf("Video attributes of VTS_VOBS: "); 589 printf("Video attributes of VTS_VOBS: ");
590 ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr); 590 ifo_print_video_attributes(5, &vtsi_mat->vts_video_attr);
591 printf("\n"); 591 printf("\n");
592 592
593 printf("VTS Number of Audio attributes: %i\n", 593 printf("VTS Number of Audio attributes: %i\n",
594 vtsi_mat->nr_of_vts_audio_streams); 594 vtsi_mat->nr_of_vts_audio_streams);
595 for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) { 595 for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) {
596 printf("\tstream %i status: ", i); 596 printf("\tstream %i status: ", i);
597 ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]); 597 ifo_print_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]);
598 printf("\n"); 598 printf("\n");
599 } 599 }
600 600
601 printf("VTS Number of Subpicture attributes: %i\n", 601 printf("VTS Number of Subpicture attributes: %i\n",
602 vtsi_mat->nr_of_vts_subp_streams); 602 vtsi_mat->nr_of_vts_subp_streams);
603 for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) { 603 for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) {
604 printf("\tstream %2i status: ", i); 604 printf("\tstream %2i status: ", i);
605 ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]); 605 ifo_print_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]);
606 printf("\n"); 606 printf("\n");
607 } 607 }
663 663
664 if(cell_playback[i].block_mode || cell_playback[i].block_type) { 664 if(cell_playback[i].block_mode || cell_playback[i].block_type) {
665 const char *s; 665 const char *s;
666 switch(cell_playback[i].block_mode) { 666 switch(cell_playback[i].block_mode) {
667 case 0: 667 case 0:
668 s = "not a"; break; 668 s = "not a"; break;
669 case 1: 669 case 1:
670 s = "the first"; break; 670 s = "the first"; break;
671 case 2: 671 case 2:
672 default: 672 default:
673 s = ""; break; 673 s = ""; break;
674 case 3: 674 case 3:
675 s = "last"; break; 675 s = "last"; break;
676 } 676 }
677 printf("%s cell in the block ", s); 677 printf("%s cell in the block ", s);
678 678
679 switch(cell_playback[i].block_type) { 679 switch(cell_playback[i].block_type) {
680 case 0: 680 case 0:
681 printf("not part of the block "); 681 printf("not part of the block ");
682 break; 682 break;
683 case 1: 683 case 1:
684 printf("angle block "); 684 printf("angle block ");
685 break; 685 break;
686 case 2: 686 case 2:
687 case 3: 687 case 3:
688 printf("(send bug repport) "); 688 printf("(send bug repport) ");
689 break; 689 break;
690 } 690 }
691 } 691 }
692 if(cell_playback[i].seamless_play) 692 if(cell_playback[i].seamless_play)
693 printf("presented seamlessly "); 693 printf("presented seamlessly ");
694 if(cell_playback[i].interleaved) 694 if(cell_playback[i].interleaved)
707 printf("still time %d ", cell_playback[i].still_time); 707 printf("still time %d ", cell_playback[i].still_time);
708 if(cell_playback[i].cell_cmd_nr) 708 if(cell_playback[i].cell_cmd_nr)
709 printf("cell command %d", cell_playback[i].cell_cmd_nr); 709 printf("cell command %d", cell_playback[i].cell_cmd_nr);
710 710
711 printf("\n\tStart sector: %08x\tFirst ILVU end sector: %08x\n", 711 printf("\n\tStart sector: %08x\tFirst ILVU end sector: %08x\n",
712 cell_playback[i].first_sector, 712 cell_playback[i].first_sector,
713 cell_playback[i].first_ilvu_end_sector); 713 cell_playback[i].first_ilvu_end_sector);
714 printf("\tEnd sector: %08x\tLast VOBU start sector: %08x\n", 714 printf("\tEnd sector: %08x\tLast VOBU start sector: %08x\n",
715 cell_playback[i].last_sector, 715 cell_playback[i].last_sector,
716 cell_playback[i].last_vobu_start_sector); 716 cell_playback[i].last_vobu_start_sector);
717 } 717 }
718 } 718 }
719 719
720 static void ifo_print_CELL_POSITION(cell_position_t *cell_position, int nr) { 720 static void ifo_print_CELL_POSITION(cell_position_t *cell_position, int nr) {
721 int i; 721 int i;
725 return; 725 return;
726 } 726 }
727 727
728 for(i=0;i<nr;i++) { 728 for(i=0;i<nr;i++) {
729 printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1, 729 printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1,
730 cell_position[i].vob_id_nr, cell_position[i].cell_nr); 730 cell_position[i].vob_id_nr, cell_position[i].cell_nr);
731 } 731 }
732 } 732 }
733 733
734 734
735 void ifo_print_PGC(pgc_t *pgc) { 735 void ifo_print_PGC(pgc_t *pgc) {
749 printf("Prohibited user operations: "); 749 printf("Prohibited user operations: ");
750 ifo_print_USER_OPS(&pgc->prohibited_ops); 750 ifo_print_USER_OPS(&pgc->prohibited_ops);
751 751
752 for(i = 0; i < 8; i++) { 752 for(i = 0; i < 8; i++) {
753 if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */ 753 if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
754 printf("Audio stream %i control: %04x\n", 754 printf("Audio stream %i control: %04x\n",
755 i, pgc->audio_control[i]); 755 i, pgc->audio_control[i]);
756 } 756 }
757 } 757 }
758 758
759 for(i = 0; i < 32; i++) { 759 for(i = 0; i < 32; i++) {
760 if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */ 760 if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
761 printf("Subpicture stream %2i control: %08x: 4:3=%d, Wide=%d, Letterbox=%d, Pan-Scan=%d\n", 761 printf("Subpicture stream %2i control: %08x: 4:3=%d, Wide=%d, Letterbox=%d, Pan-Scan=%d\n",
762 i, pgc->subp_control[i], 762 i, pgc->subp_control[i],
763 (pgc->subp_control[i] >>24) & 0x1f, 763 (pgc->subp_control[i] >>24) & 0x1f,
764 (pgc->subp_control[i] >>16) & 0x1f, 764 (pgc->subp_control[i] >>16) & 0x1f,
765 (pgc->subp_control[i] >>8) & 0x1f, 765 (pgc->subp_control[i] >>8) & 0x1f,
766 (pgc->subp_control[i] ) & 0x1f); 766 (pgc->subp_control[i] ) & 0x1f);
767 } 767 }
768 } 768 }
769 769
770 printf("Next PGC number: %i\n", pgc->next_pgc_nr); 770 printf("Next PGC number: %i\n", pgc->next_pgc_nr);
771 printf("Prev PGC number: %i\n", pgc->prev_pgc_nr); 771 printf("Prev PGC number: %i\n", pgc->prev_pgc_nr);
791 791
792 void ifo_print_TT_SRPT(tt_srpt_t *tt_srpt) { 792 void ifo_print_TT_SRPT(tt_srpt_t *tt_srpt) {
793 int i; 793 int i;
794 794
795 printf("Number of TitleTrack search pointers: %i\n", 795 printf("Number of TitleTrack search pointers: %i\n",
796 tt_srpt->nr_of_srpts); 796 tt_srpt->nr_of_srpts);
797 for(i=0;i<tt_srpt->nr_of_srpts;i++) { 797 for(i=0;i<tt_srpt->nr_of_srpts;i++) {
798 printf("Title Track index %i\n", i + 1); 798 printf("Title Track index %i\n", i + 1);
799 printf("\tTitle set number (VTS): %i", 799 printf("\tTitle set number (VTS): %i",
800 tt_srpt->title[i].title_set_nr); 800 tt_srpt->title[i].title_set_nr);
801 printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn); 801 printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn);
802 printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts); 802 printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts);
803 printf("\tNumber of angles: %i\n", 803 printf("\tNumber of angles: %i\n",
804 tt_srpt->title[i].nr_of_angles); 804 tt_srpt->title[i].nr_of_angles);
805 805
806 printf("\tTitle playback type: (%02x)\n", 806 printf("\tTitle playback type: (%02x)\n",
807 *(uint8_t *)&(tt_srpt->title[i].pb_ty)); 807 *(uint8_t *)&(tt_srpt->title[i].pb_ty));
808 printf("\t\t%s\n", 808 printf("\t\t%s\n",
809 tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ? "Random or Shuffle" : "Sequencial"); 809 tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ? "Random or Shuffle" : "Sequencial");
810 if (tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd) printf("\t\tJump/Link/Call exists in cell cmd\n"); 810 if (tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd) printf("\t\tJump/Link/Call exists in cell cmd\n");
811 if (tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd) printf("\t\tJump/Link/Call exists in pre/post cmd\n"); 811 if (tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd) printf("\t\tJump/Link/Call exists in pre/post cmd\n");
812 if (tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd) printf("\t\tJump/Link/Call exists in button cmd\n"); 812 if (tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd) printf("\t\tJump/Link/Call exists in button cmd\n");
813 if (tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom) printf("\t\tJump/Link/Call exists in tt_dom cmd\n"); 813 if (tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom) printf("\t\tJump/Link/Call exists in tt_dom cmd\n");
814 printf("\t\tTitle or time play:%d\n", tt_srpt->title[i].pb_ty.title_or_time_play); 814 printf("\t\tTitle or time play:%d\n", tt_srpt->title[i].pb_ty.title_or_time_play);
815 printf("\t\tChapter search or play:%d\n", tt_srpt->title[i].pb_ty.chapter_search_or_play); 815 printf("\t\tChapter search or play:%d\n", tt_srpt->title[i].pb_ty.chapter_search_or_play);
816 816
817 printf("\tParental ID field: %04x\n", 817 printf("\tParental ID field: %04x\n",
818 tt_srpt->title[i].parental_id); 818 tt_srpt->title[i].parental_id);
819 printf("\tTitle set starting sector %08x\n", 819 printf("\tTitle set starting sector %08x\n",
820 tt_srpt->title[i].title_set_sector); 820 tt_srpt->title[i].title_set_sector);
821 } 821 }
822 } 822 }
823 823
824 824
825 void ifo_print_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) { 825 void ifo_print_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) {
826 int i, j; 826 int i, j;
827 printf(" nr_of_srpts %i last byte %i\n", 827 printf(" nr_of_srpts %i last byte %i\n",
828 vts_ptt_srpt->nr_of_srpts, 828 vts_ptt_srpt->nr_of_srpts,
829 vts_ptt_srpt->last_byte); 829 vts_ptt_srpt->last_byte);
830 for(i=0;i<vts_ptt_srpt->nr_of_srpts;i++) { 830 for(i=0;i<vts_ptt_srpt->nr_of_srpts;i++) {
831 for(j=0;j<vts_ptt_srpt->title[i].nr_of_ptts;j++) { 831 for(j=0;j<vts_ptt_srpt->title[i].nr_of_ptts;j++) {
832 printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n", 832 printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n",
833 i + 1, j + 1, 833 i + 1, j + 1,
834 vts_ptt_srpt->title[i].ptt[j].pgcn, 834 vts_ptt_srpt->title[i].ptt[j].pgcn,
835 vts_ptt_srpt->title[i].ptt[j].pgn ); 835 vts_ptt_srpt->title[i].ptt[j].pgn );
836 } 836 }
837 } 837 }
838 } 838 }
839 839
840 840
850 printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss); 850 printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss);
851 //printf("Last byte: %i\n", ptl_mait->last_byte); 851 //printf("Last byte: %i\n", ptl_mait->last_byte);
852 852
853 for(i = 0; i < ptl_mait->nr_of_countries; i++) { 853 for(i = 0; i < ptl_mait->nr_of_countries; i++) {
854 printf("Country code: %c%c\n", 854 printf("Country code: %c%c\n",
855 ptl_mait->countries[i].country_code >> 8, 855 ptl_mait->countries[i].country_code >> 8,
856 ptl_mait->countries[i].country_code & 0xff); 856 ptl_mait->countries[i].country_code & 0xff);
857 /* 857 /*
858 printf("Start byte: %04x %i\n", 858 printf("Start byte: %04x %i\n",
859 ptl_mait->countries[i].pf_ptl_mai_start_byte, 859 ptl_mait->countries[i].pf_ptl_mai_start_byte,
860 ptl_mait->countries[i].pf_ptl_mai_start_byte); 860 ptl_mait->countries[i].pf_ptl_mai_start_byte);
861 */ 861 */
863 ? and one extra for the menu? always an odd number of VTSs on 863 ? and one extra for the menu? always an odd number of VTSs on
864 all the dics I tested so it might be padding to even also. 864 all the dics I tested so it might be padding to even also.
865 If it is for the menu it probably the first entry. */ 865 If it is for the menu it probably the first entry. */
866 for(j=0;j<8;j++) { 866 for(j=0;j<8;j++) {
867 hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE 867 hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE
868 + ptl_mait->countries[i].pf_ptl_mai_start_byte 868 + ptl_mait->countries[i].pf_ptl_mai_start_byte
869 + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2); 869 + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2);
870 printf("\n"); 870 printf("\n");
871 } 871 }
872 } 872 }
873 } 873 }
874 874
902 //entries = c_adt->nr_of_vobs; 902 //entries = c_adt->nr_of_vobs;
903 entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t); 903 entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t);
904 904
905 for(i = 0; i < entries; i++) { 905 for(i = 0; i < entries; i++) {
906 printf("VOB ID: %3i, Cell ID: %3i ", 906 printf("VOB ID: %3i, Cell ID: %3i ",
907 c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id); 907 c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id);
908 printf("Sector (first): 0x%08x (last): 0x%08x\n", 908 printf("Sector (first): 0x%08x (last): 0x%08x\n",
909 c_adt->cell_adr_table[i].start_sector, 909 c_adt->cell_adr_table[i].start_sector,
910 c_adt->cell_adr_table[i].last_sector); 910 c_adt->cell_adr_table[i].last_sector);
911 } 911 }
912 } 912 }
913 913
914 914
915 void ifo_print_VOBU_ADMAP(vobu_admap_t *vobu_admap) { 915 void ifo_print_VOBU_ADMAP(vobu_admap_t *vobu_admap) {
916 int i, entries; 916 int i, entries;
917 917
918 entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4; 918 entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4;
919 for(i = 0; i < entries; i++) { 919 for(i = 0; i < entries; i++) {
920 printf("VOBU %5i First sector: 0x%08x\n", i + 1, 920 printf("VOBU %5i First sector: 0x%08x\n", i + 1,
921 vobu_admap->vobu_start_sectors[i]); 921 vobu_admap->vobu_start_sectors[i]);
922 } 922 }
923 } 923 }
924 924
925 const char *ifo_print_menu_name(int type) { 925 const char *ifo_print_menu_name(int type) {
926 const char *menu_name; 926 const char *menu_name;
981 981
982 printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus); 982 printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus);
983 for(i = 0; i < pgci_ut->nr_of_lus; i++) { 983 for(i = 0; i < pgci_ut->nr_of_lus; i++) {
984 printf("\nMenu Language Unit %d\n", i+1); 984 printf("\nMenu Language Unit %d\n", i+1);
985 printf("\nMenu Language Code: %c%c\n", 985 printf("\nMenu Language Code: %c%c\n",
986 pgci_ut->lu[i].lang_code >> 8, 986 pgci_ut->lu[i].lang_code >> 8,
987 pgci_ut->lu[i].lang_code & 0xff); 987 pgci_ut->lu[i].lang_code & 0xff);
988 988
989 menu = pgci_ut->lu[i].exists; 989 menu = pgci_ut->lu[i].exists;
990 printf("Menu Existence: %02x: ", menu); 990 printf("Menu Existence: %02x: ", menu);
991 if (menu == 0) { 991 if (menu == 0) {
992 printf("No menus "); 992 printf("No menus ");
1028 1028
1029 printf("Video attributes of VTSM_VOBS: "); 1029 printf("Video attributes of VTSM_VOBS: ");
1030 ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr); 1030 ifo_print_video_attributes(5, &vts_attributes->vtsm_vobs_attr);
1031 printf("\n"); 1031 printf("\n");
1032 printf("Number of Audio streams: %i\n", 1032 printf("Number of Audio streams: %i\n",
1033 vts_attributes->nr_of_vtsm_audio_streams); 1033 vts_attributes->nr_of_vtsm_audio_streams);
1034 if(vts_attributes->nr_of_vtsm_audio_streams > 0) { 1034 if(vts_attributes->nr_of_vtsm_audio_streams > 0) {
1035 printf("\tstream %i attributes: ", 1); 1035 printf("\tstream %i attributes: ", 1);
1036 ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr); 1036 ifo_print_audio_attributes(5, &vts_attributes->vtsm_audio_attr);
1037 printf("\n"); 1037 printf("\n");
1038 } 1038 }
1039 printf("Number of Subpicture streams: %i\n", 1039 printf("Number of Subpicture streams: %i\n",
1040 vts_attributes->nr_of_vtsm_subp_streams); 1040 vts_attributes->nr_of_vtsm_subp_streams);
1041 if(vts_attributes->nr_of_vtsm_subp_streams > 0) { 1041 if(vts_attributes->nr_of_vtsm_subp_streams > 0) {
1042 printf("\tstream %2i attributes: ", 1); 1042 printf("\tstream %2i attributes: ", 1);
1043 ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr); 1043 ifo_print_subp_attributes(5, &vts_attributes->vtsm_subp_attr);
1044 printf("\n"); 1044 printf("\n");
1045 } 1045 }
1046 1046
1047 printf("Video attributes of VTSTT_VOBS: "); 1047 printf("Video attributes of VTSTT_VOBS: ");
1048 ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr); 1048 ifo_print_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr);
1049 printf("\n"); 1049 printf("\n");
1050 printf("Number of Audio streams: %i\n", 1050 printf("Number of Audio streams: %i\n",
1051 vts_attributes->nr_of_vtstt_audio_streams); 1051 vts_attributes->nr_of_vtstt_audio_streams);
1052 for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) { 1052 for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) {
1053 printf("\tstream %i attributes: ", i); 1053 printf("\tstream %i attributes: ", i);
1054 ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]); 1054 ifo_print_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]);
1055 printf("\n"); 1055 printf("\n");
1056 } 1056 }
1057 1057
1058 printf("Number of Subpicture streams: %i\n", 1058 printf("Number of Subpicture streams: %i\n",
1059 vts_attributes->nr_of_vtstt_subp_streams); 1059 vts_attributes->nr_of_vtstt_subp_streams);
1060 for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) { 1060 for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) {
1061 printf("\tstream %2i attributes: ", i); 1061 printf("\tstream %2i attributes: ", i);
1062 ifo_print_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]); 1062 ifo_print_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]);
1063 printf("\n"); 1063 printf("\n");
1064 } 1064 }