summaryrefslogtreecommitdiffstats
path: root/libmpdvdkit2/ifo_types.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-03 14:29:01 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-03 14:29:01 +0000
commit21f2437d9beea8b2a5e6234d278c92c7be397d9c (patch)
treec755b2ee8f97e3fa7aca1d36704f892574e55a3d /libmpdvdkit2/ifo_types.h
parent6b95575c06e6b593b18ebaf4bd7ca3610c368c18 (diff)
downloadmpv-21f2437d9beea8b2a5e6234d278c92c7be397d9c.tar.bz2
mpv-21f2437d9beea8b2a5e6234d278c92c7be397d9c.tar.xz
Fix DVD audio and subtitle stream mapping, esp. for DVD with both 4:3 and
16:9 subtitles. Patch by Lehel Bernadt (lehel at pmc-services hu) with minor modifications. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16650 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdvdkit2/ifo_types.h')
-rw-r--r--libmpdvdkit2/ifo_types.h53
1 files changed, 51 insertions, 2 deletions
diff --git a/libmpdvdkit2/ifo_types.h b/libmpdvdkit2/ifo_types.h
index 94b115007c..d128144d51 100644
--- a/libmpdvdkit2/ifo_types.h
+++ b/libmpdvdkit2/ifo_types.h
@@ -398,6 +398,55 @@ typedef struct {
} ATTRIBUTE_PACKED user_ops_t;
/**
+ * Subpicture stream mapping for a subtitle
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned int present : 1;
+ unsigned int zero1 : 2;
+ unsigned int s_4p3 : 5; /* stream for 4:3 on any display */
+
+ unsigned int zero2 : 3;
+ unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */
+
+ unsigned int zero3 : 3;
+ unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */
+
+ unsigned int zero4 : 3;
+ unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
+#else
+ unsigned int s_4p3 : 5; /* stream for 4:3 on any display */
+ unsigned int zero1 : 2;
+ unsigned int present : 1;
+
+ unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */
+ unsigned int zero2 : 3;
+
+ unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */
+ unsigned int zero3 : 3;
+
+ unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
+ unsigned int zero4 : 3;
+#endif
+} ATTRIBUTE_PACKED subp_mapping_t;
+
+/**
+ * Audio stream mapping for a soundtrack
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned int present : 1;
+ unsigned int zero1 : 4;
+ unsigned int s_audio : 3;
+#else
+ unsigned int s_audio : 3;
+ unsigned int zero1 : 4;
+ unsigned int present : 1;
+#endif
+ uint8_t zero2;
+} ATTRIBUTE_PACKED audio_mapping_t;
+
+/**
* Program Chain Information.
*/
typedef struct {
@@ -406,8 +455,8 @@ typedef struct {
uint8_t nr_of_cells;
dvd_time_t playback_time;
user_ops_t prohibited_ops;
- uint16_t audio_control[8]; /* New type? */
- uint32_t subp_control[32]; /* New type? */
+ audio_mapping_t audio_control[8];
+ subp_mapping_t subp_control[32];
uint16_t next_pgc_nr;
uint16_t prev_pgc_nr;
uint16_t goup_pgc_nr;