libdvdread 7.0.1
nav_types.h
1/*
2 * Copyright (C) 2000, 2001, 2002 HÃ¥kan Hjort <d95hjort@dtek.chalmers.se>
3 *
4 * The data structures in this file should represent the layout of the
5 * pci and dsi packets as they are stored in the stream. Information
6 * found by reading the source to VOBDUMP is the base for the structure
7 * and names of these data types.
8 *
9 * VOBDUMP: a program for examining DVD .VOB files.
10 * Copyright 1998, 1999 Eric Smith <eric@brouhaha.com>
11 *
12 * VOBDUMP is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License version 2 or version 3 as
14 * published by the Free Software Foundation. Note that I am not
15 * granting permission to redistribute or modify VOBDUMP under the terms
16 * of any later version of the General Public License.
17 *
18 * This program is distributed in the hope that it will be useful (or at
19 * least amusing), but WITHOUT ANY WARRANTY; without even the implied
20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
21 * the GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 */
27
28#ifndef LIBDVDREAD_NAV_TYPES_H
29#define LIBDVDREAD_NAV_TYPES_H
30
31#include <inttypes.h>
32
33#include <dvdread/attributes.h>
34#include <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t */
35
36/* The length including the substream id byte. */
37#define PCI_BYTES 0x3d4
38#define DSI_BYTES 0x3fa
39
40#define PS2_PCI_SUBSTREAM_ID 0x00
41#define PS2_DSI_SUBSTREAM_ID 0x01
42
43/* Remove this */
44#define DSI_START_BYTE 1031
45
49typedef struct {
50 uint32_t nv_pck_lbn;
51 uint16_t vobu_cat;
52 uint16_t zero1;
53 user_ops_t vobu_uop_ctl;
54 uint32_t vobu_s_ptm;
55 uint32_t vobu_e_ptm;
56 uint32_t vobu_se_e_ptm;
57 dvd_time_t e_eltm;
58 char vobu_isrc[32];
59} ATTRIBUTE_PACKED pci_gi_t;
60
64typedef struct {
65 uint32_t nsml_agl_dsta[9];
66} ATTRIBUTE_PACKED nsml_agli_t;
67
77typedef struct {
78 uint16_t hli_ss;
79 uint32_t hli_s_ptm;
80 uint32_t hli_e_ptm;
81 uint32_t btn_se_e_ptm;
82 unsigned char zero1 : 2;
83 unsigned char btngr_ns : 2;
84 unsigned char zero2 : 1;
85 unsigned char btngr1_dsp_ty : 3;
86 unsigned char zero3 : 1;
87 unsigned char btngr2_dsp_ty : 3;
88 unsigned char zero4 : 1;
89 unsigned char btngr3_dsp_ty : 3;
90 uint8_t btn_ofn;
91 uint8_t btn_ns;
92 uint8_t nsl_btn_ns;
93 uint8_t zero5;
94 uint8_t fosl_btnn;
95 uint8_t foac_btnn;
96} ATTRIBUTE_PACKED hl_gi_t;
97
98
107typedef struct {
108 uint32_t btn_coli[3][2];
109} ATTRIBUTE_PACKED btn_colit_t;
110
118typedef struct {
119 unsigned int btn_coln : 2;
120 unsigned int x_start : 10;
121 unsigned int zero1 : 2;
122 unsigned int x_end : 10;
123
124 unsigned int auto_action_mode : 2;
125 unsigned int y_start : 10;
126 unsigned int zero2 : 2;
127 unsigned int y_end : 10;
128
129 unsigned int zero3 : 2;
130 unsigned int up : 6;
131 unsigned int zero4 : 2;
132 unsigned int down : 6;
133 unsigned int zero5 : 2;
134 unsigned int left : 6;
135 unsigned int zero6 : 2;
136 unsigned int right : 6;
137 vm_cmd_t cmd;
138} ATTRIBUTE_PACKED btni_t;
139
143typedef struct {
144 hl_gi_t hl_gi;
145 btn_colit_t btn_colit;
146 btni_t btnit[36];
147} ATTRIBUTE_PACKED hli_t;
148
152typedef struct {
153 pci_gi_t pci_gi;
154 nsml_agli_t nsml_agli;
155 hli_t hli;
156 uint8_t zero1[189];
157} ATTRIBUTE_PACKED pci_t;
158
159
160
161
165typedef struct {
166 uint32_t nv_pck_scr;
167 uint32_t nv_pck_lbn;
168 uint32_t vobu_ea;
169 uint32_t vobu_1stref_ea;
170 uint32_t vobu_2ndref_ea;
171 uint32_t vobu_3rdref_ea;
172 uint16_t vobu_vob_idn;
173 uint8_t zero1;
174 uint8_t vobu_c_idn;
175 dvd_time_t c_eltm;
176} ATTRIBUTE_PACKED dsi_gi_t;
177
181typedef struct {
182 uint16_t category;
183 uint32_t ilvu_ea;
184 uint32_t ilvu_sa;
185 uint16_t size;
186 uint32_t vob_v_s_s_ptm;
187 uint32_t vob_v_e_e_ptm;
188 struct {
189 uint32_t stp_ptm1;
190 uint32_t stp_ptm2;
191 uint32_t gap_len1;
192 uint32_t gap_len2;
193 } vob_a[8];
194} ATTRIBUTE_PACKED sml_pbi_t;
195
199typedef struct {
200 uint32_t address;
201 uint16_t size;
202} ATTRIBUTE_PACKED sml_agl_data_t;
203
207typedef struct {
208 sml_agl_data_t data[9];
209} ATTRIBUTE_PACKED sml_agli_t;
210
214typedef struct {
215 uint32_t next_video;
216 uint32_t fwda[19];
217 uint32_t next_vobu;
218 uint32_t prev_vobu;
219 uint32_t bwda[19];
220 uint32_t prev_video;
221} ATTRIBUTE_PACKED vobu_sri_t;
222
223#define SRI_END_OF_CELL 0x3fffffff
224
228typedef struct {
229 uint16_t a_synca[8];
230 uint32_t sp_synca[32];
231} ATTRIBUTE_PACKED synci_t;
232
236typedef struct {
237 dsi_gi_t dsi_gi;
238 sml_pbi_t sml_pbi;
239 sml_agli_t sml_agli;
240 vobu_sri_t vobu_sri;
241 synci_t synci;
242 uint8_t zero1[471];
243} ATTRIBUTE_PACKED dsi_t;
244
245
246#if PRAGMA_PACK
247#pragma pack()
248#endif
249
250#endif /* LIBDVDREAD_NAV_TYPES_H */
unsigned int left
Definition nav_types.h:134
unsigned int auto_action_mode
Definition nav_types.h:124
uint32_t vobu_e_ptm
Definition nav_types.h:55
uint32_t vobu_s_ptm
Definition nav_types.h:54
uint32_t ilvu_ea
Definition nav_types.h:183
uint8_t nsl_btn_ns
Definition nav_types.h:92
unsigned char btngr3_dsp_ty
Definition nav_types.h:89
unsigned int right
Definition nav_types.h:136
uint8_t btn_ns
Definition nav_types.h:91
uint32_t vobu_3rdref_ea
Definition nav_types.h:171
unsigned char zero1
Definition ifo_types.h:138
uint32_t hli_e_ptm
Definition nav_types.h:80
uint32_t address
Definition nav_types.h:200
uint32_t vob_v_e_e_ptm
Definition nav_types.h:187
user_ops_t vobu_uop_ctl
Definition nav_types.h:53
unsigned int down
Definition nav_types.h:132
unsigned int y_end
Definition nav_types.h:127
uint32_t vobu_1stref_ea
Definition nav_types.h:169
uint8_t btn_ofn
Definition nav_types.h:90
uint32_t hli_s_ptm
Definition nav_types.h:79
unsigned char btngr_ns
Definition nav_types.h:83
uint8_t fosl_btnn
Definition nav_types.h:94
uint32_t vob_v_s_s_ptm
Definition nav_types.h:186
uint32_t nsml_agl_dsta[9]
Definition nav_types.h:65
unsigned int x_end
Definition nav_types.h:122
uint32_t vobu_2ndref_ea
Definition nav_types.h:170
dvd_time_t c_eltm
Definition nav_types.h:175
uint32_t bwda[19]
Definition nav_types.h:219
uint32_t next_video
Definition nav_types.h:215
unsigned char btngr1_dsp_ty
Definition nav_types.h:85
unsigned int y_start
Definition nav_types.h:125
uint16_t vobu_vob_idn
Definition nav_types.h:172
uint32_t nv_pck_lbn
Definition nav_types.h:50
uint32_t vobu_se_e_ptm
Definition nav_types.h:56
dvd_time_t e_eltm
Definition nav_types.h:57
uint16_t hli_ss
Definition nav_types.h:78
unsigned int btn_coln
Definition nav_types.h:119
uint32_t ilvu_sa
Definition nav_types.h:184
uint8_t foac_btnn
Definition nav_types.h:95
unsigned char btngr2_dsp_ty
Definition nav_types.h:87
uint32_t vobu_ea
Definition nav_types.h:168
unsigned int up
Definition nav_types.h:130
uint16_t a_synca[8]
Definition nav_types.h:229
uint32_t fwda[19]
Definition nav_types.h:216
uint16_t size
Definition nav_types.h:185
uint16_t vobu_cat
Definition nav_types.h:51
uint32_t btn_coli[3][2]
Definition nav_types.h:108
uint16_t category
Definition nav_types.h:182
unsigned char zero3
Definition ifo_types.h:144
unsigned char zero4
Definition ifo_types.h:150
unsigned char zero2
Definition ifo_types.h:141
uint32_t sp_synca[32]
Definition nav_types.h:230
unsigned int x_start
Definition nav_types.h:120
uint8_t vobu_c_idn
Definition nav_types.h:174
uint32_t btn_se_e_ptm
Definition nav_types.h:81