Mercurial > libdvdread4.hg
comparison nav_print.c @ 13:4e610984cc3f src
added dvdread_print_time() and removed the file-static print_time() in nav_print.c; based on a patch by Erik Hovland org
author | nicodvb |
---|---|
date | Thu, 24 Jul 2008 22:03:06 +0000 |
parents | fdbae45c30fc |
children | 26068a8f3927 |
comparison
equal
deleted
inserted
replaced
12:056f5573a7dc | 13:4e610984cc3f |
---|---|
29 #include <inttypes.h> | 29 #include <inttypes.h> |
30 | 30 |
31 #include "nav_types.h" | 31 #include "nav_types.h" |
32 #include "nav_print.h" | 32 #include "nav_print.h" |
33 #include "dvdread_internal.h" | 33 #include "dvdread_internal.h" |
34 | |
35 static void print_time(dvd_time_t *dtime) { | |
36 const char *rate; | |
37 CHECK_VALUE((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa); | |
38 CHECK_VALUE((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa); | |
39 CHECK_VALUE((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa); | |
40 CHECK_VALUE((dtime->frame_u&0xf) < 0xa); | |
41 | |
42 printf("%02x:%02x:%02x.%02x", | |
43 dtime->hour, | |
44 dtime->minute, | |
45 dtime->second, | |
46 dtime->frame_u & 0x3f); | |
47 switch((dtime->frame_u & 0xc0) >> 6) { | |
48 case 1: | |
49 rate = "25.00"; | |
50 break; | |
51 case 3: | |
52 rate = "29.97"; | |
53 break; | |
54 default: | |
55 rate = "(please send a bug report)"; | |
56 break; | |
57 } | |
58 printf(" @ %s fps", rate); | |
59 } | |
60 | |
61 | 34 |
62 static void navPrint_PCI_GI(pci_gi_t *pci_gi) { | 35 static void navPrint_PCI_GI(pci_gi_t *pci_gi) { |
63 int i; | 36 int i; |
64 | 37 |
65 printf("pci_gi:\n"); | 38 printf("pci_gi:\n"); |
68 printf("vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl); | 41 printf("vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl); |
69 printf("vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm); | 42 printf("vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm); |
70 printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm); | 43 printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm); |
71 printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm); | 44 printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm); |
72 printf("e_eltm "); | 45 printf("e_eltm "); |
73 print_time(&pci_gi->e_eltm); | 46 dvdread_print_time(&pci_gi->e_eltm); |
74 printf("\n"); | 47 printf("\n"); |
75 | 48 |
76 printf("vobu_isrc \""); | 49 printf("vobu_isrc \""); |
77 for(i = 0; i < 32; i++) { | 50 for(i = 0; i < 32; i++) { |
78 char c = pci_gi->vobu_isrc[i]; | 51 char c = pci_gi->vobu_isrc[i]; |
199 printf("vobu_2ndref_ea 0x%08x\n", dsi_gi->vobu_2ndref_ea); | 172 printf("vobu_2ndref_ea 0x%08x\n", dsi_gi->vobu_2ndref_ea); |
200 printf("vobu_3rdref_ea 0x%08x\n", dsi_gi->vobu_3rdref_ea); | 173 printf("vobu_3rdref_ea 0x%08x\n", dsi_gi->vobu_3rdref_ea); |
201 printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn); | 174 printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn); |
202 printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn); | 175 printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn); |
203 printf("c_eltm "); | 176 printf("c_eltm "); |
204 print_time(&dsi_gi->c_eltm); | 177 dvdread_print_time(&dsi_gi->c_eltm); |
205 printf("\n"); | 178 printf("\n"); |
206 } | 179 } |
207 | 180 |
208 static void navPrint_SML_PBI(sml_pbi_t *sml_pbi) { | 181 static void navPrint_SML_PBI(sml_pbi_t *sml_pbi) { |
209 printf("sml_pbi:\n"); | 182 printf("sml_pbi:\n"); |