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