diff options
author | jstebbins <[email protected]> | 2010-09-28 22:10:49 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-09-28 22:10:49 +0000 |
commit | 03b2ce0e91c4e4ed44445a075ef5f35bc052b5b8 (patch) | |
tree | 24a1def4ca91cba98676508c6a3b1482ba131cb5 /test | |
parent | f1997be4ed1dd373316ac842685f18a6f8ab05ba (diff) |
SSA subtitle burn in
Anime fans rejoice! This patch adds SSA subtitle burn-in support with libass.
Therefore SSA subtitles should now be rendered in full quality, with the
appropriate embedded fonts and positioning information.
Thanks to davidfstr
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3557 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r-- | test/module.defs | 4 | ||||
-rw-r--r-- | test/test.c | 24 |
2 files changed, 18 insertions, 10 deletions
diff --git a/test/module.defs b/test/module.defs index 7dd323556..33d34d43e 100644 --- a/test/module.defs +++ b/test/module.defs @@ -10,8 +10,8 @@ TEST.c.o = $(patsubst $(SRC/)%.c,$(BUILD/)%.o,$(TEST.c)) TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI) TEST.libs = $(LIBHB.a) $(foreach n, \ - a52 avcore avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \ - ogg samplerate swscale theora vorbis vorbisenc x264 bluray, \ + a52 ass avcore avcodec avformat avutil dca dvdnav dvdread faac faad fontconfig freetype mkv mpeg2 mp3lame mp4v2 \ + ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \ $(CONTRIB.build/)lib/lib$(n).a ) TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe)) diff --git a/test/test.c b/test/test.c index cff30ef4b..f5fb9ec57 100644 --- a/test/test.c +++ b/test/test.c @@ -440,10 +440,11 @@ static void PrintTitleInfo( hb_title_t * title ) for( i = 0; i < hb_list_count( title->list_subtitle ); i++ ) { subtitle = hb_list_item( title->list_subtitle, i ); - fprintf( stderr, " + %d, %s (iso639-2: %s) (%s)\n", + fprintf( stderr, " + %d, %s (iso639-2: %s) (%s)(%s)\n", i + 1, subtitle->lang, subtitle->iso639_2, - (subtitle->format == TEXTSUB) ? "Text" : "Bitmap"); + (subtitle->format == TEXTSUB) ? "Text" : "Bitmap", + hb_subsource_name(subtitle->source)); } if(title->detected_interlacing) @@ -1857,12 +1858,12 @@ static int HandleEvents( hb_handle_t * h ) } force = test_sub_list(subforce, token, pos); - - if ( !burn && subtitle->format == PICTURESUB) - { - sub_config.dest = PASSTHRUSUB; - } - else if ( burn && subtitle->format == PICTURESUB ) + + int supports_burn = + ( subtitle->source == VOBSUB ) || + ( subtitle->source == SSASUB ); + + if ( burn && supports_burn ) { // Only allow one subtitle to be burned into video if ( sub_burned ) @@ -1871,6 +1872,13 @@ static int HandleEvents( hb_handle_t * h ) continue; } sub_burned = 1; + + // Mark as burn-in + sub_config.dest = RENDERSUB; + } + else + { + sub_config.dest = PASSTHRUSUB; } sub_config.force = force; sub_config.default_track = def; |