annotate libmpdvdkit2/ifo_print.c @ 8023:3738cc2269a3

get stream back from the demuxer
author arpi
date Fri, 01 Nov 2002 16:10:15 +0000
parents 596919e4f601
children 25df9508f9a8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1 /*
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
2 * Copyright (C) 2000, 2001, 2002 Björn Englund <d4bjorn@dtek.chalmers.se>,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
3 * Håkan Hjort <d95hjort@dtek.chalmers.se>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
4 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
8 * (at your option) any later version.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
9 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
13 * GNU General Public License for more details.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
14 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
16 * along with this program; if not, write to the Free Software
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
18 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
19
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
20 #include <stdio.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
21 #include <stdlib.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
22 #include <unistd.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
23 #include <inttypes.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
24 #include <string.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
25 #include <ctype.h>
7033
596919e4f601 apply mplayer-specific patches
arpi
parents: 7029
diff changeset
26 //#include <assert.h>
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
27
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
28 #include "config.h" // Needed for WORDS_BIGENDIAN
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
29 #include "ifo_types.h"
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
30 #include "ifo_read.h"
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
31 #include "ifo_print.h"
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
32
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
33 /* Put this in some other file / package? It's used in nav_print too. */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
34 static void ifoPrint_time(int level, dvd_time_t *dtime) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
35 const char *rate;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
36 assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
37 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
38 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
39 assert((dtime->frame_u&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
40
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
41 printf("%02x:%02x:%02x.%02x",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
42 dtime->hour,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
43 dtime->minute,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
44 dtime->second,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
45 dtime->frame_u & 0x3f);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
46 switch((dtime->frame_u & 0xc0) >> 6) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
47 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
48 rate = "25.00";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
49 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
50 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
51 rate = "29.97";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
52 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
53 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
54 if(dtime->hour == 0 && dtime->minute == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
55 && dtime->second == 0 && dtime->frame_u == 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
56 rate = "no";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
57 else
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
58 rate = "(please send a bug report)";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
59 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
60 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
61 printf(" @ %s fps", rate);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
62 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
63
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
64 /* Put this in some other file / package? It's used in nav_print too.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
65 Possibly also by the vm / navigator. */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
66 static void ifoPrint_CMD(int row, vm_cmd_t *command) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
67 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
68
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
69 printf("(%03d) ", row + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
70 for(i=0;i<8;i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
71 printf("%02x ", command->bytes[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
72 printf("| ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
73
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
74 //vmcmd(command);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
75 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
76 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
77
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
78 static void ifoPrint_video_attributes(int level, video_attr_t *attr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
79
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
80 /* The following test is shorter but not correct ISO C,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
81 memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
82 if(attr->mpeg_version == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
83 && attr->video_format == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
84 && attr->display_aspect_ratio == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
85 && attr->permitted_df == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
86 && attr->unknown1 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
87 && attr->line21_cc_1 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
88 && attr->line21_cc_2 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
89 && attr->video_format == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
90 && attr->letterboxed == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
91 && attr->film_mode == 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
92 printf("-- Unspecified --");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
93 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
94 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
95
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
96 switch(attr->mpeg_version) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
97 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
98 printf("mpeg1 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
99 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
100 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
101 printf("mpeg2 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
102 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
103 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
104 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
105 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
106
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
107 switch(attr->video_format) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
108 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
109 printf("ntsc ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
110 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
111 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
112 printf("pal ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
113 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
114 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
115 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
116 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
117
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
118 switch(attr->display_aspect_ratio) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
119 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
120 printf("4:3 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
121 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
122 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
123 printf("16:9 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
124 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
125 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
126 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
127 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
128
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
129 // Wide is allways allowed..!!!
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
130 switch(attr->permitted_df) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
131 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
132 printf("pan&scan+letterboxed ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
133 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
134 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
135 printf("only pan&scan "); //??
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
136 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
137 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
138 printf("only letterboxed ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
139 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
140 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
141 // not specified
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
142 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
143 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
144 printf("(please send a bug report)");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
145 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
146
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
147 printf("U%x ", attr->unknown1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
148 assert(!attr->unknown1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
149
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
150 if(attr->line21_cc_1 || attr->line21_cc_2) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
151 printf("NTSC CC ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
152 if(attr->line21_cc_1)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
153 printf("1 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
154 if(attr->line21_cc_2)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
155 printf("2 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
156 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
157
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
158 {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
159 int height = 480;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
160 if(attr->video_format != 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
161 height = 576;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
162 switch(attr->picture_size) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
163 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
164 printf("720x%d ", height);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
165 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
166 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
167 printf("704x%d ", height);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
168 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
169 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
170 printf("352x%d ", height);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
171 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
172 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
173 printf("352x%d ", height/2);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
174 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
175 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
176 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
177 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
178 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
179
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
180 if(attr->letterboxed) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
181 printf("source letterboxed ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
182 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
183
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
184 if(attr->film_mode) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
185 printf("film");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
186 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
187 printf("video"); //camera
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
188 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
189 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
190
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
191 static void ifoPrint_audio_attributes(int level, audio_attr_t *attr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
192
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
193 if(attr->audio_format == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
194 && attr->multichannel_extension == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
195 && attr->lang_type == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
196 && attr->application_mode == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
197 && attr->quantization == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
198 && attr->sample_frequency == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
199 && attr->channels == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
200 && attr->lang_extension == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
201 && attr->unknown1 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
202 && attr->unknown1 == 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
203 printf("-- Unspecified --");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
204 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
205 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
206
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
207 switch(attr->audio_format) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
208 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
209 printf("ac3 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
210 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
211 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
212 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
213 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
214 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
215 printf("mpeg1 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
216 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
217 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
218 printf("mpeg2ext ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
219 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
220 case 4:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
221 printf("lpcm ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
222 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
223 case 5:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
224 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
225 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
226 case 6:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
227 printf("dts ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
228 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
229 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
230 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
231 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
232
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
233 if(attr->multichannel_extension)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
234 printf("multichannel_extension ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
235
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
236 switch(attr->lang_type) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
237 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
238 // not specified
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
239 assert(attr->lang_code == 0 || attr->lang_code == 0xffff);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
240 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
241 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
242 printf("%c%c ", attr->lang_code>>8, attr->lang_code & 0xff);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
243 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
244 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
245 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
246 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
247
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
248 switch(attr->application_mode) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
249 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
250 // not specified
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
251 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
252 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
253 printf("karaoke mode ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
254 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
255 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
256 printf("surround sound mode ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
257 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
258 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
259 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
260 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
261
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
262 switch(attr->quantization) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
263 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
264 printf("16bit ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
265 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
266 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
267 printf("20bit ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
268 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
269 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
270 printf("24bit ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
271 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
272 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
273 printf("drc ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
274 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
275 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
276 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
277 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
278
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
279 switch(attr->sample_frequency) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
280 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
281 printf("48kHz ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
282 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
283 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
284 printf("??kHz ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
285 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
286 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
287 printf("sample_frequency %i (please send a bug report) ",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
288 attr->sample_frequency);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
289 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
290
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
291 printf("%dCh ", attr->channels + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
292
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
293 switch(attr->lang_extension) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
294 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
295 printf("Not specified ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
296 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
297 case 1: // Normal audio
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
298 printf("Normal Caption ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
299 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
300 case 2: // visually imparied
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
301 printf("Audio for visually impaired ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
302 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
303 case 3: // Directors 1
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
304 printf("Director's comments 1 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
305 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
306 case 4: // Directors 2
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
307 printf("Director's comments 2 ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
308 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
309 //case 4: // Music score ?
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
310 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
311 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
312 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
313
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
314 printf("%d ", attr->unknown1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
315 printf("%d ", attr->unknown2);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
316 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
317
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
318 static void ifoPrint_subp_attributes(int level, subp_attr_t *attr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
319
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
320 if(attr->type == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
321 && attr->lang_code == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
322 && attr->zero1 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
323 && attr->zero2 == 0
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
324 && attr->lang_extension== 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
325 printf("-- Unspecified --");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
326 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
327 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
328
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
329 printf("type %02x ", attr->type);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
330
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
331 if(isalpha((int)(attr->lang_code >> 8))
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
332 && isalpha((int)(attr->lang_code & 0xff))) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
333 printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
334 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
335 printf("%02x%02x ", 0xff & (unsigned)(attr->lang_code >> 8),
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
336 0xff & (unsigned)(attr->lang_code & 0xff));
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
337 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
338
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
339 printf("%d ", attr->zero1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
340 printf("%d ", attr->zero2);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
341
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
342 switch(attr->lang_extension) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
343 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
344 printf("Not specified ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
345 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
346 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
347 printf("Caption with normal size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
348 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
349 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
350 printf("Caption with bigger size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
351 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
352 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
353 printf("Caption for children ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
354 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
355 case 4:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
356 printf("reserved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
357 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
358 case 5:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
359 printf("Closed Caption with normal size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
360 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
361 case 6:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
362 printf("Closed Caption with bigger size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
363 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
364 case 7:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
365 printf("Closed Caption for children ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
366 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
367 case 8:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
368 printf("reserved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
369 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
370 case 9:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
371 printf("Forced Caption");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
372 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
373 case 10:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
374 printf("reserved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
375 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
376 case 11:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
377 printf("reserved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
378 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
379 case 12:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
380 printf("reserved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
381 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
382 case 13:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
383 printf("Director's comments with normal size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
384 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
385 case 14:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
386 printf("Director's comments with bigger size character ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
387 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
388 case 15:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
389 printf("Director's comments for children ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
390 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
391 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
392 printf("(please send a bug report) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
393 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
394
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
395 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
396
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
397
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
398 static void ifoPrint_USER_OPS(user_ops_t *user_ops) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
399 uint32_t uops;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
400 unsigned char *ptr = (unsigned char *)user_ops;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
401
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
402 uops = (*ptr++ << 24);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
403 uops |= (*ptr++ << 16);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
404 uops |= (*ptr++ << 8);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
405 uops |= (*ptr++);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
406
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
407 if(uops == 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
408 printf("None\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
409 } else if(uops == 0x01ffffff) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
410 printf("All\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
411 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
412 if(user_ops->title_or_time_play)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
413 printf("Title or Time Play, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
414 if(user_ops->chapter_search_or_play)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
415 printf("Chapter Search or Play, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
416 if(user_ops->title_play)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
417 printf("Title Play, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
418 if(user_ops->stop)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
419 printf("Stop, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
420 if(user_ops->go_up)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
421 printf("Go Up, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
422 if(user_ops->time_or_chapter_search)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
423 printf("Time or Chapter Search, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
424 if(user_ops->prev_or_top_pg_search)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
425 printf("Prev or Top PG Search, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
426 if(user_ops->next_pg_search)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
427 printf("Next PG Search, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
428 if(user_ops->forward_scan)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
429 printf("Forward Scan, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
430 if(user_ops->backward_scan)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
431 printf("Backward Scan, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
432 if(user_ops->title_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
433 printf("Title Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
434 if(user_ops->root_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
435 printf("Root Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
436 if(user_ops->subpic_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
437 printf("SubPic Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
438 if(user_ops->audio_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
439 printf("Audio Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
440 if(user_ops->angle_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
441 printf("Angle Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
442 if(user_ops->chapter_menu_call)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
443 printf("Chapter Menu Call, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
444 if(user_ops->resume)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
445 printf("Resume, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
446 if(user_ops->button_select_or_activate)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
447 printf("Button Select or Activate, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
448 if(user_ops->still_off)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
449 printf("Still Off, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
450 if(user_ops->pause_on)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
451 printf("Pause On, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
452 if(user_ops->audio_stream_change)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
453 printf("Audio Stream Change, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
454 if(user_ops->subpic_stream_change)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
455 printf("SubPic Stream Change, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
456 if(user_ops->angle_change)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
457 printf("Angle Change, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
458 if(user_ops->karaoke_audio_pres_mode_change)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
459 printf("Karaoke Audio Pres Mode Change, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
460 if(user_ops->video_pres_mode_change)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
461 printf("Video Pres Mode Change, ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
462 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
463 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
464 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
465
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
466
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
467 void ifoPrint_VMGI_MAT(vmgi_mat_t *vmgi_mat) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
468
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
469 printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
470 printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
471 printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
472 printf("Specification version number: %01x.%01x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
473 vmgi_mat->specification_version >> 4,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
474 vmgi_mat->specification_version & 0xf);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
475 /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
476 printf("VMG Category: %08x\n", vmgi_mat->vmg_category);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
477 printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
478 printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
479 printf("Disc side %i\n", vmgi_mat->disc_side);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
480 printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
481 printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
482 printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32));
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
483 printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
484 printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
485 printf("Start byte of First Play PGC FP PGC: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
486 vmgi_mat->first_play_pgc);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
487 printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
488 printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
489 printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
490 printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
491 printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
492 printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
493 printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
494 printf("Start sector of VMGM_VOBU_ADMAP: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
495 vmgi_mat->vmgm_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
496 printf("Video attributes of VMGM_VOBS: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
497 ifoPrint_video_attributes(5, &vmgi_mat->vmgm_video_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
498 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
499 printf("VMGM Number of Audio attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
500 vmgi_mat->nr_of_vmgm_audio_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
501 if(vmgi_mat->nr_of_vmgm_audio_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
502 printf("\tstream %i status: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
503 ifoPrint_audio_attributes(5, &vmgi_mat->vmgm_audio_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
504 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
505 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
506 printf("VMGM Number of Sub-picture attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
507 vmgi_mat->nr_of_vmgm_subp_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
508 if(vmgi_mat->nr_of_vmgm_subp_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
509 printf("\tstream %2i status: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
510 ifoPrint_subp_attributes(5, &vmgi_mat->vmgm_subp_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
511 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
512 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
513 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
514
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
515
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
516 void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
517 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
518
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
519 printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
520 printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
521 printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
522 printf("Specification version number: %01x.%01x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
523 vtsi_mat->specification_version>>4,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
524 vtsi_mat->specification_version&0xf);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
525 printf("VTS Category: %08x\n", vtsi_mat->vts_category);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
526 printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
527 printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
528 printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
529 printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
530 printf("Start sector of VTS_PGCIT: %08x\n", vtsi_mat->vts_pgcit);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
531 printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
532 printf("Start sector of VTS_TMAPT: %08x\n", vtsi_mat->vts_tmapt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
533 printf("Start sector of VTSM_C_ADT: %08x\n", vtsi_mat->vtsm_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
534 printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
535 printf("Start sector of VTS_C_ADT: %08x\n", vtsi_mat->vts_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
536 printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
537
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
538 printf("Video attributes of VTSM_VOBS: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
539 ifoPrint_video_attributes(5, &vtsi_mat->vtsm_video_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
540 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
541
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
542 printf("VTSM Number of Audio attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
543 vtsi_mat->nr_of_vtsm_audio_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
544 if(vtsi_mat->nr_of_vtsm_audio_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
545 printf("\tstream %i status: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
546 ifoPrint_audio_attributes(5, &vtsi_mat->vtsm_audio_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
547 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
548 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
549
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
550 printf("VTSM Number of Sub-picture attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
551 vtsi_mat->nr_of_vtsm_subp_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
552 if(vtsi_mat->nr_of_vtsm_subp_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
553 printf("\tstream %2i status: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
554 ifoPrint_subp_attributes(5, &vtsi_mat->vtsm_subp_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
555 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
556 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
557
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
558 printf("Video attributes of VTS_VOBS: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
559 ifoPrint_video_attributes(5, &vtsi_mat->vts_video_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
560 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
561
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
562 printf("VTS Number of Audio attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
563 vtsi_mat->nr_of_vts_audio_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
564 for(i = 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
565 printf("\tstream %i status: ", i);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
566 ifoPrint_audio_attributes(5, &vtsi_mat->vts_audio_attr[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
567 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
568 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
569
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
570 printf("VTS Number of Subpicture attributes: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
571 vtsi_mat->nr_of_vts_subp_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
572 for(i = 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
573 printf("\tstream %2i status: ", i);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
574 ifoPrint_subp_attributes(5, &vtsi_mat->vts_subp_attr[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
575 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
576 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
577 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
578
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
579
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
580 static void ifoPrint_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
581 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
582
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
583 if(cmd_tbl == NULL) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
584 printf("No Command table present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
585 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
586 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
587
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
588 printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
589 for(i = 0; i < cmd_tbl->nr_of_pre; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
590 ifoPrint_CMD(i, &cmd_tbl->pre_cmds[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
591 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
592
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
593 printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
594 for(i = 0; i < cmd_tbl->nr_of_post; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
595 ifoPrint_CMD(i, &cmd_tbl->post_cmds[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
596 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
597
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
598 printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
599 for(i = 0; i < cmd_tbl->nr_of_cell; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
600 ifoPrint_CMD(i, &cmd_tbl->cell_cmds[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
601 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
602 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
603
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
604
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
605 static void ifoPrint_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int nr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
606 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
607
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
608 if(program_map == NULL) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
609 printf("No Program map present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
610 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
611 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
612
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
613 for(i = 0; i < nr; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
614 printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
615 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
616 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
617
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
618
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
619 static void ifoPrint_CELL_PLAYBACK(cell_playback_t *cell_playback, int nr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
620 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
621
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
622 if(cell_playback == NULL) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
623 printf("No Cell Playback info present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
624 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
625 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
626
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
627 for(i=0;i<nr;i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
628 printf("Cell: %3i ", i + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
629
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
630 ifoPrint_time(5, &cell_playback[i].playback_time);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
631 printf("\t");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
632
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
633 if(cell_playback[i].block_mode || cell_playback[i].block_type) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
634 const char *s;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
635 switch(cell_playback[i].block_mode) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
636 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
637 s = "not a"; break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
638 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
639 s = "the first"; break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
640 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
641 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
642 s = ""; break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
643 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
644 s = "last"; break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
645 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
646 printf("%s cell in the block ", s);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
647
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
648 switch(cell_playback[i].block_type) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
649 case 0:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
650 printf("not part of the block ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
651 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
652 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
653 printf("angle block ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
654 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
655 case 2:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
656 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
657 printf("(send bug repport) ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
658 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
659 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
660 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
661 if(cell_playback[i].seamless_play)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
662 printf("presented seamlessly ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
663 if(cell_playback[i].interleaved)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
664 printf("cell is interleaved ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
665 if(cell_playback[i].stc_discontinuity)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
666 printf("STC_discontinuty ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
667 if(cell_playback[i].seamless_angle)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
668 printf("only seamless angle ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
669 if(cell_playback[i].restricted)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
670 printf("restricted cell ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
671
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
672 if(cell_playback[i].still_time)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
673 printf("still time %d ", cell_playback[i].still_time);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
674 if(cell_playback[i].cell_cmd_nr)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
675 printf("cell command %d", cell_playback[i].cell_cmd_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
676
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
677 printf("\n\tStart sector: %08x\tFirst ILVU end sector: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
678 cell_playback[i].first_sector,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
679 cell_playback[i].first_ilvu_end_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
680 printf("\tEnd sector: %08x\tLast VOBU start sector: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
681 cell_playback[i].last_sector,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
682 cell_playback[i].last_vobu_start_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
683 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
684 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
685
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
686 static void ifoPrint_CELL_POSITION(cell_position_t *cell_position, int nr) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
687 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
688
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
689 if(cell_position == NULL) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
690 printf("No Cell Position info present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
691 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
692 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
693
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
694 for(i=0;i<nr;i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
695 printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
696 cell_position[i].vob_id_nr, cell_position[i].cell_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
697 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
698 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
699
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
700
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
701 void ifoPrint_PGC(pgc_t *pgc) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
702 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
703
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
704 printf("Number of Programs: %i\n", pgc->nr_of_programs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
705 printf("Number of Cells: %i\n", pgc->nr_of_cells);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
706 /* Check that time is 0:0:0:0 also if nr_of_programs==0 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
707 printf("Playback time: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
708 ifoPrint_time(5, &pgc->playback_time); printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
709
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
710 /* If no programs/no time then does this mean anything? */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
711 printf("Prohibited user operations: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
712 ifoPrint_USER_OPS(&pgc->prohibited_ops);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
713
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
714 for(i = 0; i < 8; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
715 if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
716 printf("Audio stream %i control: %04x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
717 i, pgc->audio_control[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
718 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
719 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
720
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
721 for(i = 0; i < 32; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
722 if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
723 printf("Subpicture stream %2i control: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
724 i, pgc->subp_control[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
725 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
726 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
727
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
728 printf("Next PGC number: %i\n", pgc->next_pgc_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
729 printf("Prev PGC number: %i\n", pgc->prev_pgc_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
730 printf("GoUp PGC number: %i\n", pgc->goup_pgc_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
731 if(pgc->nr_of_programs != 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
732 printf("Still time: %i seconds (255=inf)\n", pgc->still_time);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
733 printf("PG Playback mode %02x\n", pgc->pg_playback_mode);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
734 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
735
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
736 if(pgc->nr_of_programs != 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
737 for(i = 0; i < 16; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
738 printf("Color %2i: %08x\n", i, pgc->palette[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
739 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
740 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
741
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
742 /* Memmory offsets to div. tables. */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
743 ifoPrint_PGC_COMMAND_TBL(pgc->command_tbl);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
744 ifoPrint_PGC_PROGRAM_MAP(pgc->program_map, pgc->nr_of_programs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
745 ifoPrint_CELL_PLAYBACK(pgc->cell_playback, pgc->nr_of_cells);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
746 ifoPrint_CELL_POSITION(pgc->cell_position, pgc->nr_of_cells);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
747 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
748
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
749
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
750 void ifoPrint_TT_SRPT(tt_srpt_t *tt_srpt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
751 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
752
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
753 printf("Number of TitleTrack search pointers: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
754 tt_srpt->nr_of_srpts);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
755 for(i=0;i<tt_srpt->nr_of_srpts;i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
756 printf("Title Track index %i\n", i + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
757 printf("\tTitle set number (VTS): %i",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
758 tt_srpt->title[i].title_set_nr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
759 printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
760 printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
761 printf("\tNumber of angles: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
762 tt_srpt->title[i].nr_of_angles);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
763 printf("\tTitle playback type: %02x\n", /* XXX: TODO FIXME */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
764 *(uint8_t *)&(tt_srpt->title[i].pb_ty));
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
765 printf("\tParental ID field: %04x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
766 tt_srpt->title[i].parental_id);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
767 printf("\tTitle set starting sector %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
768 tt_srpt->title[i].title_set_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
769 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
770 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
771
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
772
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
773 void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
774 int i, j;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
775 printf(" nr_of_srpts %i last byte %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
776 vts_ptt_srpt->nr_of_srpts,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
777 vts_ptt_srpt->last_byte);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
778 for(i=0;i<vts_ptt_srpt->nr_of_srpts;i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
779 for(j=0;j<vts_ptt_srpt->title[i].nr_of_ptts;j++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
780 printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
781 i + 1, j + 1,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
782 vts_ptt_srpt->title[i].ptt[j].pgcn,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
783 vts_ptt_srpt->title[i].ptt[j].pgn );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
784 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
785 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
786 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
787
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
788
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
789 static void hexdump(uint8_t *ptr, int len) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
790 while(len--)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
791 printf("%02x ", *ptr++);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
792 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
793
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
794 void ifoPrint_PTL_MAIT(ptl_mait_t *ptl_mait) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
795 int i, j;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
796
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
797 printf("Number of Countries: %i\n", ptl_mait->nr_of_countries);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
798 printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
799 //printf("Last byte: %i\n", ptl_mait->last_byte);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
800
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
801 for(i = 0; i < ptl_mait->nr_of_countries; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
802 printf("Country code: %c%c\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
803 ptl_mait->countries[i].country_code >> 8,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
804 ptl_mait->countries[i].country_code & 0xff);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
805 /*
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
806 printf("Start byte: %04x %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
807 ptl_mait->countries[i].pf_ptl_mai_start_byte,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
808 ptl_mait->countries[i].pf_ptl_mai_start_byte);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
809 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
810 /* This seems to be pointing at a array with 8 2byte fields per VTS
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
811 ? and one extra for the menu? always an odd number of VTSs on
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
812 all the dics I tested so it might be padding to even also.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
813 If it is for the menu it probably the first entry. */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
814 for(j=0;j<8;j++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
815 hexdump( (uint8_t *)ptl_mait->countries - PTL_MAIT_COUNTRY_SIZE
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
816 + ptl_mait->countries[i].pf_ptl_mai_start_byte
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
817 + j*(ptl_mait->nr_of_vtss+1)*2, (ptl_mait->nr_of_vtss+1)*2);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
818 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
819 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
820 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
821 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
822
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
823
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
824 void ifoPrint_C_ADT(c_adt_t *c_adt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
825 int i, entries;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
826
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
827 printf("Number of VOBs in this VOBS: %i\n", c_adt->nr_of_vobs);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
828 //entries = c_adt->nr_of_vobs;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
829 entries = (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(c_adt_t);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
830
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
831 for(i = 0; i < entries; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
832 printf("VOB ID: %3i, Cell ID: %3i ",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
833 c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cell_id);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
834 printf("Sector (first): 0x%08x (last): 0x%08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
835 c_adt->cell_adr_table[i].start_sector,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
836 c_adt->cell_adr_table[i].last_sector);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
837 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
838 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
839
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
840
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
841 void ifoPrint_VOBU_ADMAP(vobu_admap_t *vobu_admap) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
842 int i, entries;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
843
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
844 entries = (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
845 for(i = 0; i < entries; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
846 printf("VOBU %5i First sector: 0x%08x\n", i + 1,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
847 vobu_admap->vobu_start_sectors[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
848 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
849 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
850
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
851
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
852 void ifoPrint_PGCIT(pgcit_t *pgcit) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
853 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
854
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
855 for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
856 printf("\nProgram (PGC): %3i\t", i + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
857 printf("PGC Category: Entry id 0x%02x, ", pgcit->pgci_srp[i].entry_id);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
858 printf("Parental ID mask 0x%04x\n", pgcit->pgci_srp[i].ptl_id_mask);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
859 ifoPrint_PGC(pgcit->pgci_srp[i].pgc);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
860 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
861 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
862
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
863
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
864 void ifoPrint_PGCI_UT(pgci_ut_t *pgci_ut) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
865 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
866
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
867 printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_of_lus);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
868 for(i = 0; i < pgci_ut->nr_of_lus; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
869 printf("\nMenu Language Code: %c%c\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
870 pgci_ut->lu[i].lang_code >> 8,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
871 pgci_ut->lu[i].lang_code & 0xff);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
872 printf("Menu Existence: %02x\n", pgci_ut->lu[i].exists);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
873 ifoPrint_PGCIT(pgci_ut->lu[i].pgcit);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
874 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
875 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
876
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
877
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
878 static void ifoPrint_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
879 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
880
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
881 printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
882
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
883 printf("Video attributes of VTSM_VOBS: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
884 ifoPrint_video_attributes(5, &vts_attributes->vtsm_vobs_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
885 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
886 printf("Number of Audio streams: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
887 vts_attributes->nr_of_vtsm_audio_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
888 if(vts_attributes->nr_of_vtsm_audio_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
889 printf("\tstream %i attributes: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
890 ifoPrint_audio_attributes(5, &vts_attributes->vtsm_audio_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
891 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
892 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
893 printf("Number of Subpicture streams: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
894 vts_attributes->nr_of_vtsm_subp_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
895 if(vts_attributes->nr_of_vtsm_subp_streams > 0) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
896 printf("\tstream %2i attributes: ", 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
897 ifoPrint_subp_attributes(5, &vts_attributes->vtsm_subp_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
898 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
899 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
900
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
901 printf("Video attributes of VTSTT_VOBS: ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
902 ifoPrint_video_attributes(5, &vts_attributes->vtstt_vobs_video_attr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
903 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
904 printf("Number of Audio streams: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
905 vts_attributes->nr_of_vtstt_audio_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
906 for(i = 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
907 printf("\tstream %i attributes: ", i);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
908 ifoPrint_audio_attributes(5, &vts_attributes->vtstt_audio_attr[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
909 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
910 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
911
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
912 printf("Number of Subpicture streams: %i\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
913 vts_attributes->nr_of_vtstt_subp_streams);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
914 for(i = 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
915 printf("\tstream %2i attributes: ", i);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
916 ifoPrint_subp_attributes(5, &vts_attributes->vtstt_subp_attr[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
917 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
918 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
919 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
920
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
921
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
922 void ifoPrint_VTS_ATRT(vts_atrt_t *vts_atrt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
923 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
924
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
925 printf("Number of Video Title Sets: %3i\n", vts_atrt->nr_of_vtss);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
926 for(i = 0; i < vts_atrt->nr_of_vtss; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
927 printf("\nVideo Title Set %i\n", i + 1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
928 ifoPrint_VTS_ATTRIBUTES(&vts_atrt->vts[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
929 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
930 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
931
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
932
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
933 void ifoPrint(dvd_reader_t *dvd, int title) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
934 ifo_handle_t *ifohandle;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
935
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
936 ifohandle = ifoOpen(dvd, title);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
937 if(!ifohandle) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
938 fprintf(stderr, "Can't open info file for title %d\n", title);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
939 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
940 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
941
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
942
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
943 if(ifohandle->vmgi_mat) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
944
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
945 printf("VMG top level\n-------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
946 ifoPrint_VMGI_MAT(ifohandle->vmgi_mat);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
947
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
948 printf("\nFirst Play PGC\n--------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
949 ifoPrint_PGC(ifohandle->first_play_pgc);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
950
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
951 printf("\nTitle Track search pointer table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
952 printf( "------------------------------------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
953 ifoPrint_TT_SRPT(ifohandle->tt_srpt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
954
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
955 printf("\nMenu PGCI Unit table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
956 printf( "--------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
957 if(ifohandle->pgci_ut) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
958 ifoPrint_PGCI_UT(ifohandle->pgci_ut);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
959 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
960 printf("No PGCI Unit table present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
961 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
962
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
963 printf("\nParental Manegment Information table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
964 printf( "------------------------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
965 if(ifohandle->ptl_mait) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
966 ifoPrint_PTL_MAIT(ifohandle->ptl_mait);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
967 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
968 printf("No Parental Management Information present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
969 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
970
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
971 printf("\nVideo Title Set Attribute Table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
972 printf( "-------------------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
973 ifoPrint_VTS_ATRT(ifohandle->vts_atrt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
974
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
975 printf("\nText Data Manager Information\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
976 printf( "-----------------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
977 if(ifohandle->txtdt_mgi) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
978 //ifoPrint_TXTDT_MGI(&(vmgi->txtdt_mgi));
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
979 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
980 printf("No Text Data Manager Information present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
981 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
982
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
983 printf("\nMenu Cell Adress table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
984 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
985 if(ifohandle->menu_c_adt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
986 ifoPrint_C_ADT(ifohandle->menu_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
987 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
988 printf("No Menu Cell Adress table present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
989 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
990
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
991 printf("\nVideo Manager Menu VOBU address map\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
992 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
993 if(ifohandle->menu_vobu_admap) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
994 ifoPrint_VOBU_ADMAP(ifohandle->menu_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
995 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
996 printf("No Menu VOBU address map present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
997 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
998 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
999
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1000
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1001 if(ifohandle->vtsi_mat) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1002
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1003 printf("VTS top level\n-------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1004 ifoPrint_VTSI_MAT(ifohandle->vtsi_mat);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1005
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1006 printf("\nPart of Title Track search pointer table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1007 printf( "----------------------------------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1008 ifoPrint_VTS_PTT_SRPT(ifohandle->vts_ptt_srpt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1009
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1010 printf("\nPGCI Unit table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1011 printf( "--------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1012 ifoPrint_PGCIT(ifohandle->vts_pgcit);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1013
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1014 printf("\nMenu PGCI Unit table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1015 printf( "--------------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1016 if(ifohandle->pgci_ut) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1017 ifoPrint_PGCI_UT(ifohandle->pgci_ut);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1018 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1019 printf("No Menu PGCI Unit table present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1020 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1021
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1022 printf("\nMenu Cell Adress table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1023 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1024 if(ifohandle->menu_c_adt) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1025 ifoPrint_C_ADT(ifohandle->menu_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1026 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1027 printf("No Cell Adress table present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1028 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1030 printf("\nVideo Title Set Menu VOBU address map\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1031 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1032 if(ifohandle->menu_vobu_admap) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1033 ifoPrint_VOBU_ADMAP(ifohandle->menu_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1034 } else {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1035 printf("No Menu VOBU address map present\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1036 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1037
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1038 printf("\nCell Adress table\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1039 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1040 ifoPrint_C_ADT(ifohandle->vts_c_adt);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1041
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1042 printf("\nVideo Title Set VOBU address map\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1043 printf( "-----------------\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1044 ifoPrint_VOBU_ADMAP(ifohandle->vts_vobu_admap);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1045 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1046
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1047 ifoClose(ifohandle);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1048 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
1049