[libbluray-devel] mpls_dump: show playlist playback type
hpi1
git at videolan.org
Fri Nov 8 11:29:48 CET 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Oct 25 11:54:27 2013 +0300| [0ae7713eaac91812dd75c1e71c95260dbce1df67] | committer: hpi1
mpls_dump: show playlist playback type
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=0ae7713eaac91812dd75c1e71c95260dbce1df67
---
src/examples/mpls_dump.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/examples/mpls_dump.c b/src/examples/mpls_dump.c
index 69ca424..d4a2f76 100644
--- a/src/examples/mpls_dump.c
+++ b/src/examples/mpls_dump.c
@@ -119,6 +119,13 @@ const VALUE_MAP subpath_type_map[] = {
{0,NULL}
};
+const VALUE_MAP playback_type_map[] = {
+ {1, "Sequential"},
+ {2, "Random"},
+ {3, "Shuffle"},
+ {0, NULL}
+};
+
static const char*
_lookup_str(const VALUE_MAP *map, int val)
{
@@ -274,6 +281,17 @@ _show_details(MPLS_PL *pl, int level)
}
static void
+_show_ai(MPLS_PL *pl, int level)
+{
+ indent_printf(level, "Playback type: %s (%d)",
+ _lookup_str(playback_type_map, pl->app_info.playback_type),
+ pl->app_info.playback_type);
+ if (pl->app_info.playback_type == 2 || pl->app_info.playback_type == 3) {
+ indent_printf(level+1, "Playback count: %d", pl->app_info.playback_count);
+ }
+}
+
+static void
_show_marks(MPLS_PL *pl, int level)
{
int ii;
@@ -555,6 +573,7 @@ _process_file(char *name, MPLS_PL *pl_list[], int pl_count)
pl->list_count,
_pl_duration(pl) / (45000 * 60),
(_pl_duration(pl) / 45000) % 60);
+ _show_ai(pl, 1);
} else {
indent_printf(0, "%s -- Duration: minutes %4u:%02u",
basename(name),
More information about the libbluray-devel
mailing list