[libbluray-devel] bdnav: add STC sequence start SPN to NAV_CLIP
hpi1
git at videolan.org
Sun May 15 15:51:45 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Dec 9 12:17:16 2015 +0200| [47c8ffac9edb5dc21af2ff6583b6e92ccffc2ada] | committer: hpi1
bdnav: add STC sequence start SPN to NAV_CLIP
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=47c8ffac9edb5dc21af2ff6583b6e92ccffc2ada
---
src/libbluray/bdnav/clpi_parse.c | 6 +++---
src/libbluray/bdnav/clpi_parse.h | 1 +
src/libbluray/bdnav/navigation.c | 2 ++
src/libbluray/bdnav/navigation.h | 2 ++
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/libbluray/bdnav/clpi_parse.c b/src/libbluray/bdnav/clpi_parse.c
index ec57a38..394347e 100644
--- a/src/libbluray/bdnav/clpi_parse.c
+++ b/src/libbluray/bdnav/clpi_parse.c
@@ -359,8 +359,8 @@ _parse_cpi_info(BITSTREAM *bits, CLPI_CL *cl)
return _parse_cpi(bits, &cl->cpi);
}
-static uint32_t
-_find_stc_spn(const CLPI_CL *cl, uint8_t stc_id)
+uint32_t
+clpi_find_stc_spn(const CLPI_CL *cl, uint8_t stc_id)
{
int ii;
CLPI_ATC_SEQ *atc;
@@ -401,7 +401,7 @@ clpi_lookup_spn(const CLPI_CL *cl, uint32_t timestamp, int before, uint8_t stc_i
// Use sequence info to find spn_stc_start before doing
// PTS search. The spn_stc_start defines the point in
// the EP map to start searching.
- stc_spn = _find_stc_spn(cl, stc_id);
+ stc_spn = clpi_find_stc_spn(cl, stc_id);
for (ii = 0; ii < entry->num_ep_coarse; ii++) {
ref = entry->coarse[ii].ref_ep_fine_id;
if (entry->coarse[ii].spn_ep >= stc_spn) {
diff --git a/src/libbluray/bdnav/clpi_parse.h b/src/libbluray/bdnav/clpi_parse.h
index 38490e5..2263f66 100644
--- a/src/libbluray/bdnav/clpi_parse.h
+++ b/src/libbluray/bdnav/clpi_parse.h
@@ -27,6 +27,7 @@
struct bd_disc;
+BD_PRIVATE uint32_t clpi_find_stc_spn(const CLPI_CL *cl, uint8_t stc_id);
BD_PRIVATE uint32_t clpi_lookup_spn(const CLPI_CL *cl, uint32_t timestamp, int before, uint8_t stc_id);
BD_PRIVATE uint32_t clpi_access_point(const CLPI_CL *cl, uint32_t pkt, int next, int angle_change, uint32_t *time);
BD_PRIVATE CLPI_CL* clpi_parse(const char *path) BD_ATTR_MALLOC;
diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index ed9b96e..7c91f0b 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -604,6 +604,8 @@ static void _fill_clip(NAV_TITLE *title,
*pos += clip->end_pkt - clip->start_pkt;
clip->title_time = *time;
*time += clip->out_time - clip->in_time;
+
+ clip->stc_spn = clpi_find_stc_spn(clip->cl, mpls_clip[clip->angle].stc_id);
}
NAV_TITLE* nav_title_open(BD_DISC *disc, const char *playlist, unsigned angle)
diff --git a/src/libbluray/bdnav/navigation.h b/src/libbluray/bdnav/navigation.h
index 113d813..7d2d325 100644
--- a/src/libbluray/bdnav/navigation.h
+++ b/src/libbluray/bdnav/navigation.h
@@ -85,6 +85,8 @@ struct nav_clip_s
NAV_TITLE *title;
CLPI_CL *cl;
+
+ uint32_t stc_spn; /* start packet of clip STC sequence */
};
typedef struct nav_clip_list_s NAV_CLIP_LIST;
More information about the libbluray-devel
mailing list