comparison dvdread/ifo_types.h @ 33:c743d79f187b src

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