aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/ogle/files/patch-vmg-ifo_dump.c
blob: 549e502a5e038b87d14fb0b4e32a04ad49adf183 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
--- vmg/ifo_dump.c.orig 2003-06-25 18:12:43.000000000 +0200
+++ vmg/ifo_dump.c  2009-02-04 08:20:52.000000000 +0100
@@ -50,134 +50,12 @@
 
 
 static void print_ifo(char *path, int title) {
-  dvd_reader_t *dvd;
-  ifo_handle_t *h;
-  
-  dvd = DVDOpen(path);
+  dvd_reader_t *dvd = DVDOpen(path);
+
   if(!dvd) {
     fprintf(stderr, "Can't open disc %s!\n", path);
     return;
   }
 
-  if((h = ifoOpen(dvd, title)) == NULL)
-    return;
-    
-  if(h->vmgi_mat != NULL) {
-    
-    printf("VMG top level\n-------------\n");
-    ifoPrint_VMGI_MAT(h->vmgi_mat);
-      
-    printf("\nFirst Play PGC\n--------------\n");
-    ifoPrint_PGC(h->first_play_pgc);
-      
-    printf("\nTitle Track search pointer table\n");
-    printf(  "------------------------------------------------\n");
-    ifoPrint_TT_SRPT(h->tt_srpt);
-      
-    printf("\nMenu PGCI Unit table\n");
-    printf(  "--------------------\n");
-    if(h->vmgi_mat->vmgm_pgci_ut != 0) {
-      ifoPrint_PGCI_UT(h->pgci_ut);
-    } else 
-      printf("No Menu PGCI Unit table present\n");
-      
-    printf("\nParental Manegment Information table\n");
-    printf(  "------------------------------------\n");
-    if(h->vmgi_mat->ptl_mait != 0) {
-      ifoPrint_PTL_MAIT(h->ptl_mait);
-    } else
-      printf("No Parental Management Information present\n");
-      
-    printf("\nVideo Title Set Attribute Table\n");
-    printf(  "-------------------------------\n");
-    ifoPrint_VTS_ATRT(h->vts_atrt);
-
-      
-    printf("\nText Data Manager Information\n");
-    printf(  "-----------------------------\n");
-    if(h->vmgi_mat->txtdt_mgi != 0) {
-      //ifoPrint_TXTDT_MGI(h->txtdt_mgi);
-      printf("Can't print Text Data Manager Information yet\n");
-    } else
-      printf("No Text Data Manager Information present\n");
-      
-    if(1) {
-      
-      printf("\nCell Address table\n");
-      printf(  "-----------------\n");
-      if(h->vmgi_mat->vmgm_c_adt != 0) {
-   ifoPrint_C_ADT(h->menu_c_adt);
-      } else
-   printf("No Cell Address table present\n");
-      
-      printf("\nVideo Title set Menu VOBU address map\n");
-      printf(  "-----------------\n");
-      if(h->vmgi_mat->vmgm_vobu_admap != 0) {
-   ifoPrint_VOBU_ADMAP(h->menu_vobu_admap);
-      } else
-   printf("No Menu VOBU address map present\n");
-    }
-  }
-
-  if(h->vtsi_mat != NULL) {
-      
-    printf("VTS top level\n-------------\n");
-    ifoPrint_VTSI_MAT(h->vtsi_mat);
-      
-    printf("\nPart of title search pointer table information\n");
-    printf(  "----------------------------------------------\n");
-    ifoPrint_VTS_PTT_SRPT(h->vts_ptt_srpt);
-       
-    printf("\nPGCI Unit table\n");
-    printf(  "--------------------\n");
-    ifoPrint_PGCIT(h->vts_pgcit);
-      
-    printf("\nMenu PGCI Unit table\n");
-    printf(  "--------------------\n");
-    if(h->vtsi_mat->vtsm_pgci_ut != 0) {
-      ifoPrint_PGCI_UT(h->pgci_ut);
-    } else
-      printf("No Menu PGCI Unit table present\n");
-      
-    if(1) {
-      
-      printf("\nTime Map table\n");
-      printf(  "-----------------\n");
-      if(h->vtsi_mat->vts_tmapt != 0) {
-   ifoPrint_VTS_TMAPT(h->vts_tmapt);
-      } else
-   printf("No Time Map table present\n");
-      
-      printf("\nMenu Cell Address table\n");
-      printf(  "-----------------\n");
-      if(h->vtsi_mat->vtsm_c_adt != 0) {
-   ifoPrint_C_ADT(h->menu_c_adt);
-      } else
-   printf("No Cell Address table present\n");
-      
-      printf("\nVideo Title Set Menu VOBU address map\n");
-      printf(  "-----------------\n");
-      if(h->vtsi_mat->vtsm_vobu_admap != 0) {
-   ifoPrint_VOBU_ADMAP(h->menu_vobu_admap);
-      } else
-   printf("No Menu VOBU address map present\n");
-      
-      printf("\nCell Address table\n");
-      printf(  "-----------------\n");
-      ifoPrint_C_ADT(h->vts_c_adt);
-      
-      printf("\nVideo Title Set VOBU address map\n");
-      printf(  "-----------------\n");
-      ifoPrint_VOBU_ADMAP(h->vts_vobu_admap);
-      
-    }
-  }
-
-
-  /* Vob */
-  
+  ifo_print(dvd, title);
 }
-
-
-
-