annotate nav_print.c @ 38:9f1804080f76 src

removed unnecessary config.h; patch by Erik Hovland
author nicodvb
date Tue, 28 Apr 2009 13:26:33 +0000
parents c743d79f187b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
1 /*
22
447c5319a522 Convert all ISO8859-1 sequences to proper UTF-8.
diego
parents: 21
diff changeset
2 * Copyright (C) 2000, 2001, 2002, 2003 HÃ¥kan Hjort <d95hjort@dtek.chalmers.se>
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
3 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
4 * Much of the contents in this file is based on VOBDUMP.
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
5 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
6 * VOBDUMP: a program for examining DVD .VOB filse
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
7 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
8 * Copyright 1998, 1999 Eric Smith <eric@brouhaha.com>
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
9 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
10 * VOBDUMP is free software; you can redistribute it and/or modify it
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
11 * under the terms of the GNU General Public License version 2 as
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
12 * published by the Free Software Foundation. Note that I am not
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
13 * granting permission to redistribute or modify VOBDUMP under the
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
14 * terms of any later version of the General Public License.
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
15 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful (or
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
17 * at least amusing), but WITHOUT ANY WARRANTY; without even the
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
18 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
19 * PURPOSE. See the GNU General Public License for more details.
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
20 *
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
21
4aa618ae094f Use consistent license headers everywhere: Fix FSF address and boilerplate.
diego
parents: 20
diff changeset
22 * along with this program; if not, write to the Free Software Foundation,
4aa618ae094f Use consistent license headers everywhere: Fix FSF address and boilerplate.
diego
parents: 20
diff changeset
23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
24 */
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
25
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
26 #include <stdio.h>
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
27 #include <inttypes.h>
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
28
33
c743d79f187b Move installed headers into dvdread directory to make them easier to
reimar
parents: 27
diff changeset
29 #include "dvdread/nav_types.h"
c743d79f187b Move installed headers into dvdread directory to make them easier to
reimar
parents: 27
diff changeset
30 #include "dvdread/nav_print.h"
c743d79f187b Move installed headers into dvdread directory to make them easier to
reimar
parents: 27
diff changeset
31 #include "dvdread/ifo_print.h"
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
32
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
33 static void navPrint_PCI_GI(pci_gi_t *pci_gi) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
34 int i;
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
35
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
36 printf("pci_gi:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
37 printf("nv_pck_lbn 0x%08x\n", pci_gi->nv_pck_lbn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
38 printf("vobu_cat 0x%04x\n", pci_gi->vobu_cat);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
39 printf("vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
40 printf("vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
41 printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
42 printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
43 printf("e_eltm ");
13
4e610984cc3f added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents: 3
diff changeset
44 dvdread_print_time(&pci_gi->e_eltm);
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
45 printf("\n");
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
46
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
47 printf("vobu_isrc \"");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
48 for(i = 0; i < 32; i++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
49 char c = pci_gi->vobu_isrc[i];
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
50 if((c >= ' ') && (c <= '~'))
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
51 printf("%c", c);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
52 else
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
53 printf(".");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
54 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
55 printf("\"\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
56 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
57
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
58 static void navPrint_NSML_AGLI(nsml_agli_t *nsml_agli) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
59 int i, j = 0;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
60
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
61 for(i = 0; i < 9; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
62 j |= nsml_agli->nsml_agl_dsta[i];
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
63 if(j == 0)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
64 return;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
65
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
66 printf("nsml_agli:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
67 for(i = 0; i < 9; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
68 if(nsml_agli->nsml_agl_dsta[i])
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
69 printf("nsml_agl_c%d_dsta 0x%08x\n", i + 1,
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
70 nsml_agli->nsml_agl_dsta[i]);
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
71 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
72
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
73 static void navPrint_HL_GI(hl_gi_t *hl_gi, int *btngr_ns, int *btn_ns) {
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
74
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
75 if((hl_gi->hli_ss & 0x03) == 0)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
76 return;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
77
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
78 printf("hl_gi:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
79 printf("hli_ss 0x%01x\n", hl_gi->hli_ss & 0x03);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
80 printf("hli_s_ptm 0x%08x\n", hl_gi->hli_s_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
81 printf("hli_e_ptm 0x%08x\n", hl_gi->hli_e_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
82 printf("btn_se_e_ptm 0x%08x\n", hl_gi->btn_se_e_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
83
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
84 *btngr_ns = hl_gi->btngr_ns;
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
85 printf("btngr_ns %d\n", hl_gi->btngr_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
86 printf("btngr%d_dsp_ty 0x%02x\n", 1, hl_gi->btngr1_dsp_ty);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
87 printf("btngr%d_dsp_ty 0x%02x\n", 2, hl_gi->btngr2_dsp_ty);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
88 printf("btngr%d_dsp_ty 0x%02x\n", 3, hl_gi->btngr3_dsp_ty);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
89
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
90 printf("btn_ofn %d\n", hl_gi->btn_ofn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
91 *btn_ns = hl_gi->btn_ns;
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
92 printf("btn_ns %d\n", hl_gi->btn_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
93 printf("nsl_btn_ns %d\n", hl_gi->nsl_btn_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
94 printf("fosl_btnn %d\n", hl_gi->fosl_btnn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
95 printf("foac_btnn %d\n", hl_gi->foac_btnn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
96 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
97
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
98 static void navPrint_BTN_COLIT(btn_colit_t *btn_colit) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
99 int i, j;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
100
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
101 j = 0;
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
102 for(i = 0; i < 6; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
103 j |= btn_colit->btn_coli[i/2][i&1];
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
104 if(j == 0)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
105 return;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
106
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
107 printf("btn_colit:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
108 for(i = 0; i < 3; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
109 for(j = 0; j < 2; j++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
110 printf("btn_cqoli %d %s_coli: %08x\n",
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
111 i, (j == 0) ? "sl" : "ac",
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
112 btn_colit->btn_coli[i][j]);
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
113 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
114
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
115 static void navPrint_BTNIT(btni_t *btni_table, int btngr_ns, int btn_ns) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
116 int i, j;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
117
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
118 printf("btnit:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
119 printf("btngr_ns: %i\n", btngr_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
120 printf("btn_ns: %i\n", btn_ns);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
121
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
122 if(btngr_ns == 0)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
123 return;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
124
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
125 for(i = 0; i < btngr_ns; i++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
126 for(j = 0; j < (36 / btngr_ns); j++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
127 if(j < btn_ns) {
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
128 btni_t *btni = &btni_table[(36 / btngr_ns) * i + j];
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
129
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
130 printf("group %d btni %d: ", i+1, j+1);
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
131 printf("btn_coln %d, auto_action_mode %d\n",
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
132 btni->btn_coln, btni->auto_action_mode);
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
133 printf("coords (%d, %d) .. (%d, %d)\n",
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
134 btni->x_start, btni->y_start, btni->x_end, btni->y_end);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
135
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
136 printf("up %d, ", btni->up);
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
137 printf("down %d, ", btni->down);
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
138 printf("left %d, ", btni->left);
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
139 printf("right %d\n", btni->right);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
140
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
141 /* ifoPrint_COMMAND(&btni->cmd); */
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
142 printf("\n");
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
143 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
144 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
145 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
146 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
147
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
148 static void navPrint_HLI(hli_t *hli) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
149 int btngr_ns = 0, btn_ns = 0;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
150
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
151 printf("hli:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
152 navPrint_HL_GI(&hli->hl_gi, & btngr_ns, & btn_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
153 navPrint_BTN_COLIT(&hli->btn_colit);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
154 navPrint_BTNIT(hli->btnit, btngr_ns, btn_ns);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
155 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
156
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
157 void navPrint_PCI(pci_t *pci) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
158 printf("pci packet:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
159 navPrint_PCI_GI(&pci->pci_gi);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
160 navPrint_NSML_AGLI(&pci->nsml_agli);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
161 navPrint_HLI(&pci->hli);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
162 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
163
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
164 static void navPrint_DSI_GI(dsi_gi_t *dsi_gi) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
165 printf("dsi_gi:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
166 printf("nv_pck_scr 0x%08x\n", dsi_gi->nv_pck_scr);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
167 printf("nv_pck_lbn 0x%08x\n", dsi_gi->nv_pck_lbn );
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
168 printf("vobu_ea 0x%08x\n", dsi_gi->vobu_ea);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
169 printf("vobu_1stref_ea 0x%08x\n", dsi_gi->vobu_1stref_ea);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
170 printf("vobu_2ndref_ea 0x%08x\n", dsi_gi->vobu_2ndref_ea);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
171 printf("vobu_3rdref_ea 0x%08x\n", dsi_gi->vobu_3rdref_ea);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
172 printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
173 printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
174 printf("c_eltm ");
13
4e610984cc3f added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
nicodvb
parents: 3
diff changeset
175 dvdread_print_time(&dsi_gi->c_eltm);
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
176 printf("\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
177 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
178
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
179 static void navPrint_SML_PBI(sml_pbi_t *sml_pbi) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
180 printf("sml_pbi:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
181 printf("category 0x%04x\n", sml_pbi->category);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
182 if(sml_pbi->category & 0x8000)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
183 printf("VOBU is in preunit\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
184 if(sml_pbi->category & 0x4000)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
185 printf("VOBU is in ILVU\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
186 if(sml_pbi->category & 0x2000)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
187 printf("VOBU at the beginning of ILVU\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
188 if(sml_pbi->category & 0x1000)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
189 printf("VOBU at end of PREU of ILVU\n");
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
190
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
191 printf("ilvu_ea 0x%08x\n", sml_pbi->ilvu_ea);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
192 printf("nxt_ilvu_sa 0x%08x\n", sml_pbi->ilvu_sa);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
193 printf("nxt_ilvu_size 0x%04x\n", sml_pbi->size);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
194
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
195 printf("vob_v_s_s_ptm 0x%08x\n", sml_pbi->vob_v_s_s_ptm);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
196 printf("vob_v_e_e_ptm 0x%08x\n", sml_pbi->vob_v_e_e_ptm);
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
197
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
198 /* $$$ more code needed here */
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
199 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
200
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
201 static void navPrint_SML_AGLI(sml_agli_t *sml_agli) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
202 int i;
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
203 printf("sml_agli:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
204 for(i = 0; i < 9; i++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
205 printf("agl_c%d address: 0x%08x size 0x%04x\n", i,
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
206 sml_agli->data[i].address, sml_agli->data[i].size);
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
207 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
208 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
209
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
210 static void navPrint_VOBU_SRI(vobu_sri_t *vobu_sri) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
211 int i;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
212 int stime[19] = { 240, 120, 60, 20, 15, 14, 13, 12, 11,
26
0d82d0f30c98 cosmetics: Convert all tabs to spaces.
diego
parents: 22
diff changeset
213 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
214 printf("vobu_sri:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
215 printf("Next VOBU with Video %08x\n", vobu_sri->next_video);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
216 for(i = 0; i < 19; i++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
217 printf("%3.1f %08x ", stime[i]/2.0, vobu_sri->fwda[i]);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
218 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
219 printf("\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
220 printf("Next VOBU %08x\n", vobu_sri->next_vobu);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
221 printf("--\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
222 printf("Prev VOBU %08x\n", vobu_sri->prev_vobu);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
223 for(i = 0; i < 19; i++) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
224 printf("%3.1f %08x ", stime[18 - i]/2.0, vobu_sri->bwda[i]);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
225 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
226 printf("\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
227 printf("Prev VOBU with Video %08x\n", vobu_sri->prev_video);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
228 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
229
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
230 static void navPrint_SYNCI(synci_t *synci) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
231 int i;
20
fce16251755c Remove all trailing whitespace,
rathann
parents: 17
diff changeset
232
3
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
233 printf("synci:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
234 /* $$$ more code needed here */
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
235 for(i = 0; i < 8; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
236 printf("%04x ", synci->a_synca[i]);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
237 for(i = 0; i < 32; i++)
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
238 printf("%08x ", synci->sp_synca[i]);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
239 }
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
240
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
241 void navPrint_DSI(dsi_t *dsi) {
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
242 printf("dsi packet:\n");
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
243 navPrint_DSI_GI(&dsi->dsi_gi);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
244 navPrint_SML_PBI(&dsi->sml_pbi);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
245 navPrint_SML_AGLI(&dsi->sml_agli);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
246 navPrint_VOBU_SRI(&dsi->vobu_sri);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
247 navPrint_SYNCI(&dsi->synci);
fdbae45c30fc moved to src/ the sources files
nicodvb
parents:
diff changeset
248 }