diff options
author | John Stebbins <[email protected]> | 2016-10-13 11:50:05 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-21 14:04:52 -0700 |
commit | e2b3a1e8de375248ce72f16083389e8ce3b6e48e (patch) | |
tree | 443795df17d17a06ac46e17a01d90d94b11c01c1 /libhb/dvdnav.c | |
parent | 5928b15e84d640edd94c91e303369880d1c0baad (diff) |
dvd: add widescreen/letterbox/pan&scan/4:3 to vobsub description
Diffstat (limited to 'libhb/dvdnav.c')
-rw-r--r-- | libhb/dvdnav.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 671806c54..ed7dd26c7 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -319,7 +319,7 @@ PttDuration(ifo_handle_t *ifo, int ttn, int pttn, int *blocks, int *last_pgcn) static void add_subtitle( hb_list_t * list_subtitle, int position, iso639_lang_t * lang, int lang_extension, - uint32_t * palette ) + uint32_t * palette, int style ) { hb_subtitle_t * subtitle; int ii, count; @@ -386,6 +386,22 @@ static void add_subtitle( hb_list_t * list_subtitle, int position, break; } + switch (style) + { + case HB_VOBSUB_STYLE_4_3: + strcat( subtitle->lang, " (4:3)" ); + break; + case HB_VOBSUB_STYLE_WIDE: + strcat( subtitle->lang, " (Wide Screen)" ); + break; + case HB_VOBSUB_STYLE_LETTERBOX: + strcat( subtitle->lang, " (Letterbox)" ); + break; + case HB_VOBSUB_STYLE_PANSCAN: + strcat( subtitle->lang, " (Pan & Scan)" ); + break; + } + hb_log( "scan: id=0x%x, lang=%s, 3cc=%s ext=%i", subtitle->id, subtitle->lang, subtitle->iso639_2, lang_extension ); @@ -738,7 +754,8 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura // Add Wide Screen subtitle. pos = (spu_control >> 16) & 0x1F; add_subtitle(title->list_subtitle, pos, lang, lang_ext, - ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette); + ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette, + HB_VOBSUB_STYLE_WIDE); // permitted_df // 1 - Letterbox not permitted @@ -749,21 +766,24 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura // Letterbox permitted. Add Letterbox subtitle. pos = (spu_control >> 8) & 0x1F; add_subtitle(title->list_subtitle, pos, lang, lang_ext, - ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette); + ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette, + HB_VOBSUB_STYLE_LETTERBOX); } if (!(ifo->vtsi_mat->vts_video_attr.permitted_df & 2)) { // Pan&Scan permitted. Add Pan&Scan subtitle. pos = spu_control & 0x1F; add_subtitle(title->list_subtitle, pos, lang, lang_ext, - ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette); + ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette, + HB_VOBSUB_STYLE_PANSCAN); } } else { pos = (spu_control >> 24) & 0x1F; add_subtitle(title->list_subtitle, pos, lang, lang_ext, - ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette); + ifo->vts_pgcit->pgci_srp[title_pgcn-1].pgc->palette, + HB_VOBSUB_STYLE_4_3); } } |