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