annotate libmpdvdkit2/ifo_types.h @ 8463:e421b4ab7815

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