annotate libmpdvdkit2/nav_print.c @ 15028:dfc473e13cf0

spelling + updates
author diego
date Thu, 31 Mar 2005 22:08:02 +0000
parents 25df9508f9a8
children 483e955893b8
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 Håkan Hjort <d95hjort@dtek.chalmers.se>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
3 *
14938
25df9508f9a8 Mark modified files as such to comply more closely with GPL ¡ø2a.
diego
parents: 7033
diff changeset
4 * Modified for use with MPlayer, changes contained in libdvdread_changes.diff.
25df9508f9a8 Mark modified files as such to comply more closely with GPL ¡ø2a.
diego
parents: 7033
diff changeset
5 * detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
25df9508f9a8 Mark modified files as such to comply more closely with GPL ¡ø2a.
diego
parents: 7033
diff changeset
6 * $Id$
25df9508f9a8 Mark modified files as such to comply more closely with GPL ¡ø2a.
diego
parents: 7033
diff changeset
7 *
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
8 * Much of the contents in this file is based on VOBDUMP.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
9 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
10 * VOBDUMP: a program for examining DVD .VOB filse
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
11 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
12 * Copyright 1998, 1999 Eric Smith <eric@brouhaha.com>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
13 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
14 * VOBDUMP is free software; you can redistribute it and/or modify it
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
15 * under the terms of the GNU General Public License version 2 as
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
16 * published by the Free Software Foundation. Note that I am not
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
17 * granting permission to redistribute or modify VOBDUMP under the
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
18 * terms of any later version of the General Public License.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
19 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
20 * This program is distributed in the hope that it will be useful (or
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
21 * at least amusing), but WITHOUT ANY WARRANTY; without even the
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
22 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
23 * PURPOSE. See the GNU General Public License for more details.
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
24 *
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
25 * You should have received a copy of the GNU General Public License
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
26 * along with this program; if not, write to the Free Software
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
28 */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
29
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
30 #include <stdio.h>
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
31 #include <inttypes.h>
7033
596919e4f601 apply mplayer-specific patches
arpi
parents: 7029
diff changeset
32 //#include <assert.h>
7029
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
33
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
34 #include "config.h" // Needed for WORDS_BIGENDIAN
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
35 #include "nav_types.h"
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
36 #include "nav_print.h"
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
37
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
38
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
39 static void print_time(dvd_time_t *dtime) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
40 const char *rate;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
41 assert((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
42 assert((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
43 assert((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
44 assert((dtime->frame_u&0xf) < 0xa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
45
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
46 printf("%02x:%02x:%02x.%02x",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
47 dtime->hour,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
48 dtime->minute,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
49 dtime->second,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
50 dtime->frame_u & 0x3f);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
51 switch((dtime->frame_u & 0xc0) >> 6) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
52 case 1:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
53 rate = "25.00";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
54 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
55 case 3:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
56 rate = "29.97";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
57 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
58 default:
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
59 rate = "(please send a bug report)";
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
60 break;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
61 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
62 printf(" @ %s fps", rate);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
63 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
64
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
65
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
66 static void navPrint_PCI_GI(pci_gi_t *pci_gi) {
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("pci_gi:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
70 printf("nv_pck_lbn 0x%08x\n", pci_gi->nv_pck_lbn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
71 printf("vobu_cat 0x%04x\n", pci_gi->vobu_cat);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
72 printf("vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
73 printf("vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
74 printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
75 printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
76 printf("e_eltm ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
77 print_time(&pci_gi->e_eltm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
78 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
79
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
80 printf("vobu_isrc \"");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
81 for(i = 0; i < 32; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
82 char c = pci_gi->vobu_isrc[i];
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
83 if((c >= ' ') && (c <= '~'))
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
84 printf("%c", c);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
85 else
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
86 printf(".");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
87 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
88 printf("\"\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
89 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
90
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
91 static void navPrint_NSML_AGLI(nsml_agli_t *nsml_agli) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
92 int i, j = 0;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
93
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
94 for(i = 0; i < 9; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
95 j |= nsml_agli->nsml_agl_dsta[i];
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
96 if(j == 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
97 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
98
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
99 printf("nsml_agli:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
100 for(i = 0; i < 9; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
101 if(nsml_agli->nsml_agl_dsta[i])
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
102 printf("nsml_agl_c%d_dsta 0x%08x\n", i + 1,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
103 nsml_agli->nsml_agl_dsta[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
104 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
105
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
106 static void navPrint_HL_GI(hl_gi_t *hl_gi, int *btngr_ns, int *btn_ns) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
107
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
108 if((hl_gi->hli_ss & 0x03) == 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
109 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
110
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
111 printf("hl_gi:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
112 printf("hli_ss 0x%01x\n", hl_gi->hli_ss & 0x03);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
113 printf("hli_s_ptm 0x%08x\n", hl_gi->hli_s_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
114 printf("hli_e_ptm 0x%08x\n", hl_gi->hli_e_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
115 printf("btn_se_e_ptm 0x%08x\n", hl_gi->btn_se_e_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
116
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
117 *btngr_ns = hl_gi->btngr_ns;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
118 printf("btngr_ns %d\n", hl_gi->btngr_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
119 printf("btngr%d_dsp_ty 0x%02x\n", 1, hl_gi->btngr1_dsp_ty);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
120 printf("btngr%d_dsp_ty 0x%02x\n", 2, hl_gi->btngr2_dsp_ty);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
121 printf("btngr%d_dsp_ty 0x%02x\n", 3, hl_gi->btngr3_dsp_ty);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
122
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
123 printf("btn_ofn %d\n", hl_gi->btn_ofn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
124 *btn_ns = hl_gi->btn_ns;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
125 printf("btn_ns %d\n", hl_gi->btn_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
126 printf("nsl_btn_ns %d\n", hl_gi->nsl_btn_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
127 printf("fosl_btnn %d\n", hl_gi->fosl_btnn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
128 printf("foac_btnn %d\n", hl_gi->foac_btnn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
129 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
130
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
131 static void navPrint_BTN_COLIT(btn_colit_t *btn_colit) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
132 int i, j;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
133
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
134 j = 0;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
135 for(i = 0; i < 6; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
136 j |= btn_colit->btn_coli[i/2][i&1];
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
137 if(j == 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
138 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
139
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
140 printf("btn_colit:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
141 for(i = 0; i < 3; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
142 for(j = 0; j < 2; j++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
143 printf("btn_cqoli %d %s_coli: %08x\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
144 i, (j == 0) ? "sl" : "ac",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
145 btn_colit->btn_coli[i][j]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
146 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
147
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
148 static void navPrint_BTNIT(btni_t *btni_table, int btngr_ns, int btn_ns) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
149 int i, j;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
150
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
151 printf("btnit:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
152 printf("btngr_ns: %i\n", btngr_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
153 printf("btn_ns: %i\n", btn_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
154
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
155 if(btngr_ns == 0)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
156 return;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
157
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
158 for(i = 0; i < btngr_ns; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
159 for(j = 0; j < (36 / btngr_ns); j++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
160 if(j < btn_ns) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
161 btni_t *btni = &btni_table[(36 / btngr_ns) * i + j];
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
162
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
163 printf("group %d btni %d: ", i+1, j+1);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
164 printf("btn_coln %d, auto_action_mode %d\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
165 btni->btn_coln, btni->auto_action_mode);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
166 printf("coords (%d, %d) .. (%d, %d)\n",
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
167 btni->x_start, btni->y_start, btni->x_end, btni->y_end);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
168
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
169 printf("up %d, ", btni->up);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
170 printf("down %d, ", btni->down);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
171 printf("left %d, ", btni->left);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
172 printf("right %d\n", btni->right);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
173
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
174 // ifoPrint_COMMAND(&btni->cmd);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
175 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
176 }
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
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
181 static void navPrint_HLI(hli_t *hli) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
182 int btngr_ns = 0, btn_ns = 0;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
183
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
184 printf("hli:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
185 navPrint_HL_GI(&hli->hl_gi, & btngr_ns, & btn_ns);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
186 navPrint_BTN_COLIT(&hli->btn_colit);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
187 navPrint_BTNIT(hli->btnit, btngr_ns, btn_ns);
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 void navPrint_PCI(pci_t *pci) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
191 printf("pci packet:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
192 navPrint_PCI_GI(&pci->pci_gi);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
193 navPrint_NSML_AGLI(&pci->nsml_agli);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
194 navPrint_HLI(&pci->hli);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
195 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
196
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
197 static void navPrint_DSI_GI(dsi_gi_t *dsi_gi) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
198 printf("dsi_gi:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
199 printf("nv_pck_scr 0x%08x\n", dsi_gi->nv_pck_scr);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
200 printf("nv_pck_lbn 0x%08x\n", dsi_gi->nv_pck_lbn );
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
201 printf("vobu_ea 0x%08x\n", dsi_gi->vobu_ea);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
202 printf("vobu_1stref_ea 0x%08x\n", dsi_gi->vobu_1stref_ea);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
203 printf("vobu_2ndref_ea 0x%08x\n", dsi_gi->vobu_2ndref_ea);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
204 printf("vobu_3rdref_ea 0x%08x\n", dsi_gi->vobu_3rdref_ea);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
205 printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
206 printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
207 printf("c_eltm ");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
208 print_time(&dsi_gi->c_eltm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
209 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
210 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
211
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
212 static void navPrint_SML_PBI(sml_pbi_t *sml_pbi) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
213 printf("sml_pbi:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
214 printf("category 0x%04x\n", sml_pbi->category);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
215 if(sml_pbi->category & 0x8000)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
216 printf("VOBU is in preunit\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
217 if(sml_pbi->category & 0x4000)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
218 printf("VOBU is in ILVU\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
219 if(sml_pbi->category & 0x2000)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
220 printf("VOBU at the beginning of ILVU\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
221 if(sml_pbi->category & 0x1000)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
222 printf("VOBU at end of PREU of ILVU\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
223
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
224 printf("ilvu_ea 0x%08x\n", sml_pbi->ilvu_ea);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
225 printf("nxt_ilvu_sa 0x%08x\n", sml_pbi->ilvu_sa);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
226 printf("nxt_ilvu_size 0x%04x\n", sml_pbi->size);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
227
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
228 printf("vob_v_s_s_ptm 0x%08x\n", sml_pbi->vob_v_s_s_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
229 printf("vob_v_e_e_ptm 0x%08x\n", sml_pbi->vob_v_e_e_ptm);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
230
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
231 /* $$$ more code needed here */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
232 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
233
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
234 static void navPrint_SML_AGLI(sml_agli_t *sml_agli) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
235 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
236 printf("sml_agli:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
237 for(i = 0; i < 9; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
238 printf("agl_c%d address: 0x%08x size 0x%04x\n", i,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
239 sml_agli->data[i].address, sml_agli->data[i].size);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
240 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
241 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
242
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
243 static void navPrint_VOBU_SRI(vobu_sri_t *vobu_sri) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
244 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
245 int stime[19] = { 240, 120, 60, 20, 15, 14, 13, 12, 11,
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
246 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
247 printf("vobu_sri:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
248 printf("Next VOBU with Video %08x\n", vobu_sri->next_video);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
249 for(i = 0; i < 19; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
250 printf("%3.1f %08x ", stime[i]/2.0, vobu_sri->fwda[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
251 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
252 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
253 printf("Next VOBU %08x\n", vobu_sri->next_vobu);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
254 printf("--\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
255 printf("Prev VOBU %08x\n", vobu_sri->prev_vobu);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
256 for(i = 0; i < 19; i++) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
257 printf("%3.1f %08x ", stime[18 - i]/2.0, vobu_sri->bwda[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
258 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
259 printf("\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
260 printf("Prev VOBU with Video %08x\n", vobu_sri->prev_video);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
261 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
262
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
263 static void navPrint_SYNCI(synci_t *synci) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
264 int i;
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
265
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
266 printf("synci:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
267 /* $$$ more code needed here */
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
268 for(i = 0; i < 8; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
269 printf("%04x ", synci->a_synca[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
270 for(i = 0; i < 32; i++)
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
271 printf("%08x ", synci->sp_synca[i]);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
272 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
273
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
274 void navPrint_DSI(dsi_t *dsi) {
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
275 printf("dsi packet:\n");
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
276 navPrint_DSI_GI(&dsi->dsi_gi);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
277 navPrint_SML_PBI(&dsi->sml_pbi);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
278 navPrint_SML_AGLI(&dsi->sml_agli);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
279 navPrint_VOBU_SRI(&dsi->vobu_sri);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
280 navPrint_SYNCI(&dsi->synci);
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
281 }
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
282
9db58ffbd73c importing libdvdread 0.9.3 files
arpi
parents:
diff changeset
283