diff options
author | jstebbins <[email protected]> | 2012-04-26 19:11:03 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-04-26 19:11:03 +0000 |
commit | 143f723b12881a8ab3732386785a00840bb2c934 (patch) | |
tree | c1bfd505f424c241a34ed5f90e474efac637c4fc /libhb/common.c | |
parent | 3f9828657ded40e2eabfef8f01fa2182a4eccd36 (diff) |
PGS (bluray) subtitle support \o/
Thanks to patches supplied by David Mitchell and Rob McMullen
we finally have PGS support.
I added a fix for libav pgs timestamp processing and
detection of forced subtitles to their work, then
made foreign audio search work with PGS subs.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4605 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r-- | libhb/common.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c index 3f3097485..23c6ea21e 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -1751,6 +1751,7 @@ int hb_subtitle_add(const hb_job_t * job, const hb_subtitle_config_t * subtitlec return 0; } subtitle->config = *subtitlecfg; + subtitle->out_track = hb_list_count(job->list_subtitle) + 1; hb_list_add(job->list_subtitle, subtitle); return 1; } @@ -1768,6 +1769,7 @@ int hb_srt_add( const hb_job_t * job, subtitle->id = (hb_list_count(job->list_subtitle) << 8) | 0xFF; subtitle->format = TEXTSUB; subtitle->source = SRTSUB; + subtitle->codec = WORK_DECSRTSUB; language = lang_for_code2( lang ); @@ -1786,6 +1788,61 @@ int hb_srt_add( const hb_job_t * job, return retval; } +int hb_subtitle_can_force( int source ) +{ + return source == VOBSUB || source == PGSSUB; +} + +int hb_subtitle_can_burn( int source ) +{ + return source == VOBSUB || source == PGSSUB || source == SSASUB; +} + +int hb_subtitle_can_pass( int source, int mux ) +{ + if ( mux == HB_MUX_MKV ) + { + switch( source ) + { + case PGSSUB: + case VOBSUB: + case SSASUB: + case SRTSUB: + case UTF8SUB: + case TX3GSUB: + case CC608SUB: + case CC708SUB: + return 1; + + default: + return 0; + } + } + else if ( mux == HB_MUX_MP4 ) + { + switch( source ) + { + case VOBSUB: + case SSASUB: + case SRTSUB: + case UTF8SUB: + case TX3GSUB: + case CC608SUB: + case CC708SUB: + return 1; + + default: + return 0; + } + } + else + { + // Internal error. Should never get here. + hb_error("internel error. Bad mux %d\n", mux); + return 0; + } +} + char * hb_strdup_printf( const char * fmt, ... ) { int len; @@ -1964,6 +2021,8 @@ const char * hb_subsource_name( int source ) return "TX3G"; case SSASUB: return "SSA"; + case PGSSUB: + return "PGS"; default: return "Unknown"; } |