summaryrefslogtreecommitdiffstats
path: root/libmpdvdkit2/ifo_types.h
diff options
context:
space:
mode:
authoraurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-30 22:48:26 +0000
committeraurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-06-30 22:48:26 +0000
commiteb3c1b5cedfc1b7d35a2d261780979b00170946e (patch)
treeccc33eb81679684b7f2ca3d7c610d721375c4ea5 /libmpdvdkit2/ifo_types.h
parentc8fbf4405d7b433f0dc622bc9dcf81d0ceb5ef36 (diff)
downloadmpv-eb3c1b5cedfc1b7d35a2d261780979b00170946e.tar.bz2
mpv-eb3c1b5cedfc1b7d35a2d261780979b00170946e.tar.xz
update libdvdread to v0.9.4
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15875 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdvdkit2/ifo_types.h')
-rw-r--r--libmpdvdkit2/ifo_types.h313
1 files changed, 225 insertions, 88 deletions
diff --git a/libmpdvdkit2/ifo_types.h b/libmpdvdkit2/ifo_types.h
index 05e7a201b5..94b115007c 100644
--- a/libmpdvdkit2/ifo_types.h
+++ b/libmpdvdkit2/ifo_types.h
@@ -63,7 +63,7 @@ typedef struct {
uint8_t hour;
uint8_t minute;
uint8_t second;
- uint8_t frame_u; // The two high bits are the frame rate.
+ uint8_t frame_u; /* The two high bits are the frame rate. */
} ATTRIBUTE_PACKED dvd_time_t;
/**
@@ -87,7 +87,8 @@ typedef struct {
unsigned int line21_cc_1 : 1;
unsigned int line21_cc_2 : 1;
- unsigned int unknown1 : 2;
+ unsigned int unknown1 : 1;
+ unsigned int bit_rate : 1;
unsigned int picture_size : 2;
unsigned int letterboxed : 1;
@@ -102,14 +103,15 @@ typedef struct {
unsigned int letterboxed : 1;
unsigned int picture_size : 2;
- unsigned int unknown1 : 2;
+ unsigned int bit_rate : 1;
+ unsigned int unknown1 : 1;
unsigned int line21_cc_2 : 1;
unsigned int line21_cc_1 : 1;
#endif
} ATTRIBUTE_PACKED video_attr_t;
/**
- * Audio Attributes. (Incomplete/Wrong?)
+ * Audio Attributes.
*/
typedef struct {
#ifdef WORDS_BIGENDIAN
@@ -134,13 +136,99 @@ typedef struct {
unsigned int quantization : 2;
#endif
uint16_t lang_code;
- uint8_t lang_code2; // ??
uint8_t lang_extension;
- uint16_t unknown2;
+ uint8_t code_extension;
+ uint8_t unknown3;
+ union {
+ struct ATTRIBUTE_PACKED {
+#ifdef WORDS_BIGENDIAN
+ unsigned int unknown4 : 1;
+ unsigned int channel_assignment : 3;
+ unsigned int version : 2;
+ unsigned int mc_intro : 1; /* probably 0: true, 1:false */
+ unsigned int mode : 1; /* Karaoke mode 0: solo 1: duet */
+#else
+ unsigned int mode : 1;
+ unsigned int mc_intro : 1;
+ unsigned int version : 2;
+ unsigned int channel_assignment : 3;
+ unsigned int unknown4 : 1;
+#endif
+ } karaoke;
+ struct ATTRIBUTE_PACKED {
+#ifdef WORDS_BIGENDIAN
+ unsigned int unknown5 : 4;
+ unsigned int dolby_encoded : 1; /* suitable for surround decoding */
+ unsigned int unknown6 : 3;
+#else
+ unsigned int unknown6 : 3;
+ unsigned int dolby_encoded : 1;
+ unsigned int unknown5 : 4;
+#endif
+ } surround;
+ } app_info;
} ATTRIBUTE_PACKED audio_attr_t;
+
+/**
+ * MultiChannel Extension
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned int zero1 : 7;
+ unsigned int ach0_gme : 1;
+
+ unsigned int zero2 : 7;
+ unsigned int ach1_gme : 1;
+
+ unsigned int zero3 : 4;
+ unsigned int ach2_gv1e : 1;
+ unsigned int ach2_gv2e : 1;
+ unsigned int ach2_gm1e : 1;
+ unsigned int ach2_gm2e : 1;
+
+ unsigned int zero4 : 4;
+ unsigned int ach3_gv1e : 1;
+ unsigned int ach3_gv2e : 1;
+ unsigned int ach3_gmAe : 1;
+ unsigned int ach3_se2e : 1;
+
+ unsigned int zero5 : 4;
+ unsigned int ach4_gv1e : 1;
+ unsigned int ach4_gv2e : 1;
+ unsigned int ach4_gmBe : 1;
+ unsigned int ach4_seBe : 1;
+#else
+ unsigned int ach0_gme : 1;
+ unsigned int zero1 : 7;
+
+ unsigned int ach1_gme : 1;
+ unsigned int zero2 : 7;
+
+ unsigned int ach2_gm2e : 1;
+ unsigned int ach2_gm1e : 1;
+ unsigned int ach2_gv2e : 1;
+ unsigned int ach2_gv1e : 1;
+ unsigned int zero3 : 4;
+
+ unsigned int ach3_se2e : 1;
+ unsigned int ach3_gmAe : 1;
+ unsigned int ach3_gv2e : 1;
+ unsigned int ach3_gv1e : 1;
+ unsigned int zero4 : 4;
+
+ unsigned int ach4_seBe : 1;
+ unsigned int ach4_gmBe : 1;
+ unsigned int ach4_gv2e : 1;
+ unsigned int ach4_gv1e : 1;
+ unsigned int zero5 : 4;
+#endif
+ uint8_t zero6[19];
+} ATTRIBUTE_PACKED multichannel_ext_t;
+
+
/**
- * Subpicture Attributes.(Incomplete/Wrong)
+ * Subpicture Attributes.
*/
typedef struct {
/*
@@ -153,11 +241,19 @@ typedef struct {
* language: indicates language if type == 1
* lang extension: if type == 1 contains the lang extension
*/
- uint8_t type;
- uint8_t zero1;
+#ifdef WORDS_BIGENDIAN
+ unsigned int code_mode : 3;
+ unsigned int zero1 : 3;
+ unsigned int type : 2;
+#else
+ unsigned int type : 2;
+ unsigned int zero1 : 3;
+ unsigned int code_mode : 3;
+#endif
+ uint8_t zero2;
uint16_t lang_code;
- uint8_t lang_extension;
- uint8_t zero2;
+ uint8_t lang_extension;
+ uint8_t code_extension;
} ATTRIBUTE_PACKED subp_attr_t;
@@ -193,8 +289,8 @@ typedef struct {
unsigned int stc_discontinuity: 1;
unsigned int seamless_angle : 1;
- unsigned int unknown1 : 1;
- unsigned int restricted : 1;
+ unsigned int playback_mode : 1; /**< When set, enter StillMode after each VOBU */
+ unsigned int restricted : 1; /**< ?? drop out of fastforward? */
unsigned int unknown2 : 6;
#else
unsigned int seamless_angle : 1;
@@ -206,7 +302,7 @@ typedef struct {
unsigned int unknown2 : 6;
unsigned int restricted : 1;
- unsigned int unknown1 : 1;
+ unsigned int playback_mode : 1;
#endif
uint8_t still_time;
uint8_t cell_cmd_nr;
@@ -239,65 +335,65 @@ typedef struct {
*/
typedef struct {
#ifdef WORDS_BIGENDIAN
- unsigned int zero : 7; // 25-31
- unsigned int video_pres_mode_change : 1; // 24
+ unsigned int zero : 7; /* 25-31 */
+ unsigned int video_pres_mode_change : 1; /* 24 */
- unsigned int karaoke_audio_pres_mode_change : 1; // 23
- unsigned int angle_change : 1; // 22
- unsigned int subpic_stream_change : 1; // 21
- unsigned int audio_stream_change : 1; // 20
- unsigned int pause_on : 1; // 19
- unsigned int still_off : 1; // 18
- unsigned int button_select_or_activate : 1; // 17
- unsigned int resume : 1; // 16
+ unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */
+ unsigned int angle_change : 1;
+ unsigned int subpic_stream_change : 1;
+ unsigned int audio_stream_change : 1;
+ unsigned int pause_on : 1;
+ unsigned int still_off : 1;
+ unsigned int button_select_or_activate : 1;
+ unsigned int resume : 1; /* 16 */
- unsigned int chapter_menu_call : 1; // 15
- unsigned int angle_menu_call : 1; // 14
- unsigned int audio_menu_call : 1; // 13
- unsigned int subpic_menu_call : 1; // 12
- unsigned int root_menu_call : 1; // 11
- unsigned int title_menu_call : 1; // 10
- unsigned int backward_scan : 1; // 9
- unsigned int forward_scan : 1; // 8
+ unsigned int chapter_menu_call : 1; /* 15 */
+ unsigned int angle_menu_call : 1;
+ unsigned int audio_menu_call : 1;
+ unsigned int subpic_menu_call : 1;
+ unsigned int root_menu_call : 1;
+ unsigned int title_menu_call : 1;
+ unsigned int backward_scan : 1;
+ unsigned int forward_scan : 1; /* 8 */
- unsigned int next_pg_search : 1; // 7
- unsigned int prev_or_top_pg_search : 1; // 6
- unsigned int time_or_chapter_search : 1; // 5
- unsigned int go_up : 1; // 4
- unsigned int stop : 1; // 3
- unsigned int title_play : 1; // 2
- unsigned int chapter_search_or_play : 1; // 1
- unsigned int title_or_time_play : 1; // 0
+ unsigned int next_pg_search : 1; /* 7 */
+ unsigned int prev_or_top_pg_search : 1;
+ unsigned int time_or_chapter_search : 1;
+ unsigned int go_up : 1;
+ unsigned int stop : 1;
+ unsigned int title_play : 1;
+ unsigned int chapter_search_or_play : 1;
+ unsigned int title_or_time_play : 1; /* 0 */
#else
- unsigned int video_pres_mode_change : 1; // 24
- unsigned int zero : 7; // 25-31
+ unsigned int video_pres_mode_change : 1; /* 24 */
+ unsigned int zero : 7; /* 25-31 */
- unsigned int resume : 1; // 16
- unsigned int button_select_or_activate : 1; // 17
- unsigned int still_off : 1; // 18
- unsigned int pause_on : 1; // 19
- unsigned int audio_stream_change : 1; // 20
- unsigned int subpic_stream_change : 1; // 21
- unsigned int angle_change : 1; // 22
- unsigned int karaoke_audio_pres_mode_change : 1; // 23
+ unsigned int resume : 1; /* 16 */
+ unsigned int button_select_or_activate : 1;
+ unsigned int still_off : 1;
+ unsigned int pause_on : 1;
+ unsigned int audio_stream_change : 1;
+ unsigned int subpic_stream_change : 1;
+ unsigned int angle_change : 1;
+ unsigned int karaoke_audio_pres_mode_change : 1; /* 23 */
- unsigned int forward_scan : 1; // 8
- unsigned int backward_scan : 1; // 9
- unsigned int title_menu_call : 1; // 10
- unsigned int root_menu_call : 1; // 11
- unsigned int subpic_menu_call : 1; // 12
- unsigned int audio_menu_call : 1; // 13
- unsigned int angle_menu_call : 1; // 14
- unsigned int chapter_menu_call : 1; // 15
+ unsigned int forward_scan : 1; /* 8 */
+ unsigned int backward_scan : 1;
+ unsigned int title_menu_call : 1;
+ unsigned int root_menu_call : 1;
+ unsigned int subpic_menu_call : 1;
+ unsigned int audio_menu_call : 1;
+ unsigned int angle_menu_call : 1;
+ unsigned int chapter_menu_call : 1; /* 15 */
- unsigned int title_or_time_play : 1; // 0
- unsigned int chapter_search_or_play : 1; // 1
- unsigned int title_play : 1; // 2
- unsigned int stop : 1; // 3
- unsigned int go_up : 1; // 4
- unsigned int time_or_chapter_search : 1; // 5
- unsigned int prev_or_top_pg_search : 1; // 6
- unsigned int next_pg_search : 1; // 7
+ unsigned int title_or_time_play : 1; /* 0 */
+ unsigned int chapter_search_or_play : 1;
+ unsigned int title_play : 1;
+ unsigned int stop : 1;
+ unsigned int go_up : 1;
+ unsigned int time_or_chapter_search : 1;
+ unsigned int prev_or_top_pg_search : 1;
+ unsigned int next_pg_search : 1; /* 7 */
#endif
} ATTRIBUTE_PACKED user_ops_t;
@@ -365,7 +461,7 @@ typedef struct {
*/
typedef struct {
uint16_t lang_code;
- uint8_t zero_1;
+ uint8_t lang_extension;
uint8_t exists;
uint32_t lang_start_byte;
pgcit_t *pgcit;
@@ -401,7 +497,7 @@ typedef struct {
uint16_t nr_of_vobs; /* VOBs */
uint16_t zero_1;
uint32_t last_byte;
- cell_adr_t *cell_adr_table;
+ cell_adr_t *cell_adr_table; /* No explicit size given. */
} ATTRIBUTE_PACKED c_adt_t;
#define C_ADT_SIZE 8
@@ -457,11 +553,11 @@ typedef struct {
video_attr_t vmgm_video_attr;
uint8_t zero_7;
- uint8_t nr_of_vmgm_audio_streams; // should be 0 or 1
+ uint8_t nr_of_vmgm_audio_streams; /* should be 0 or 1 */
audio_attr_t vmgm_audio_attr;
audio_attr_t zero_8[7];
uint8_t zero_9[17];
- uint8_t nr_of_vmgm_subp_streams; // should be 0 or 1
+ uint8_t nr_of_vmgm_subp_streams; /* should be 0 or 1 */
subp_attr_t vmgm_subp_attr;
subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */
} ATTRIBUTE_PACKED vmgi_mat_t;
@@ -469,21 +565,21 @@ typedef struct {
typedef struct {
#ifdef WORDS_BIGENDIAN
unsigned int zero_1 : 1;
- unsigned int multi_or_random_pgc_title : 1; // 0 == one sequential pgc title
+ unsigned int multi_or_random_pgc_title : 1; /* 0: one sequential pgc title */
unsigned int jlc_exists_in_cell_cmd : 1;
unsigned int jlc_exists_in_prepost_cmd : 1;
unsigned int jlc_exists_in_button_cmd : 1;
unsigned int jlc_exists_in_tt_dom : 1;
- unsigned int chapter_search_or_play : 1; // UOP 1
- unsigned int title_or_time_play : 1; // UOP 0
+ unsigned int chapter_search_or_play : 1; /* UOP 1 */
+ unsigned int title_or_time_play : 1; /* UOP 0 */
#else
- unsigned int title_or_time_play : 1; // UOP 0
- unsigned int chapter_search_or_play : 1; // UOP 1
+ unsigned int title_or_time_play : 1;
+ unsigned int chapter_search_or_play : 1;
unsigned int jlc_exists_in_tt_dom : 1;
unsigned int jlc_exists_in_button_cmd : 1;
unsigned int jlc_exists_in_prepost_cmd : 1;
unsigned int jlc_exists_in_cell_cmd : 1;
- unsigned int multi_or_random_pgc_title : 1; // 0 == one sequential pgc title
+ unsigned int multi_or_random_pgc_title : 1;
unsigned int zero_1 : 1;
#endif
} ATTRIBUTE_PACKED playback_type_t;
@@ -512,6 +608,13 @@ typedef struct {
} ATTRIBUTE_PACKED tt_srpt_t;
#define TT_SRPT_SIZE 8
+
+/**
+ * Parental Management Information Unit Table.
+ * Level 1 (US: G), ..., 7 (US: NC-17), 8
+ */
+typedef uint16_t pf_level_t[8];
+
/**
* Parental Management Information Unit Table.
*/
@@ -520,7 +623,7 @@ typedef struct {
uint16_t zero_1;
uint16_t pf_ptl_mai_start_byte;
uint16_t zero_2;
- /* uint16_t *pf_ptl_mai // table of nr_of_vtss+1 x 8 */
+ pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is first */
} ATTRIBUTE_PACKED ptl_mait_country_t;
#define PTL_MAIT_COUNTRY_SIZE 8
@@ -544,12 +647,12 @@ typedef struct {
video_attr_t vtsm_vobs_attr;
uint8_t zero_1;
- uint8_t nr_of_vtsm_audio_streams; // should be 0 or 1
+ uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */
audio_attr_t vtsm_audio_attr;
audio_attr_t zero_2[7];
uint8_t zero_3[16];
uint8_t zero_4;
- uint8_t nr_of_vtsm_subp_streams; // should be 0 or 1
+ uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */
subp_attr_t vtsm_subp_attr;
subp_attr_t zero_5[27];
@@ -575,6 +678,7 @@ typedef struct {
uint16_t zero_1;
uint32_t last_byte;
vts_attributes_t *vts;
+ uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes */
} ATTRIBUTE_PACKED vts_atrt_t;
#define VTS_ATRT_SIZE 8
@@ -585,18 +689,18 @@ typedef struct {
uint32_t last_byte; /* offsets are relative here */
uint16_t offsets[100]; /* == nr_of_srpts + 1 (first is disc title) */
#if 0
- uint16_t unknown; // 0x48 ?? 0x48 words (16bit) info following
+ uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */
uint16_t zero_1;
- uint8_t type_of_info;//?? 01 == disc, 02 == Title, 04 == Title part
+ uint8_t type_of_info; /* ?? 01 == disc, 02 == Title, 04 == Title part */
uint8_t unknown1;
uint8_t unknown2;
uint8_t unknown3;
- uint8_t unknown4;//?? allways 0x30 language?, text format?
+ uint8_t unknown4; /* ?? allways 0x30 language?, text format? */
uint8_t unknown5;
- uint16_t offset; // from first
+ uint16_t offset; /* from first */
- char text[12]; // ended by 0x09
+ char text[12]; /* ended by 0x09 */
#endif
} ATTRIBUTE_PACKED txtdt_t;
@@ -656,7 +760,7 @@ typedef struct {
uint32_t vts_ptt_srpt; /* sector */
uint32_t vts_pgcit; /* sector */
uint32_t vtsm_pgci_ut; /* sector */
- uint32_t vts_tmapt; /* sector */ // XXX: FIXME TODO Implement
+ uint32_t vts_tmapt; /* sector */
uint32_t vtsm_c_adt; /* sector */
uint32_t vtsm_vobu_admap; /* sector */
uint32_t vts_c_adt; /* sector */
@@ -665,11 +769,11 @@ typedef struct {
video_attr_t vtsm_video_attr;
uint8_t zero_14;
- uint8_t nr_of_vtsm_audio_streams; // should be 0 or 1
+ uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */
audio_attr_t vtsm_audio_attr;
audio_attr_t zero_15[7];
uint8_t zero_16[17];
- uint8_t nr_of_vtsm_subp_streams; // should be 0 or 1
+ uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */
subp_attr_t vtsm_subp_attr;
subp_attr_t zero_17[27];
uint8_t zero_18[2];
@@ -681,6 +785,8 @@ typedef struct {
uint8_t zero_20[17];
uint8_t nr_of_vts_subp_streams;
subp_attr_t vts_subp_attr[32];
+ uint16_t zero_21;
+ multichannel_ext_t vts_mu_audio_attr[8];
/* XXX: how much 'padding' here, if any? */
} ATTRIBUTE_PACKED vtsi_mat_t;
@@ -708,10 +814,41 @@ typedef struct {
uint16_t zero_1;
uint32_t last_byte;
ttu_t *title;
+ uint32_t *ttu_offset; /* offset table for each ttu */
} ATTRIBUTE_PACKED vts_ptt_srpt_t;
#define VTS_PTT_SRPT_SIZE 8
+/**
+ * Time Map Entry.
+ */
+/* Should this be bit field at all or just the uint32_t? */
+typedef uint32_t map_ent_t;
+
+/**
+ * Time Map.
+ */
+typedef struct {
+ uint8_t tmu; /* Time unit, in seconds */
+ uint8_t zero_1;
+ uint16_t nr_of_entries;
+ map_ent_t *map_ent;
+} ATTRIBUTE_PACKED vts_tmap_t;
+#define VTS_TMAP_SIZE 4
+
+/**
+ * Time Map Table.
+ */
+typedef struct {
+ uint16_t nr_of_tmaps;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ vts_tmap_t *tmap;
+ uint32_t *tmap_offset; /* offset table for each tmap */
+} ATTRIBUTE_PACKED vts_tmapt_t;
+#define VTS_TMAPT_SIZE 8
+
+
#if PRAGMA_PACK
#pragma pack()
#endif
@@ -743,7 +880,7 @@ typedef struct {
vtsi_mat_t *vtsi_mat;
vts_ptt_srpt_t *vts_ptt_srpt;
pgcit_t *vts_pgcit;
- int *vts_tmapt; // FIXME add/correct the type
+ vts_tmapt_t *vts_tmapt;
c_adt_t *vts_c_adt;
vobu_admap_t *vts_vobu_admap;
} ifo_handle_t;