From 7a2f544c039f94bcfbea2475488017b6f6eaf913 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 16 Feb 2016 19:09:21 +0100 Subject: [PATCH] Add bd_get_title_mpls to retrieve the full MPLS information from a title --- libbluray.def | 1 + src/libbluray/bluray.c | 8 ++++++++ src/libbluray/bluray.h | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/libbluray.def b/libbluray.def index a248cd25..d4c93cb9 100644 --- a/libbluray.def +++ b/libbluray.def @@ -55,6 +55,7 @@ EXPORTS bd_read_mobj bd_free_mobj bd_get_clip_infos + bd_get_title_mpls ; additional functions bd_set_debug_handler diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c index 4df86a2f..13dcd6b0 100644 --- a/src/libbluray/bluray.c +++ b/src/libbluray/bluray.c @@ -3935,3 +3935,11 @@ int bd_get_clip_infos(BLURAY *bd, unsigned clip, uint64_t *clip_start_time, uint } return 0; } + +struct mpls_pl* bd_get_title_mpls(BLURAY * bd) +{ + if (bd && bd->title) { + return bd->title->pl; + } + return NULL; +} diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h index 39a5b873..c20cca66 100644 --- a/src/libbluray/bluray.h +++ b/src/libbluray/bluray.h @@ -1143,6 +1143,16 @@ struct bd_file_s *bd_open_file_dec(BLURAY *, const char *path); */ int bd_get_clip_infos(BLURAY *bd, unsigned clip, uint64_t *clip_start_time, uint64_t *stream_start_time, uint64_t *pos, uint64_t *duration); +/** + * Get the MPLS struct of the current title + * + * @param bd BLURAY object + * @return the MPLS struct + * + * Lifetime of the MPLS pointer is limited to the lifetime of the BD title + */ +struct mpls_pl* bd_get_title_mpls(BLURAY * bd); + #ifdef __cplusplus } #endif