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