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