00001 /* 00002 * Copyright (C) 2000, 2001, 2002 HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> 00003 * 00004 * The data structures in this file should represent the layout of the 00005 * pci and dsi packets as they are stored in the stream. Information 00006 * found by reading the source to VOBDUMP is the base for the structure 00007 * and names of these data types. 00008 * 00009 * VOBDUMP: a program for examining DVD .VOB files. 00010 * Copyright 1998, 1999 Eric Smith <eric@brouhaha.com> 00011 * 00012 * VOBDUMP is free software; you can redistribute it and/or modify it 00013 * under the terms of the GNU General Public License version 2 as 00014 * published by the Free Software Foundation. Note that I am not 00015 * granting permission to redistribute or modify VOBDUMP under the terms 00016 * of any later version of the General Public License. 00017 * 00018 * This program is distributed in the hope that it will be useful (or at 00019 * least amusing), but WITHOUT ANY WARRANTY; without even the implied 00020 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 00021 * the GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, write to the Free Software Foundation, 00025 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00026 */ 00027 00028 #ifndef LIBDVDREAD_NAV_TYPES_H 00029 #define LIBDVDREAD_NAV_TYPES_H 00030 00031 #include <inttypes.h> 00032 #include "ifo_types.h" /* only dvd_time_t, vm_cmd_t and user_ops_t */ 00033 00034 /* The length including the substream id byte. */ 00035 #define PCI_BYTES 0x3d4 00036 #define DSI_BYTES 0x3fa 00037 00038 #define PS2_PCI_SUBSTREAM_ID 0x00 00039 #define PS2_DSI_SUBSTREAM_ID 0x01 00040 00041 /* Remove this */ 00042 #define DSI_START_BYTE 1031 00043 00047 typedef struct { 00048 uint32_t nv_pck_lbn; 00049 uint16_t vobu_cat; 00050 uint16_t zero1; 00051 user_ops_t vobu_uop_ctl; 00052 uint32_t vobu_s_ptm; 00053 uint32_t vobu_e_ptm; 00054 uint32_t vobu_se_e_ptm; 00055 dvd_time_t e_eltm; 00056 char vobu_isrc[32]; 00057 } ATTRIBUTE_PACKED pci_gi_t; 00058 00062 typedef struct { 00063 uint32_t nsml_agl_dsta[9]; 00064 } ATTRIBUTE_PACKED nsml_agli_t; 00065 00075 typedef struct { 00076 uint16_t hli_ss; 00077 uint32_t hli_s_ptm; 00078 uint32_t hli_e_ptm; 00079 uint32_t btn_se_e_ptm; 00080 unsigned int zero1 : 2; 00081 unsigned int btngr_ns : 2; 00082 unsigned int zero2 : 1; 00083 unsigned int btngr1_dsp_ty : 3; 00084 unsigned int zero3 : 1; 00085 unsigned int btngr2_dsp_ty : 3; 00086 unsigned int zero4 : 1; 00087 unsigned int btngr3_dsp_ty : 3; 00088 uint8_t btn_ofn; 00089 uint8_t btn_ns; 00090 uint8_t nsl_btn_ns; 00091 uint8_t zero5; 00092 uint8_t fosl_btnn; 00093 uint8_t foac_btnn; 00094 } ATTRIBUTE_PACKED hl_gi_t; 00095 00096 00105 typedef struct { 00106 uint32_t btn_coli[3][2]; 00107 } ATTRIBUTE_PACKED btn_colit_t; 00108 00116 typedef struct { 00117 unsigned int btn_coln : 2; 00118 unsigned int x_start : 10; 00119 unsigned int zero1 : 2; 00120 unsigned int x_end : 10; 00122 unsigned int auto_action_mode : 2; 00123 unsigned int y_start : 10; 00124 unsigned int zero2 : 2; 00125 unsigned int y_end : 10; 00127 unsigned int zero3 : 2; 00128 unsigned int up : 6; 00129 unsigned int zero4 : 2; 00130 unsigned int down : 6; 00131 unsigned int zero5 : 2; 00132 unsigned int left : 6; 00133 unsigned int zero6 : 2; 00134 unsigned int right : 6; 00135 vm_cmd_t cmd; 00136 } ATTRIBUTE_PACKED btni_t; 00137 00141 typedef struct { 00142 hl_gi_t hl_gi; 00143 btn_colit_t btn_colit; 00144 btni_t btnit[36]; 00145 } ATTRIBUTE_PACKED hli_t; 00146 00150 typedef struct { 00151 pci_gi_t pci_gi; 00152 nsml_agli_t nsml_agli; 00153 hli_t hli; 00154 uint8_t zero1[189]; 00155 } ATTRIBUTE_PACKED pci_t; 00156 00157 00158 00159 00163 typedef struct { 00164 uint32_t nv_pck_scr; 00165 uint32_t nv_pck_lbn; 00166 uint32_t vobu_ea; 00167 uint32_t vobu_1stref_ea; 00168 uint32_t vobu_2ndref_ea; 00169 uint32_t vobu_3rdref_ea; 00170 uint16_t vobu_vob_idn; 00171 uint8_t zero1; 00172 uint8_t vobu_c_idn; 00173 dvd_time_t c_eltm; 00174 } ATTRIBUTE_PACKED dsi_gi_t; 00175 00179 typedef struct { 00180 uint16_t category; 00181 uint32_t ilvu_ea; 00182 uint32_t ilvu_sa; 00183 uint16_t size; 00184 uint32_t vob_v_s_s_ptm; 00185 uint32_t vob_v_e_e_ptm; 00186 struct { 00187 uint32_t stp_ptm1; 00188 uint32_t stp_ptm2; 00189 uint32_t gap_len1; 00190 uint32_t gap_len2; 00191 } vob_a[8]; 00192 } ATTRIBUTE_PACKED sml_pbi_t; 00193 00197 typedef struct { 00198 uint32_t address; 00199 uint16_t size; 00200 } ATTRIBUTE_PACKED sml_agl_data_t; 00201 00205 typedef struct { 00206 sml_agl_data_t data[9]; 00207 } ATTRIBUTE_PACKED sml_agli_t; 00208 00212 typedef struct { 00213 uint32_t next_video; 00214 uint32_t fwda[19]; 00215 uint32_t next_vobu; 00216 uint32_t prev_vobu; 00217 uint32_t bwda[19]; 00218 uint32_t prev_video; 00219 } ATTRIBUTE_PACKED vobu_sri_t; 00220 00221 #define SRI_END_OF_CELL 0x3fffffff 00222 00226 typedef struct { 00227 uint16_t a_synca[8]; 00228 uint32_t sp_synca[32]; 00229 } ATTRIBUTE_PACKED synci_t; 00230 00234 typedef struct { 00235 dsi_gi_t dsi_gi; 00236 sml_pbi_t sml_pbi; 00237 sml_agli_t sml_agli; 00238 vobu_sri_t vobu_sri; 00239 synci_t synci; 00240 uint8_t zero1[471]; 00241 } ATTRIBUTE_PACKED dsi_t; 00242 00243 00244 #if PRAGMA_PACK 00245 #pragma pack() 00246 #endif 00247 00248 #endif /* LIBDVDREAD_NAV_TYPES_H */
1.6.3