[libbluray-devel] commit: Moved UO mask table to uo_mask_table.h (hpi1 )

git at videolan.org git at videolan.org
Sat Aug 14 00:12:30 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Aug 14 00:01:22 2010 +0300| [83e1df3d8e2cf5cae5727a76f0ebe65ef7deff8d] | committer: hpi1 

Moved UO mask table to uo_mask_table.h

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=83e1df3d8e2cf5cae5727a76f0ebe65ef7deff8d
---

 src/Makefile.am                     |    1 +
 src/libbluray/bdnav/mpls_parse.c    |    2 +-
 src/libbluray/bdnav/mpls_parse.h    |   42 ++---------------------
 src/libbluray/bdnav/uo_mask_table.h |   61 +++++++++++++++++++++++++++++++++++
 4 files changed, 67 insertions(+), 39 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index a3021a5..c1f5462 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,6 +36,7 @@ libbluray_la_SOURCES=libbluray/bluray.h \
 	libbluray/register.c \
 	libbluray/bdnav \
 	libbluray/bdnav/bdparse.h \
+	libbluray/bdnav/uo_mask_table.h \
 	libbluray/bdnav/navigation.h \
 	libbluray/bdnav/index_parse.c \
 	libbluray/bdnav/navigation.c \
diff --git a/src/libbluray/bdnav/mpls_parse.c b/src/libbluray/bdnav/mpls_parse.c
index 250caf9..9c04569 100644
--- a/src/libbluray/bdnav/mpls_parse.c
+++ b/src/libbluray/bdnav/mpls_parse.c
@@ -46,7 +46,7 @@ _human_readable_sig(char *sig, uint32_t s1, uint32_t s2)
 }
 
 static int
-_parse_uo(BITSTREAM *bits, MPLS_UO *uo)
+_parse_uo(BITSTREAM *bits, BD_UO_MASK *uo)
 {
     uo->menu_call                       = bs_read(bits, 1);
     uo->title_search                    = bs_read(bits, 1);
diff --git a/src/libbluray/bdnav/mpls_parse.h b/src/libbluray/bdnav/mpls_parse.h
index 2866a24..fd1d231 100644
--- a/src/libbluray/bdnav/mpls_parse.h
+++ b/src/libbluray/bdnav/mpls_parse.h
@@ -20,6 +20,8 @@
 #if !defined(_MPLS_PARSE_H_)
 #define _MPLS_PARSE_H_
 
+#include "uo_mask_table.h"
+
 #include <util/attributes.h>
 
 #include <stdint.h>
@@ -29,42 +31,6 @@
 
 typedef struct
 {
-    uint8_t         menu_call : 1;
-    uint8_t         title_search : 1;
-    uint8_t         chapter_search : 1;
-    uint8_t         time_search : 1;
-    uint8_t         skip_to_next_point : 1;
-    uint8_t         skip_to_prev_point : 1;
-    uint8_t         play_firstplay : 1;
-    uint8_t         stop : 1;
-    uint8_t         pause_on : 1;
-    uint8_t         pause_off : 1;
-    uint8_t         still : 1;
-    uint8_t         forward : 1;
-    uint8_t         backward : 1;
-    uint8_t         resume : 1;
-    uint8_t         move_up : 1;
-    uint8_t         move_down : 1;
-    uint8_t         move_left : 1;
-    uint8_t         move_right : 1;
-    uint8_t         select : 1;
-    uint8_t         activate : 1;
-    uint8_t         select_and_activate : 1;
-    uint8_t         primary_audio_change : 1;
-    uint8_t         angle_change : 1;
-    uint8_t         popup_on : 1;
-    uint8_t         popup_off : 1;
-    uint8_t         pg_enable_disable : 1;
-    uint8_t         pg_change : 1;
-    uint8_t         secondary_video_enable_disable : 1;
-    uint8_t         secondary_video_change : 1;
-    uint8_t         secondary_audio_enable_disable : 1;
-    uint8_t         secondary_audio_change : 1;
-    uint8_t         pip_pg_change : 1;
-} MPLS_UO;
-
-typedef struct
-{
     uint8_t         stream_type;
     uint8_t         coding_type;
     uint16_t        pid;
@@ -114,7 +80,7 @@ typedef struct
     uint8_t         connection_condition;
     uint32_t        in_time;
     uint32_t        out_time;
-    MPLS_UO         uo_mask;
+    BD_UO_MASK      uo_mask;
     uint8_t         random_access_flag;
     uint8_t         still_mode;
     uint16_t        still_time;
@@ -139,7 +105,7 @@ typedef struct
 {
     uint8_t         playback_type;
     uint16_t        playback_count;
-    MPLS_UO         uo_mask;
+    BD_UO_MASK      uo_mask;
     uint8_t         random_access_flag;
     uint8_t         audio_mix_flag;
     uint8_t         lossless_bypass_flag;
diff --git a/src/libbluray/bdnav/uo_mask_table.h b/src/libbluray/bdnav/uo_mask_table.h
new file mode 100644
index 0000000..c7adc7e
--- /dev/null
+++ b/src/libbluray/bdnav/uo_mask_table.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of libbluray
+ * Copyright (C) 2009-2010  John Stebbins
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined(_BD_UO_MASK_TABLE_H_)
+#define _BD_UO_MASK_TABLE_H_
+
+#include <stdint.h>
+
+typedef struct bd_uo_mask_table_s
+{
+    uint8_t         menu_call : 1;
+    uint8_t         title_search : 1;
+    uint8_t         chapter_search : 1;
+    uint8_t         time_search : 1;
+    uint8_t         skip_to_next_point : 1;
+    uint8_t         skip_to_prev_point : 1;
+    uint8_t         play_firstplay : 1;
+    uint8_t         stop : 1;
+    uint8_t         pause_on : 1;
+    uint8_t         pause_off : 1;
+    uint8_t         still : 1;
+    uint8_t         forward : 1;
+    uint8_t         backward : 1;
+    uint8_t         resume : 1;
+    uint8_t         move_up : 1;
+    uint8_t         move_down : 1;
+    uint8_t         move_left : 1;
+    uint8_t         move_right : 1;
+    uint8_t         select : 1;
+    uint8_t         activate : 1;
+    uint8_t         select_and_activate : 1;
+    uint8_t         primary_audio_change : 1;
+    uint8_t         angle_change : 1;
+    uint8_t         popup_on : 1;
+    uint8_t         popup_off : 1;
+    uint8_t         pg_enable_disable : 1;
+    uint8_t         pg_change : 1;
+    uint8_t         secondary_video_enable_disable : 1;
+    uint8_t         secondary_video_change : 1;
+    uint8_t         secondary_audio_enable_disable : 1;
+    uint8_t         secondary_audio_change : 1;
+    uint8_t         pip_pg_change : 1;
+} BD_UO_MASK;
+
+#endif // _BD_UO_MASK_TABLE_H_



More information about the libbluray-devel mailing list