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
|
20983
|
23 #include <dvdread/ifo_types.h>
|
|
24 #include <dvdread/dvd_reader.h>
|
7029
|
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
|
15874
|
113 * manager information file (VMGI). This structure is optional.
|
7029
|
114 */
|
|
115 int ifoRead_FP_PGC(ifo_handle_t *);
|
|
116
|
|
117 /**
|
|
118 * okay = ifoRead_PGCIT(ifofile);
|
|
119 *
|
|
120 * Reads in the program chain information table for the video title set. Fills
|
|
121 * in the ifofile->vts_pgcit structure and its substructures, which includes
|
|
122 * the data for each program chain in the set. This data is only located in
|
|
123 * the video title set information file. This structure is mandatory, and must
|
|
124 * be included in the VTSI file.
|
|
125 */
|
|
126 int ifoRead_PGCIT(ifo_handle_t *);
|
|
127
|
|
128 /**
|
|
129 * okay = ifoRead_PGCI_UT(ifofile);
|
|
130 *
|
|
131 * Reads in the menu PGCI unit table for the menu VOB. For the video manager,
|
|
132 * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
133 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
134 * video manager and video title set information files. For VMGI files, this
|
|
135 * fills the ifofile->vmgi_pgci_ut structure and all its substructures. For
|
|
136 * VTSI files, this fills the ifofile->vtsm_pgci_ut structure.
|
|
137 */
|
|
138 int ifoRead_PGCI_UT(ifo_handle_t *);
|
15874
|
139
|
|
140 /**
|
|
141 * okay = ifoRead_VTS_TMAPT(ifofile);
|
|
142 *
|
|
143 * Reads in the VTS Time Map Table, this data is only located in the video
|
|
144 * title set information file. This fills the ifofile->vts_tmapt structure
|
|
145 * and all its substructures. When pressent enables VOBU level time-based
|
|
146 * seeking for One_Sequential_PGC_Titles.
|
|
147 */
|
|
148 int ifoRead_VTS_TMAPT(ifo_handle_t *);
|
|
149
|
7029
|
150 /**
|
|
151 * okay = ifoRead_C_ADT(ifofile);
|
|
152 *
|
|
153 * Reads in the cell address table for the menu VOB. For the video manager,
|
|
154 * this corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
155 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
156 * video manager and video title set information files. For VMGI files, this
|
|
157 * fills the ifofile->vmgm_c_adt structure and all its substructures. For VTSI
|
|
158 * files, this fills the ifofile->vtsm_c_adt structure.
|
|
159 */
|
|
160 int ifoRead_C_ADT(ifo_handle_t *);
|
|
161
|
|
162 /**
|
|
163 * okay = ifoRead_TITLE_C_ADT(ifofile);
|
|
164 *
|
|
165 * Reads in the cell address table for the video title set corresponding to
|
|
166 * this IFO file. This data is only located in the video title set information
|
|
167 * file. This structure is mandatory, and must be included in the VTSI file.
|
|
168 * This call fills the ifofile->vts_c_adt structure and its substructures.
|
|
169 */
|
|
170 int ifoRead_TITLE_C_ADT(ifo_handle_t *);
|
|
171
|
|
172 /**
|
|
173 * okay = ifoRead_VOBU_ADMAP(ifofile);
|
|
174 *
|
|
175 * Reads in the VOBU address map for the menu VOB. For the video manager, this
|
|
176 * corresponds to the VIDEO_TS.VOB file, and for each title set, this
|
|
177 * corresponds to the VTS_XX_0.VOB file. This data is located in both the
|
|
178 * video manager and video title set information files. For VMGI files, this
|
|
179 * fills the ifofile->vmgm_vobu_admap structure and all its substructures. For
|
|
180 * VTSI files, this fills the ifofile->vtsm_vobu_admap structure.
|
|
181 */
|
|
182 int ifoRead_VOBU_ADMAP(ifo_handle_t *);
|
|
183
|
|
184 /**
|
|
185 * okay = ifoRead_TITLE_VOBU_ADMAP(ifofile);
|
|
186 *
|
|
187 * Reads in the VOBU address map for the associated video title set. This data
|
|
188 * is only located in the video title set information file. This structure is
|
|
189 * mandatory, and must be included in the VTSI file. Fills the
|
|
190 * ifofile->vts_vobu_admap structure and its substructures.
|
|
191 */
|
|
192 int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *);
|
|
193
|
|
194 /**
|
|
195 * okay = ifoRead_TXTDT_MGI(ifofile);
|
|
196 *
|
|
197 * Reads in the text data strings for the DVD. Fills the ifofile->txtdt_mgi
|
|
198 * structure and all its substructures. This data is only located in the video
|
|
199 * manager information file. This structure is mandatory, and must be included
|
|
200 * in the VMGI file.
|
|
201 */
|
|
202 int ifoRead_TXTDT_MGI(ifo_handle_t *);
|
|
203
|
|
204 /**
|
|
205 * The following functions are used for freeing parsed sections of the
|
|
206 * ifo_handle_t structure and the allocated substructures. The free calls
|
|
207 * below are safe: they will not mind if you attempt to free part of an IFO
|
|
208 * file which was not read in or which does not exist.
|
|
209 */
|
|
210 void ifoFree_PTL_MAIT(ifo_handle_t *);
|
|
211 void ifoFree_VTS_ATRT(ifo_handle_t *);
|
|
212 void ifoFree_TT_SRPT(ifo_handle_t *);
|
|
213 void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
|
|
214 void ifoFree_FP_PGC(ifo_handle_t *);
|
|
215 void ifoFree_PGCIT(ifo_handle_t *);
|
|
216 void ifoFree_PGCI_UT(ifo_handle_t *);
|
15874
|
217 void ifoFree_VTS_TMAPT(ifo_handle_t *);
|
7029
|
218 void ifoFree_C_ADT(ifo_handle_t *);
|
|
219 void ifoFree_TITLE_C_ADT(ifo_handle_t *);
|
|
220 void ifoFree_VOBU_ADMAP(ifo_handle_t *);
|
|
221 void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
|
|
222 void ifoFree_TXTDT_MGI(ifo_handle_t *);
|
|
223
|
|
224 #ifdef __cplusplus
|
|
225 };
|
|
226 #endif
|
|
227 #endif /* IFO_READ_H_INCLUDED */
|