diff options
author | John Stebbins <[email protected]> | 2016-05-18 17:01:18 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-05-25 10:21:18 -0600 |
commit | cfd756af552be892d40831a56d6fed1817e4a93c (patch) | |
tree | 1e0924add86a89e1e76a945b0cb25e65511a9af6 | |
parent | 9dabe455a7b9f4917c1f36c3229c8fb9914a3fc4 (diff) |
bd: log playlist clips at log level 2
-rw-r--r-- | contrib/libbluray/A02-expose-clip_id.patch | 37 | ||||
-rw-r--r-- | libhb/bd.c | 22 |
2 files changed, 59 insertions, 0 deletions
diff --git a/contrib/libbluray/A02-expose-clip_id.patch b/contrib/libbluray/A02-expose-clip_id.patch new file mode 100644 index 000000000..9fe3dfedb --- /dev/null +++ b/contrib/libbluray/A02-expose-clip_id.patch @@ -0,0 +1,37 @@ +From 1a113167733091fe325152a5ece4d57ee1b89dc0 Mon Sep 17 00:00:00 2001 +From: John Stebbins <[email protected]> +Date: Wed, 18 May 2016 15:40:17 -0600 +Subject: [PATCH] expose clip_id in BLURAY_CLIP_INFO + +--- + src/libbluray/bluray.c | 1 + + src/libbluray/bluray.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c +index b7598b9..3478ade 100644 +--- a/src/libbluray/bluray.c ++++ b/src/libbluray/bluray.c +@@ -2602,6 +2602,7 @@ static BLURAY_TITLE_INFO* _fill_title_info(NAV_TITLE* title, uint32_t title_idx, + BLURAY_CLIP_INFO *ci = &title_info->clips[ii]; + NAV_CLIP *nc = &title->clip_list.clip[ii]; + ++ memcpy(ci->clip_id, pi->clip->clip_id, sizeof(ci->clip_id)); + ci->pkt_count = nc->end_pkt - nc->start_pkt; + ci->start_time = (uint64_t)nc->title_time * 2; + ci->in_time = (uint64_t)pi->in_time * 2; +diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h +index 3cd7118..177b3d4 100644 +--- a/src/libbluray/bluray.h ++++ b/src/libbluray/bluray.h +@@ -225,6 +225,7 @@ typedef struct bd_stream_info { + } BLURAY_STREAM_INFO; + + typedef struct bd_clip { ++ char clip_id[6]; + uint32_t pkt_count; + uint8_t still_mode; + uint16_t still_time; /* seconds */ +-- +2.5.5 + diff --git a/libhb/bd.c b/libhb/bd.c index 16f79dc4c..e5fb6e83d 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -234,6 +234,24 @@ static int bd_audio_equal( BLURAY_CLIP_INFO *a, BLURAY_CLIP_INFO *b ) return 1; } +static void show_clip_list( BLURAY_TITLE_INFO * ti ) +{ + int ii; + + for (ii = 0; ii < ti->clip_count; ii++) + { + BLURAY_CLIP_INFO * ci = &ti->clips[ii]; + int64_t duration = ci->out_time - ci->in_time; + int hh, mm, ss; + + hh = duration / (90000 * 60 * 60); + mm = (duration / (90000 * 60)) % 60; + ss = (duration / 90000) % 60; + hb_log("bd:\t\t%s.M2TS -- Duration: %02d:%02d:%02d", + ti->clips[ii].clip_id, hh, mm, ss); + } +} + /*********************************************************************** * hb_bd_title_scan **********************************************************************/ @@ -314,6 +332,10 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) hb_log( "bd: ignoring title (too short)" ); goto fail; } + if (global_verbosity_level >= 2) + { + show_clip_list(ti); + } BLURAY_STREAM_INFO * bdvideo = &ti->clips[0].video_streams[0]; |