[libbluray-devel] mpls_dump: added human-readable names for connection condition types

hpi1 git at videolan.org
Mon Aug 18 12:09:37 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug 18 13:07:17 2014 +0300| [bf8d4e906bb116e0b4a5e4d9d73dd4dacda2cbb3] | committer: hpi1

mpls_dump: added human-readable names for connection condition types

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

 src/examples/mpls_dump.c |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/examples/mpls_dump.c b/src/examples/mpls_dump.c
index 5064830..5287dbd 100644
--- a/src/examples/mpls_dump.c
+++ b/src/examples/mpls_dump.c
@@ -127,6 +127,12 @@ const VALUE_MAP playback_type_map[] = {
   {0, NULL}
 };
 
+const VALUE_MAP connection_type_map[] = {
+  {0, "Non-seamless"},
+  {1, "Seamless"},
+  {0, NULL}
+};
+
 static const char*
 _lookup_str(const VALUE_MAP *map, int val)
 {
@@ -223,8 +229,9 @@ _show_details(MPLS_PL *pl, int level)
         pi = &pl->play_item[ii];
         indent_printf(level, "Clip Id %s", pi->clip[0].clip_id);
         indent_printf(level+1, "Stc Id: %02x", pi->clip[0].stc_id);
-        indent_printf(level+1, "Connection Condition: %02x", 
-                        pi->connection_condition);
+        indent_printf(level+1, "Connection Condition: %s (%02x)",
+                      _lookup_str(connection_type_map, pi->connection_condition),
+                      pi->connection_condition);
         indent_printf(level+1, "In-Time: %d", pi->in_time);
         indent_printf(level+1, "Out-Time: %d", pi->out_time);
         if (pi->still_mode == 1) {
@@ -369,7 +376,9 @@ _show_sub_path(MPLS_SUB *sub, int level)
             indent_printf(level+2, "Clip Id %s", pi->clip[0].clip_id);
             indent_printf(level+2, "Multi clip: %d", pi->is_multi_clip);
             indent_printf(level+2, "Clip count: %d", pi->clip_count);
-            indent_printf(level+2, "Connection Condition: %02x", pi->connection_condition);
+            indent_printf(level+2, "Connection Condition: %s (%02x)",
+                          _lookup_str(connection_type_map, pi->connection_condition),
+                          pi->connection_condition);
             indent_printf(level+2, "In-Time: %d", pi->in_time);
             indent_printf(level+2, "Out-Time: %d", pi->out_time);
             indent_printf(level+2, "Sync playitem Id: %d", pi->sync_play_item_id);



More information about the libbluray-devel mailing list