annotate ifo_types.h @ 187:d03cab4b6286 src

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