7029
|
1 #ifndef IFO_READ_H_INCLUDED
|
|
2 #define IFO_READ_H_INCLUDED
|
|
3
|
|
4 /*
|
|
5 * Copyright (C) 2000, 2001, 2002 Björn Englund <d4bjorn@dtek.chalmers.se>,
|
|
6 * Håkan Hjort <d95hjort@dtek.chalmers.se>
|
|
7 *
|
|
8 * This program is free software; you can redistribute it and/or modify
|
|
9 * it under the terms of the GNU General Public License as published by
|
|
10 * the Free Software Foundation; either version 2 of the License, or
|
|
11 * (at your option) any later version.
|
|
12 *
|
|
13 * This program is distributed in the hope that it will be useful,
|
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 * GNU General Public License for more details.
|
|
17 *
|
|
18 * You should have received a copy of the GNU General Public License
|
|
19 * along with this program; if not, write to the Free Software
|
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21 */
|
|
22
|
|
23 #include <dvdread/ifo_types.h>
|
|
24 #include <dvdread/dvd_reader.h>
|
|
25
|
|
26 #ifdef __cplusplus
|
|
27 extern "C" {
|
|
28 #endif
|
|
29
|
|
30 /**
|
|
31 * handle = ifoOpen(dvd, title);
|
|
32 *
|
|
33 * Opens an IFO and reads in all the data for the IFO file corresponding to the
|
|
34 * given title. If title 0 is given, the video manager IFO file is read.
|
|
35 * Returns a handle to a completely parsed structure.
|
|
36 */
|
|
37 ifo_handle_t *ifoOpen(dvd_reader_t *, int );
|
|
38
|
|
39 /**
|
|
40 * handle = ifoOpenVMGI(dvd);
|
|
41 *
|
|
42 * Opens an IFO and reads in _only_ the vmgi_mat data. This call can be used
|
|
43 * together with the calls below to read in each segment of the IFO file on
|
|
44 * demand.
|
|
45 */
|
|
46 ifo_handle_t *ifoOpenVMGI(dvd_reader_t *);
|
|
47
|
|
48 /**
|
|
49 * handle = ifoOpenVTSI(dvd, title);
|
|
50 *
|
|
51 * Opens an IFO and reads in _only_ the vtsi_mat data. This call can be used
|
|
52 * together with the calls below to read in each segment of the IFO file on
|
|
53 * demand.
|
|
54 */
|
|
55 ifo_handle_t *ifoOpenVTSI(dvd_reader_t *, int);
|
|
56
|
|
57 /**
|
|
58 * ifoClose(ifofile);
|
|
59 * Cleans up the IFO information. This will free all data allocated for the
|
|
60 * substructures.
|
|
61 */
|
|
62 void ifoClose(ifo_handle_t *);
|
|
63
|
|
64 /**
|
|
65 * The following functions are for reading only part of the VMGI/VTSI files.
|
|
66 * Returns 1 if the data was successfully read and 0 on error.
|
|
67 */
|
|
68
|
|
69 /**
|
|
70 * okay = ifoRead_PLT_MAIT(ifofile);
|
|
71 *
|
|
72 * Read in the Parental Management Information table, filling the
|
|
73 * ifofile->ptl_mait structure and its substructures. This data is only
|
|
74 * located in the video manager information file. This fills the
|
|
75 * ifofile->ptl_mait structure and all its substructures.
|
|
76 */
|
|
77 int ifoRead_PTL_MAIT(ifo_handle_t *);
|
|
78
|
|
79 /**
|
|
80 * okay = ifoRead_VTS_ATRT(ifofile);
|
|
81 *
|
|
82 * Read in the attribute table for the main menu vob, filling the
|
|
83 * ifofile->vts_atrt structure and its substructures. Only located in the
|
|
84 * video manager information file. This fills in the ifofile->vts_atrt
|
|
85 * structure and all its substructures.
|
|
86 */
|
|
87 int ifoRead_VTS_ATRT(ifo_handle_t *);
|
|
88
|
|
89 /**
|
|
90 * okay = ifoRead_TT_SRPT(ifofile);
|
|
91 *
|
|
92 * Reads the title info for the main menu, filling the ifofile->tt_srpt
|
|
93 * structure and its substructures. This data is only located in the video
|
|
94 * manager information file. This structure is mandatory in the IFO file.
|
|
95 */
|
|
96 int ifoRead_TT_SRPT(ifo_handle_t *);
|
|
97
|
|
98 /**
|
|
99 * okay = ifoRead_VTS_PTT_SRPT(ifofile);
|
|
100 *
|
|
101 * Reads in the part of title search pointer table, filling the
|
|
102 * ifofile->vts_ptt_srpt structure and its substructures. This data is only
|
|
103 * located in the video title set information file. This structure is
|
|
104 * mandatory, and must be included in the VTSI file.
|
|
105 */
|
|
106 int ifoRead_VTS_PTT_SRPT(ifo_handle_t *);
|
|
107
|
|
108 /**
|
|
109 * okay = ifoRead_FP_PGC(ifofile);
|
|
110 *
|
|
111 * Reads in the first play program chain data, filling the
|
|
112 * ifofile->first_play_pgc structure. This data is only located in the video
|
|
113 * manager information file. This structure is mandatory, and must be included
|
|
114 * in the VMGI file. **Possibly this is only optional.**
|
|
115 */
|
|
116 int ifoRead_FP_PGC(ifo_handle_t *);
|
|
117
|
|
118 /**
|
|
119 * okay = ifoRead_PGCIT(ifofile);
|
|
120 *
|
|
121 * Reads in the program chain information table for the video title set. Fills
|
|
122 * in the ifofile->vts_pgcit structure and its substructures, which includes
|
|
123 * the data for each program chain in the set. This data is only located in
|
|
124 * the video title set information file. This structure is mandatory, and must
|
|
125 * be included in the VTSI file.
|
|
126 */
|
|
127 int ifoRead_PGCIT(ifo_handle_t *);
|
|
128
|
|
129 /**
|
|
130 * okay = ifoRead_PGCI_UT(ifofile);
|
|
131 *
|
|
132 * Reads in the menu PGCI unit table for the menu VOB. For the video manager,
|
|
133 * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
134 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
135 * video manager and video title set information files. For VMGI files, this
|
|
136 * fills the ifofile->vmgi_pgci_ut structure and all its substructures. For
|
|
137 * VTSI files, this fills the ifofile->vtsm_pgci_ut structure.
|
|
138 */
|
|
139 int ifoRead_PGCI_UT(ifo_handle_t *);
|
|
140
|
|
141 /**
|
|
142 * okay = ifoRead_C_ADT(ifofile);
|
|
143 *
|
|
144 * Reads in the cell address table for the menu VOB. For the video manager,
|
|
145 * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
146 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
147 * video manager and video title set information files. For VMGI files, this
|
|
148 * fills the ifofile->vmgm_c_adt structure and all its substructures. For VTSI
|
|
149 * files, this fills the ifofile->vtsm_c_adt structure.
|
|
150 */
|
|
151 int ifoRead_C_ADT(ifo_handle_t *);
|
|
152
|
|
153 /**
|
|
154 * okay = ifoRead_TITLE_C_ADT(ifofile);
|
|
155 *
|
|
156 * Reads in the cell address table for the video title set corresponding to
|
|
157 * this IFO file. This data is only located in the video title set information
|
|
158 * file. This structure is mandatory, and must be included in the VTSI file.
|
|
159 * This call fills the ifofile->vts_c_adt structure and its substructures.
|
|
160 */
|
|
161 int ifoRead_TITLE_C_ADT(ifo_handle_t *);
|
|
162
|
|
163 /**
|
|
164 * okay = ifoRead_VOBU_ADMAP(ifofile);
|
|
165 *
|
|
166 * Reads in the VOBU address map for the menu VOB. For the video manager, this
|
|
167 * corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
168 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
169 * video manager and video title set information files. For VMGI files, this
|
|
170 * fills the ifofile->vmgm_vobu_admap structure and all its substructures. For
|
|
171 * VTSI files, this fills the ifofile->vtsm_vobu_admap structure.
|
|
172 */
|
|
173 int ifoRead_VOBU_ADMAP(ifo_handle_t *);
|
|
174
|
|
175 /**
|
|
176 * okay = ifoRead_TITLE_VOBU_ADMAP(ifofile);
|
|
177 *
|
|
178 * Reads in the VOBU address map for the associated video title set. This data
|
|
179 * is only located in the video title set information file. This structure is
|
|
180 * mandatory, and must be included in the VTSI file. Fills the
|
|
181 * ifofile->vts_vobu_admap structure and its substructures.
|
|
182 */
|
|
183 int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *);
|
|
184
|
|
185 /**
|
|
186 * okay = ifoRead_TXTDT_MGI(ifofile);
|
|
187 *
|
|
188 * Reads in the text data strings for the DVD. Fills the ifofile->txtdt_mgi
|
|
189 * structure and all its substructures. This data is only located in the video
|
|
190 * manager information file. This structure is mandatory, and must be included
|
|
191 * in the VMGI file.
|
|
192 */
|
|
193 int ifoRead_TXTDT_MGI(ifo_handle_t *);
|
|
194
|
|
195 /**
|
|
196 * The following functions are used for freeing parsed sections of the
|
|
197 * ifo_handle_t structure and the allocated substructures. The free calls
|
|
198 * below are safe: they will not mind if you attempt to free part of an IFO
|
|
199 * file which was not read in or which does not exist.
|
|
200 */
|
|
201 void ifoFree_PTL_MAIT(ifo_handle_t *);
|
|
202 void ifoFree_VTS_ATRT(ifo_handle_t *);
|
|
203 void ifoFree_TT_SRPT(ifo_handle_t *);
|
|
204 void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
|
|
205 void ifoFree_FP_PGC(ifo_handle_t *);
|
|
206 void ifoFree_PGCIT(ifo_handle_t *);
|
|
207 void ifoFree_PGCI_UT(ifo_handle_t *);
|
|
208 void ifoFree_C_ADT(ifo_handle_t *);
|
|
209 void ifoFree_TITLE_C_ADT(ifo_handle_t *);
|
|
210 void ifoFree_VOBU_ADMAP(ifo_handle_t *);
|
|
211 void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
|
|
212 void ifoFree_TXTDT_MGI(ifo_handle_t *);
|
|
213
|
|
214 #ifdef __cplusplus
|
|
215 };
|
|
216 #endif
|
|
217 #endif /* IFO_READ_H_INCLUDED */
|