Mercurial > mplayer.hg
annotate dvdread/ifo_types.h @ 24047:de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
author | diego |
---|---|
date | Wed, 15 Aug 2007 11:47:22 +0000 |
parents | 4da452b25fd5 |
children | 1542693b2a30 |
rev | line source |
---|---|
7029 | 1 #ifndef IFO_TYPES_H_INCLUDED |
2 #define IFO_TYPES_H_INCLUDED | |
3 | |
4 /* | |
5 * Copyright (C) 2000, 2001 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. |
18783 | 9 * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/ |
14938
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 | |
20983 | 27 #include <dvdread/dvd_reader.h> |
7029 | 28 |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
29 #if defined(__BEOS__) |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
30 #if !defined(_INTTYPES_H_) && !defined(_INTTYPES_H) && !defined(_STDINT_H_) && !defined(_STDINT_H) |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
31 #error "Must include <inttypes.h> or <stdint.h> before any libdvdread header." |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
32 #endif |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
33 #else |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
34 #if !defined(UINT8_MAX) || !defined(UINT16_MAX) || !defined(INT32_MAX) |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
35 #error "Must include <inttypes.h> or <stdint.h> before any libdvdread header." |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
36 #endif |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
37 #endif |
7029 | 38 |
39 #undef ATTRIBUTE_PACKED | |
40 #undef PRAGMA_PACK_BEGIN | |
41 #undef PRAGMA_PACK_END | |
42 | |
43 #if defined(__GNUC__) | |
44 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) | |
45 #define ATTRIBUTE_PACKED __attribute__ ((packed)) | |
46 #define PRAGMA_PACK 0 | |
47 #endif | |
48 #endif | |
49 | |
50 #if !defined(ATTRIBUTE_PACKED) | |
51 #define ATTRIBUTE_PACKED | |
52 #define PRAGMA_PACK 1 | |
53 #endif | |
54 | |
55 #if PRAGMA_PACK | |
56 #pragma pack(1) | |
57 #endif | |
58 | |
59 | |
60 /** | |
61 * Common | |
62 * | |
63 * The following structures are used in both the VMGI and VTSI. | |
64 */ | |
65 | |
66 | |
67 /** | |
68 * DVD Time Information. | |
69 */ | |
70 typedef struct { | |
71 uint8_t hour; | |
72 uint8_t minute; | |
73 uint8_t second; | |
15874 | 74 uint8_t frame_u; /* The two high bits are the frame rate. */ |
7029 | 75 } ATTRIBUTE_PACKED dvd_time_t; |
76 | |
77 /** | |
78 * Type to store per-command data. | |
79 */ | |
80 typedef struct { | |
81 uint8_t bytes[8]; | |
82 } ATTRIBUTE_PACKED vm_cmd_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
83 #define COMMAND_DATA_SIZE 8U |
7029 | 84 |
85 | |
86 /** | |
87 * Video Attributes. | |
88 */ | |
89 typedef struct { | |
90 #ifdef WORDS_BIGENDIAN | |
91 unsigned int mpeg_version : 2; | |
92 unsigned int video_format : 2; | |
93 unsigned int display_aspect_ratio : 2; | |
94 unsigned int permitted_df : 2; | |
95 | |
96 unsigned int line21_cc_1 : 1; | |
97 unsigned int line21_cc_2 : 1; | |
15874 | 98 unsigned int unknown1 : 1; |
99 unsigned int bit_rate : 1; | |
7029 | 100 |
101 unsigned int picture_size : 2; | |
102 unsigned int letterboxed : 1; | |
103 unsigned int film_mode : 1; | |
104 #else | |
105 unsigned int permitted_df : 2; | |
106 unsigned int display_aspect_ratio : 2; | |
107 unsigned int video_format : 2; | |
108 unsigned int mpeg_version : 2; | |
109 | |
110 unsigned int film_mode : 1; | |
111 unsigned int letterboxed : 1; | |
112 unsigned int picture_size : 2; | |
113 | |
15874 | 114 unsigned int bit_rate : 1; |
115 unsigned int unknown1 : 1; | |
7029 | 116 unsigned int line21_cc_2 : 1; |
117 unsigned int line21_cc_1 : 1; | |
118 #endif | |
119 } ATTRIBUTE_PACKED video_attr_t; | |
120 | |
121 /** | |
15874 | 122 * Audio Attributes. |
7029 | 123 */ |
124 typedef struct { | |
125 #ifdef WORDS_BIGENDIAN | |
126 unsigned int audio_format : 3; | |
127 unsigned int multichannel_extension : 1; | |
128 unsigned int lang_type : 2; | |
129 unsigned int application_mode : 2; | |
130 | |
131 unsigned int quantization : 2; | |
132 unsigned int sample_frequency : 2; | |
133 unsigned int unknown1 : 1; | |
134 unsigned int channels : 3; | |
135 #else | |
136 unsigned int application_mode : 2; | |
137 unsigned int lang_type : 2; | |
138 unsigned int multichannel_extension : 1; | |
139 unsigned int audio_format : 3; | |
140 | |
141 unsigned int channels : 3; | |
142 unsigned int unknown1 : 1; | |
143 unsigned int sample_frequency : 2; | |
144 unsigned int quantization : 2; | |
145 #endif | |
146 uint16_t lang_code; | |
147 uint8_t lang_extension; | |
15874 | 148 uint8_t code_extension; |
149 uint8_t unknown3; | |
150 union { | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
151 struct { |
15874 | 152 #ifdef WORDS_BIGENDIAN |
153 unsigned int unknown4 : 1; | |
154 unsigned int channel_assignment : 3; | |
155 unsigned int version : 2; | |
156 unsigned int mc_intro : 1; /* probably 0: true, 1:false */ | |
157 unsigned int mode : 1; /* Karaoke mode 0: solo 1: duet */ | |
158 #else | |
159 unsigned int mode : 1; | |
160 unsigned int mc_intro : 1; | |
161 unsigned int version : 2; | |
162 unsigned int channel_assignment : 3; | |
163 unsigned int unknown4 : 1; | |
164 #endif | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
165 } ATTRIBUTE_PACKED karaoke; |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
166 struct { |
15874 | 167 #ifdef WORDS_BIGENDIAN |
168 unsigned int unknown5 : 4; | |
169 unsigned int dolby_encoded : 1; /* suitable for surround decoding */ | |
170 unsigned int unknown6 : 3; | |
171 #else | |
172 unsigned int unknown6 : 3; | |
173 unsigned int dolby_encoded : 1; | |
174 unsigned int unknown5 : 4; | |
175 #endif | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
176 } ATTRIBUTE_PACKED surround; |
15874 | 177 } app_info; |
7029 | 178 } ATTRIBUTE_PACKED audio_attr_t; |
179 | |
15874 | 180 |
7029 | 181 /** |
15874 | 182 * MultiChannel Extension |
183 */ | |
184 typedef struct { | |
185 #ifdef WORDS_BIGENDIAN | |
186 unsigned int zero1 : 7; | |
187 unsigned int ach0_gme : 1; | |
188 | |
189 unsigned int zero2 : 7; | |
190 unsigned int ach1_gme : 1; | |
191 | |
192 unsigned int zero3 : 4; | |
193 unsigned int ach2_gv1e : 1; | |
194 unsigned int ach2_gv2e : 1; | |
195 unsigned int ach2_gm1e : 1; | |
196 unsigned int ach2_gm2e : 1; | |
197 | |
198 unsigned int zero4 : 4; | |
199 unsigned int ach3_gv1e : 1; | |
200 unsigned int ach3_gv2e : 1; | |
201 unsigned int ach3_gmAe : 1; | |
202 unsigned int ach3_se2e : 1; | |
203 | |
204 unsigned int zero5 : 4; | |
205 unsigned int ach4_gv1e : 1; | |
206 unsigned int ach4_gv2e : 1; | |
207 unsigned int ach4_gmBe : 1; | |
208 unsigned int ach4_seBe : 1; | |
209 #else | |
210 unsigned int ach0_gme : 1; | |
211 unsigned int zero1 : 7; | |
212 | |
213 unsigned int ach1_gme : 1; | |
214 unsigned int zero2 : 7; | |
215 | |
216 unsigned int ach2_gm2e : 1; | |
217 unsigned int ach2_gm1e : 1; | |
218 unsigned int ach2_gv2e : 1; | |
219 unsigned int ach2_gv1e : 1; | |
220 unsigned int zero3 : 4; | |
221 | |
222 unsigned int ach3_se2e : 1; | |
223 unsigned int ach3_gmAe : 1; | |
224 unsigned int ach3_gv2e : 1; | |
225 unsigned int ach3_gv1e : 1; | |
226 unsigned int zero4 : 4; | |
227 | |
228 unsigned int ach4_seBe : 1; | |
229 unsigned int ach4_gmBe : 1; | |
230 unsigned int ach4_gv2e : 1; | |
231 unsigned int ach4_gv1e : 1; | |
232 unsigned int zero5 : 4; | |
233 #endif | |
234 uint8_t zero6[19]; | |
235 } ATTRIBUTE_PACKED multichannel_ext_t; | |
236 | |
237 | |
238 /** | |
239 * Subpicture Attributes. | |
7029 | 240 */ |
241 typedef struct { | |
242 /* | |
243 * type: 0 not specified | |
244 * 1 language | |
245 * 2 other | |
246 * coding mode: 0 run length | |
247 * 1 extended | |
248 * 2 other | |
249 * language: indicates language if type == 1 | |
250 * lang extension: if type == 1 contains the lang extension | |
251 */ | |
15874 | 252 #ifdef WORDS_BIGENDIAN |
253 unsigned int code_mode : 3; | |
254 unsigned int zero1 : 3; | |
255 unsigned int type : 2; | |
256 #else | |
257 unsigned int type : 2; | |
258 unsigned int zero1 : 3; | |
259 unsigned int code_mode : 3; | |
260 #endif | |
261 uint8_t zero2; | |
7029 | 262 uint16_t lang_code; |
15874 | 263 uint8_t lang_extension; |
264 uint8_t code_extension; | |
7029 | 265 } ATTRIBUTE_PACKED subp_attr_t; |
266 | |
267 | |
268 | |
269 /** | |
270 * PGC Command Table. | |
271 */ | |
272 typedef struct { | |
273 uint16_t nr_of_pre; | |
274 uint16_t nr_of_post; | |
275 uint16_t nr_of_cell; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
276 uint16_t last_byte; |
7029 | 277 vm_cmd_t *pre_cmds; |
278 vm_cmd_t *post_cmds; | |
279 vm_cmd_t *cell_cmds; | |
280 } ATTRIBUTE_PACKED pgc_command_tbl_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
281 #define PGC_COMMAND_TBL_SIZE 8U |
7029 | 282 |
283 /** | |
284 * PGC Program Map | |
285 */ | |
286 typedef uint8_t pgc_program_map_t; | |
287 | |
288 /** | |
289 * Cell Playback Information. | |
290 */ | |
291 typedef struct { | |
292 #ifdef WORDS_BIGENDIAN | |
293 unsigned int block_mode : 2; | |
294 unsigned int block_type : 2; | |
295 unsigned int seamless_play : 1; | |
296 unsigned int interleaved : 1; | |
297 unsigned int stc_discontinuity: 1; | |
298 unsigned int seamless_angle : 1; | |
299 | |
15874 | 300 unsigned int playback_mode : 1; /**< When set, enter StillMode after each VOBU */ |
301 unsigned int restricted : 1; /**< ?? drop out of fastforward? */ | |
7029 | 302 unsigned int unknown2 : 6; |
303 #else | |
304 unsigned int seamless_angle : 1; | |
305 unsigned int stc_discontinuity: 1; | |
306 unsigned int interleaved : 1; | |
307 unsigned int seamless_play : 1; | |
308 unsigned int block_type : 2; | |
309 unsigned int block_mode : 2; | |
310 | |
311 unsigned int unknown2 : 6; | |
312 unsigned int restricted : 1; | |
15874 | 313 unsigned int playback_mode : 1; |
7029 | 314 #endif |
315 uint8_t still_time; | |
316 uint8_t cell_cmd_nr; | |
317 dvd_time_t playback_time; | |
318 uint32_t first_sector; | |
319 uint32_t first_ilvu_end_sector; | |
320 uint32_t last_vobu_start_sector; | |
321 uint32_t last_sector; | |
322 } ATTRIBUTE_PACKED cell_playback_t; | |
323 | |
324 #define BLOCK_TYPE_NONE 0x0 | |
325 #define BLOCK_TYPE_ANGLE_BLOCK 0x1 | |
326 | |
327 #define BLOCK_MODE_NOT_IN_BLOCK 0x0 | |
328 #define BLOCK_MODE_FIRST_CELL 0x1 | |
329 #define BLOCK_MODE_IN_BLOCK 0x2 | |
330 #define BLOCK_MODE_LAST_CELL 0x3 | |
331 | |
332 /** | |
333 * Cell Position Information. | |
334 */ | |
335 typedef struct { | |
336 uint16_t vob_id_nr; | |
337 uint8_t zero_1; | |
338 uint8_t cell_nr; | |
339 } ATTRIBUTE_PACKED cell_position_t; | |
340 | |
341 /** | |
342 * User Operations. | |
343 */ | |
344 typedef struct { | |
345 #ifdef WORDS_BIGENDIAN | |
15874 | 346 unsigned int zero : 7; /* 25-31 */ |
347 unsigned int video_pres_mode_change : 1; /* 24 */ | |
7029 | 348 |
15874 | 349 unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ |
350 unsigned int angle_change : 1; | |
351 unsigned int subpic_stream_change : 1; | |
352 unsigned int audio_stream_change : 1; | |
353 unsigned int pause_on : 1; | |
354 unsigned int still_off : 1; | |
355 unsigned int button_select_or_activate : 1; | |
356 unsigned int resume : 1; /* 16 */ | |
7029 | 357 |
15874 | 358 unsigned int chapter_menu_call : 1; /* 15 */ |
359 unsigned int angle_menu_call : 1; | |
360 unsigned int audio_menu_call : 1; | |
361 unsigned int subpic_menu_call : 1; | |
362 unsigned int root_menu_call : 1; | |
363 unsigned int title_menu_call : 1; | |
364 unsigned int backward_scan : 1; | |
365 unsigned int forward_scan : 1; /* 8 */ | |
7029 | 366 |
15874 | 367 unsigned int next_pg_search : 1; /* 7 */ |
368 unsigned int prev_or_top_pg_search : 1; | |
369 unsigned int time_or_chapter_search : 1; | |
370 unsigned int go_up : 1; | |
371 unsigned int stop : 1; | |
372 unsigned int title_play : 1; | |
373 unsigned int chapter_search_or_play : 1; | |
374 unsigned int title_or_time_play : 1; /* 0 */ | |
7029 | 375 #else |
15874 | 376 unsigned int video_pres_mode_change : 1; /* 24 */ |
377 unsigned int zero : 7; /* 25-31 */ | |
7029 | 378 |
15874 | 379 unsigned int resume : 1; /* 16 */ |
380 unsigned int button_select_or_activate : 1; | |
381 unsigned int still_off : 1; | |
382 unsigned int pause_on : 1; | |
383 unsigned int audio_stream_change : 1; | |
384 unsigned int subpic_stream_change : 1; | |
385 unsigned int angle_change : 1; | |
386 unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */ | |
7029 | 387 |
15874 | 388 unsigned int forward_scan : 1; /* 8 */ |
389 unsigned int backward_scan : 1; | |
390 unsigned int title_menu_call : 1; | |
391 unsigned int root_menu_call : 1; | |
392 unsigned int subpic_menu_call : 1; | |
393 unsigned int audio_menu_call : 1; | |
394 unsigned int angle_menu_call : 1; | |
395 unsigned int chapter_menu_call : 1; /* 15 */ | |
7029 | 396 |
15874 | 397 unsigned int title_or_time_play : 1; /* 0 */ |
398 unsigned int chapter_search_or_play : 1; | |
399 unsigned int title_play : 1; | |
400 unsigned int stop : 1; | |
401 unsigned int go_up : 1; | |
402 unsigned int time_or_chapter_search : 1; | |
403 unsigned int prev_or_top_pg_search : 1; | |
404 unsigned int next_pg_search : 1; /* 7 */ | |
7029 | 405 #endif |
406 } ATTRIBUTE_PACKED user_ops_t; | |
407 | |
408 /** | |
16649
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
409 * Subpicture stream mapping for a subtitle |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
410 */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
411 typedef struct { |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
412 #ifdef WORDS_BIGENDIAN |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
413 unsigned int present : 1; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
414 unsigned int zero1 : 2; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
415 unsigned int s_4p3 : 5; /* stream for 4:3 on any display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
416 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
417 unsigned int zero2 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
418 unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
419 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
420 unsigned int zero3 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
421 unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
422 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
423 unsigned int zero4 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
424 unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
425 #else |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
426 unsigned int s_4p3 : 5; /* stream for 4:3 on any display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
427 unsigned int zero1 : 2; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
428 unsigned int present : 1; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
429 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
430 unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
431 unsigned int zero2 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
432 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
433 unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
434 unsigned int zero3 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
435 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
436 unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
437 unsigned int zero4 : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
438 #endif |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
439 } ATTRIBUTE_PACKED subp_mapping_t; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
440 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
441 /** |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
442 * Audio stream mapping for a soundtrack |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
443 */ |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
444 typedef struct { |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
445 #ifdef WORDS_BIGENDIAN |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
446 unsigned int present : 1; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
447 unsigned int zero1 : 4; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
448 unsigned int s_audio : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
449 #else |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
450 unsigned int s_audio : 3; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
451 unsigned int zero1 : 4; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
452 unsigned int present : 1; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
453 #endif |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
454 uint8_t zero2; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
455 } ATTRIBUTE_PACKED audio_mapping_t; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
456 |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
457 /** |
7029 | 458 * Program Chain Information. |
459 */ | |
460 typedef struct { | |
461 uint16_t zero_1; | |
462 uint8_t nr_of_programs; | |
463 uint8_t nr_of_cells; | |
464 dvd_time_t playback_time; | |
465 user_ops_t prohibited_ops; | |
16649
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
466 audio_mapping_t audio_control[8]; |
e1d6fbd607e0
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
reimar
parents:
15874
diff
changeset
|
467 subp_mapping_t subp_control[32]; |
7029 | 468 uint16_t next_pgc_nr; |
469 uint16_t prev_pgc_nr; | |
470 uint16_t goup_pgc_nr; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
471 uint8_t pg_playback_mode; |
7029 | 472 uint8_t still_time; |
473 uint32_t palette[16]; /* New type struct {zero_1, Y, Cr, Cb} ? */ | |
474 uint16_t command_tbl_offset; | |
475 uint16_t program_map_offset; | |
476 uint16_t cell_playback_offset; | |
477 uint16_t cell_position_offset; | |
478 pgc_command_tbl_t *command_tbl; | |
479 pgc_program_map_t *program_map; | |
480 cell_playback_t *cell_playback; | |
481 cell_position_t *cell_position; | |
482 } ATTRIBUTE_PACKED pgc_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
483 #define PGC_SIZE 236U |
7029 | 484 |
485 /** | |
486 * Program Chain Information Search Pointer. | |
487 */ | |
488 typedef struct { | |
489 uint8_t entry_id; | |
490 #ifdef WORDS_BIGENDIAN | |
491 unsigned int block_mode : 2; | |
492 unsigned int block_type : 2; | |
493 unsigned int unknown1 : 4; | |
494 #else | |
495 unsigned int unknown1 : 4; | |
496 unsigned int block_type : 2; | |
497 unsigned int block_mode : 2; | |
498 #endif | |
499 uint16_t ptl_id_mask; | |
500 uint32_t pgc_start_byte; | |
501 pgc_t *pgc; | |
502 } ATTRIBUTE_PACKED pgci_srp_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
503 #define PGCI_SRP_SIZE 8U |
7029 | 504 |
505 /** | |
506 * Program Chain Information Table. | |
507 */ | |
508 typedef struct { | |
509 uint16_t nr_of_pgci_srp; | |
510 uint16_t zero_1; | |
511 uint32_t last_byte; | |
512 pgci_srp_t *pgci_srp; | |
513 } ATTRIBUTE_PACKED pgcit_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
514 #define PGCIT_SIZE 8U |
7029 | 515 |
516 /** | |
517 * Menu PGCI Language Unit. | |
518 */ | |
519 typedef struct { | |
520 uint16_t lang_code; | |
15874 | 521 uint8_t lang_extension; |
7029 | 522 uint8_t exists; |
523 uint32_t lang_start_byte; | |
524 pgcit_t *pgcit; | |
525 } ATTRIBUTE_PACKED pgci_lu_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
526 #define PGCI_LU_SIZE 8U |
7029 | 527 |
528 /** | |
529 * Menu PGCI Unit Table. | |
530 */ | |
531 typedef struct { | |
532 uint16_t nr_of_lus; | |
533 uint16_t zero_1; | |
534 uint32_t last_byte; | |
535 pgci_lu_t *lu; | |
536 } ATTRIBUTE_PACKED pgci_ut_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
537 #define PGCI_UT_SIZE 8U |
7029 | 538 |
539 /** | |
540 * Cell Address Information. | |
541 */ | |
542 typedef struct { | |
543 uint16_t vob_id; | |
544 uint8_t cell_id; | |
545 uint8_t zero_1; | |
546 uint32_t start_sector; | |
547 uint32_t last_sector; | |
548 } ATTRIBUTE_PACKED cell_adr_t; | |
549 | |
550 /** | |
551 * Cell Address Table. | |
552 */ | |
553 typedef struct { | |
554 uint16_t nr_of_vobs; /* VOBs */ | |
555 uint16_t zero_1; | |
556 uint32_t last_byte; | |
15874 | 557 cell_adr_t *cell_adr_table; /* No explicit size given. */ |
7029 | 558 } ATTRIBUTE_PACKED c_adt_t; |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
559 #define C_ADT_SIZE 8U |
7029 | 560 |
561 /** | |
562 * VOBU Address Map. | |
563 */ | |
564 typedef struct { | |
565 uint32_t last_byte; | |
566 uint32_t *vobu_start_sectors; | |
567 } ATTRIBUTE_PACKED vobu_admap_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
568 #define VOBU_ADMAP_SIZE 4U |
7029 | 569 |
570 | |
571 | |
572 | |
573 /** | |
574 * VMGI | |
575 * | |
576 * The following structures relate to the Video Manager. | |
577 */ | |
578 | |
579 /** | |
580 * Video Manager Information Management Table. | |
581 */ | |
582 typedef struct { | |
583 char vmg_identifier[12]; | |
584 uint32_t vmg_last_sector; | |
585 uint8_t zero_1[12]; | |
586 uint32_t vmgi_last_sector; | |
587 uint8_t zero_2; | |
588 uint8_t specification_version; | |
589 uint32_t vmg_category; | |
590 uint16_t vmg_nr_of_volumes; | |
591 uint16_t vmg_this_volume_nr; | |
592 uint8_t disc_side; | |
593 uint8_t zero_3[19]; | |
594 uint16_t vmg_nr_of_title_sets; /* Number of VTSs. */ | |
595 char provider_identifier[32]; | |
596 uint64_t vmg_pos_code; | |
597 uint8_t zero_4[24]; | |
598 uint32_t vmgi_last_byte; | |
599 uint32_t first_play_pgc; | |
600 uint8_t zero_5[56]; | |
601 uint32_t vmgm_vobs; /* sector */ | |
602 uint32_t tt_srpt; /* sector */ | |
603 uint32_t vmgm_pgci_ut; /* sector */ | |
604 uint32_t ptl_mait; /* sector */ | |
605 uint32_t vts_atrt; /* sector */ | |
606 uint32_t txtdt_mgi; /* sector */ | |
607 uint32_t vmgm_c_adt; /* sector */ | |
608 uint32_t vmgm_vobu_admap; /* sector */ | |
609 uint8_t zero_6[32]; | |
610 | |
611 video_attr_t vmgm_video_attr; | |
612 uint8_t zero_7; | |
15874 | 613 uint8_t nr_of_vmgm_audio_streams; /* should be 0 or 1 */ |
7029 | 614 audio_attr_t vmgm_audio_attr; |
615 audio_attr_t zero_8[7]; | |
616 uint8_t zero_9[17]; | |
15874 | 617 uint8_t nr_of_vmgm_subp_streams; /* should be 0 or 1 */ |
7029 | 618 subp_attr_t vmgm_subp_attr; |
619 subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */ | |
620 } ATTRIBUTE_PACKED vmgi_mat_t; | |
621 | |
622 typedef struct { | |
623 #ifdef WORDS_BIGENDIAN | |
624 unsigned int zero_1 : 1; | |
15874 | 625 unsigned int multi_or_random_pgc_title : 1; /* 0: one sequential pgc title */ |
7029 | 626 unsigned int jlc_exists_in_cell_cmd : 1; |
627 unsigned int jlc_exists_in_prepost_cmd : 1; | |
628 unsigned int jlc_exists_in_button_cmd : 1; | |
629 unsigned int jlc_exists_in_tt_dom : 1; | |
15874 | 630 unsigned int chapter_search_or_play : 1; /* UOP 1 */ |
631 unsigned int title_or_time_play : 1; /* UOP 0 */ | |
7029 | 632 #else |
15874 | 633 unsigned int title_or_time_play : 1; |
634 unsigned int chapter_search_or_play : 1; | |
7029 | 635 unsigned int jlc_exists_in_tt_dom : 1; |
636 unsigned int jlc_exists_in_button_cmd : 1; | |
637 unsigned int jlc_exists_in_prepost_cmd : 1; | |
638 unsigned int jlc_exists_in_cell_cmd : 1; | |
15874 | 639 unsigned int multi_or_random_pgc_title : 1; |
7029 | 640 unsigned int zero_1 : 1; |
641 #endif | |
642 } ATTRIBUTE_PACKED playback_type_t; | |
643 | |
644 /** | |
645 * Title Information. | |
646 */ | |
647 typedef struct { | |
648 playback_type_t pb_ty; | |
649 uint8_t nr_of_angles; | |
650 uint16_t nr_of_ptts; | |
651 uint16_t parental_id; | |
652 uint8_t title_set_nr; | |
653 uint8_t vts_ttn; | |
654 uint32_t title_set_sector; | |
655 } ATTRIBUTE_PACKED title_info_t; | |
656 | |
657 /** | |
658 * PartOfTitle Search Pointer Table. | |
659 */ | |
660 typedef struct { | |
661 uint16_t nr_of_srpts; | |
662 uint16_t zero_1; | |
663 uint32_t last_byte; | |
664 title_info_t *title; | |
665 } ATTRIBUTE_PACKED tt_srpt_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
666 #define TT_SRPT_SIZE 8U |
7029 | 667 |
15874 | 668 |
669 /** | |
670 * Parental Management Information Unit Table. | |
671 * Level 1 (US: G), ..., 7 (US: NC-17), 8 | |
672 */ | |
673 typedef uint16_t pf_level_t[8]; | |
674 | |
7029 | 675 /** |
676 * Parental Management Information Unit Table. | |
677 */ | |
678 typedef struct { | |
679 uint16_t country_code; | |
680 uint16_t zero_1; | |
681 uint16_t pf_ptl_mai_start_byte; | |
682 uint16_t zero_2; | |
15874 | 683 pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is first */ |
7029 | 684 } ATTRIBUTE_PACKED ptl_mait_country_t; |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
685 #define PTL_MAIT_COUNTRY_SIZE 8U |
7029 | 686 |
687 /** | |
688 * Parental Management Information Table. | |
689 */ | |
690 typedef struct { | |
691 uint16_t nr_of_countries; | |
692 uint16_t nr_of_vtss; | |
693 uint32_t last_byte; | |
694 ptl_mait_country_t *countries; | |
695 } ATTRIBUTE_PACKED ptl_mait_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
696 #define PTL_MAIT_SIZE 8U |
7029 | 697 |
698 /** | |
699 * Video Title Set Attributes. | |
700 */ | |
701 typedef struct { | |
702 uint32_t last_byte; | |
703 uint32_t vts_cat; | |
704 | |
705 video_attr_t vtsm_vobs_attr; | |
706 uint8_t zero_1; | |
15874 | 707 uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */ |
7029 | 708 audio_attr_t vtsm_audio_attr; |
709 audio_attr_t zero_2[7]; | |
710 uint8_t zero_3[16]; | |
711 uint8_t zero_4; | |
15874 | 712 uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */ |
7029 | 713 subp_attr_t vtsm_subp_attr; |
714 subp_attr_t zero_5[27]; | |
715 | |
716 uint8_t zero_6[2]; | |
717 | |
718 video_attr_t vtstt_vobs_video_attr; | |
719 uint8_t zero_7; | |
720 uint8_t nr_of_vtstt_audio_streams; | |
721 audio_attr_t vtstt_audio_attr[8]; | |
722 uint8_t zero_8[16]; | |
723 uint8_t zero_9; | |
724 uint8_t nr_of_vtstt_subp_streams; | |
725 subp_attr_t vtstt_subp_attr[32]; | |
726 } ATTRIBUTE_PACKED vts_attributes_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
727 #define VTS_ATTRIBUTES_SIZE 542U |
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
728 #define VTS_ATTRIBUTES_MIN_SIZE 356U |
7029 | 729 |
730 /** | |
731 * Video Title Set Attribute Table. | |
732 */ | |
733 typedef struct { | |
734 uint16_t nr_of_vtss; | |
735 uint16_t zero_1; | |
736 uint32_t last_byte; | |
737 vts_attributes_t *vts; | |
15874 | 738 uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes */ |
7029 | 739 } ATTRIBUTE_PACKED vts_atrt_t; |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
740 #define VTS_ATRT_SIZE 8U |
7029 | 741 |
742 /** | |
743 * Text Data. (Incomplete) | |
744 */ | |
745 typedef struct { | |
746 uint32_t last_byte; /* offsets are relative here */ | |
747 uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */ | |
748 #if 0 | |
15874 | 749 uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */ |
7029 | 750 uint16_t zero_1; |
751 | |
15874 | 752 uint8_t type_of_info; /* ?? 01 == disc, 02 == Title, 04 == Title part */ |
7029 | 753 uint8_t unknown1; |
754 uint8_t unknown2; | |
755 uint8_t unknown3; | |
15874 | 756 uint8_t unknown4; /* ?? allways 0x30 language?, text format? */ |
7029 | 757 uint8_t unknown5; |
15874 | 758 uint16_t offset; /* from first */ |
7029 | 759 |
15874 | 760 char text[12]; /* ended by 0x09 */ |
7029 | 761 #endif |
762 } ATTRIBUTE_PACKED txtdt_t; | |
763 | |
764 /** | |
765 * Text Data Language Unit. (Incomplete) | |
766 */ | |
767 typedef struct { | |
768 uint16_t lang_code; | |
769 uint16_t unknown; /* 0x0001, title 1? disc 1? side 1? */ | |
770 uint32_t txtdt_start_byte; /* prt, rel start of vmg_txtdt_mgi */ | |
771 txtdt_t *txtdt; | |
772 } ATTRIBUTE_PACKED txtdt_lu_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
773 #define TXTDT_LU_SIZE 8U |
7029 | 774 |
775 /** | |
776 * Text Data Manager Information. (Incomplete) | |
777 */ | |
778 typedef struct { | |
779 char disc_name[14]; /* how many bytes?? */ | |
780 uint16_t nr_of_language_units; /* 32bit?? */ | |
781 uint32_t last_byte; | |
782 txtdt_lu_t *lu; | |
783 } ATTRIBUTE_PACKED txtdt_mgi_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
784 #define TXTDT_MGI_SIZE 20U |
7029 | 785 |
786 | |
787 /** | |
788 * VTS | |
789 * | |
790 * Structures relating to the Video Title Set (VTS). | |
791 */ | |
792 | |
793 /** | |
794 * Video Title Set Information Management Table. | |
795 */ | |
796 typedef struct { | |
797 char vts_identifier[12]; | |
798 uint32_t vts_last_sector; | |
799 uint8_t zero_1[12]; | |
800 uint32_t vtsi_last_sector; | |
801 uint8_t zero_2; | |
802 uint8_t specification_version; | |
803 uint32_t vts_category; | |
804 uint16_t zero_3; | |
805 uint16_t zero_4; | |
806 uint8_t zero_5; | |
807 uint8_t zero_6[19]; | |
808 uint16_t zero_7; | |
809 uint8_t zero_8[32]; | |
810 uint64_t zero_9; | |
811 uint8_t zero_10[24]; | |
812 uint32_t vtsi_last_byte; | |
813 uint32_t zero_11; | |
814 uint8_t zero_12[56]; | |
815 uint32_t vtsm_vobs; /* sector */ | |
816 uint32_t vtstt_vobs; /* sector */ | |
817 uint32_t vts_ptt_srpt; /* sector */ | |
818 uint32_t vts_pgcit; /* sector */ | |
819 uint32_t vtsm_pgci_ut; /* sector */ | |
15874 | 820 uint32_t vts_tmapt; /* sector */ |
7029 | 821 uint32_t vtsm_c_adt; /* sector */ |
822 uint32_t vtsm_vobu_admap; /* sector */ | |
823 uint32_t vts_c_adt; /* sector */ | |
824 uint32_t vts_vobu_admap; /* sector */ | |
825 uint8_t zero_13[24]; | |
826 | |
827 video_attr_t vtsm_video_attr; | |
828 uint8_t zero_14; | |
15874 | 829 uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */ |
7029 | 830 audio_attr_t vtsm_audio_attr; |
831 audio_attr_t zero_15[7]; | |
832 uint8_t zero_16[17]; | |
15874 | 833 uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */ |
7029 | 834 subp_attr_t vtsm_subp_attr; |
835 subp_attr_t zero_17[27]; | |
836 uint8_t zero_18[2]; | |
837 | |
838 video_attr_t vts_video_attr; | |
839 uint8_t zero_19; | |
840 uint8_t nr_of_vts_audio_streams; | |
841 audio_attr_t vts_audio_attr[8]; | |
842 uint8_t zero_20[17]; | |
843 uint8_t nr_of_vts_subp_streams; | |
844 subp_attr_t vts_subp_attr[32]; | |
15874 | 845 uint16_t zero_21; |
846 multichannel_ext_t vts_mu_audio_attr[8]; | |
7029 | 847 /* XXX: how much 'padding' here, if any? */ |
848 } ATTRIBUTE_PACKED vtsi_mat_t; | |
849 | |
850 /** | |
851 * PartOfTitle Unit Information. | |
852 */ | |
853 typedef struct { | |
854 uint16_t pgcn; | |
855 uint16_t pgn; | |
856 } ATTRIBUTE_PACKED ptt_info_t; | |
857 | |
858 /** | |
859 * PartOfTitle Information. | |
860 */ | |
861 typedef struct { | |
862 uint16_t nr_of_ptts; | |
863 ptt_info_t *ptt; | |
864 } ATTRIBUTE_PACKED ttu_t; | |
865 | |
866 /** | |
867 * PartOfTitle Search Pointer Table. | |
868 */ | |
869 typedef struct { | |
870 uint16_t nr_of_srpts; | |
871 uint16_t zero_1; | |
872 uint32_t last_byte; | |
873 ttu_t *title; | |
15874 | 874 uint32_t *ttu_offset; /* offset table for each ttu */ |
7029 | 875 } ATTRIBUTE_PACKED vts_ptt_srpt_t; |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
876 #define VTS_PTT_SRPT_SIZE 8U |
7029 | 877 |
878 | |
15874 | 879 /** |
880 * Time Map Entry. | |
881 */ | |
882 /* Should this be bit field at all or just the uint32_t? */ | |
883 typedef uint32_t map_ent_t; | |
884 | |
885 /** | |
886 * Time Map. | |
887 */ | |
888 typedef struct { | |
889 uint8_t tmu; /* Time unit, in seconds */ | |
890 uint8_t zero_1; | |
891 uint16_t nr_of_entries; | |
892 map_ent_t *map_ent; | |
893 } ATTRIBUTE_PACKED vts_tmap_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
894 #define VTS_TMAP_SIZE 4U |
15874 | 895 |
896 /** | |
897 * Time Map Table. | |
898 */ | |
899 typedef struct { | |
900 uint16_t nr_of_tmaps; | |
901 uint16_t zero_1; | |
902 uint32_t last_byte; | |
903 vts_tmap_t *tmap; | |
904 uint32_t *tmap_offset; /* offset table for each tmap */ | |
905 } ATTRIBUTE_PACKED vts_tmapt_t; | |
24047
de28f9e8cb00
Sync libdvdread with version 0.9.5 (functional changes).
diego
parents:
20983
diff
changeset
|
906 #define VTS_TMAPT_SIZE 8U |
15874 | 907 |
908 | |
7029 | 909 #if PRAGMA_PACK |
910 #pragma pack() | |
911 #endif | |
912 | |
913 | |
914 /** | |
915 * The following structure defines an IFO file. The structure is divided into | |
916 * two parts, the VMGI, or Video Manager Information, which is read from the | |
917 * VIDEO_TS.[IFO,BUP] file, and the VTSI, or Video Title Set Information, which | |
918 * is read in from the VTS_XX_0.[IFO,BUP] files. | |
919 */ | |
920 typedef struct { | |
921 dvd_file_t *file; | |
922 | |
923 /* VMGI */ | |
924 vmgi_mat_t *vmgi_mat; | |
925 tt_srpt_t *tt_srpt; | |
926 pgc_t *first_play_pgc; | |
927 ptl_mait_t *ptl_mait; | |
928 vts_atrt_t *vts_atrt; | |
929 txtdt_mgi_t *txtdt_mgi; | |
930 | |
931 /* Common */ | |
932 pgci_ut_t *pgci_ut; | |
933 c_adt_t *menu_c_adt; | |
934 vobu_admap_t *menu_vobu_admap; | |
935 | |
936 /* VTSI */ | |
937 vtsi_mat_t *vtsi_mat; | |
938 vts_ptt_srpt_t *vts_ptt_srpt; | |
939 pgcit_t *vts_pgcit; | |
15874 | 940 vts_tmapt_t *vts_tmapt; |
7029 | 941 c_adt_t *vts_c_adt; |
942 vobu_admap_t *vts_vobu_admap; | |
943 } ifo_handle_t; | |
944 | |
945 #endif /* IFO_TYPES_H_INCLUDED */ |