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 /gtk/src/hb-backend.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 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 2b2b66348..af1b890e5 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1423,37 +1423,6 @@ ghb_subtitle_track_source(GValue *settings, gint track) } const char* -ghb_subtitle_source_name(gint source) -{ - const gchar * name = "Unknown"; - switch (source) - { - case VOBSUB: - name = "VOBSUB"; - break; - case TX3GSUB: - name = "TX3G"; - break; - case UTF8SUB: - name = "UTF8"; - break; - case CC708SUB: - case CC608SUB: - name = "CC"; - break; - case SRTSUB: - name = "SRT"; - break; - case SSASUB: - name = "SSA"; - break; - default: - break; - } - return name; -} - -const char* ghb_subtitle_track_source_name(GValue *settings, gint track) { gint titleindex; @@ -1491,7 +1460,7 @@ ghb_subtitle_track_source_name(GValue *settings, gint track) sub = hb_list_item( title->list_subtitle, track); if (sub != NULL) { - name = ghb_subtitle_source_name(sub->source); + name = hb_subsource_name(sub->source); } done: @@ -2304,7 +2273,7 @@ subtitle_track_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex) subtitle = (hb_subtitle_t *)hb_list_item(title->list_subtitle, ii); options[ii] = g_strdup_printf("%d - %s (%s)", ii+1, subtitle->lang, - ghb_subtitle_source_name(subtitle->source)); + hb_subsource_name(subtitle->source)); subtitle_opts.map[ii+1].option = options[ii]; subtitle_opts.map[ii+1].shortOpt = index_str[ii]; subtitle_opts.map[ii+1].ivalue = ii; @@ -2681,18 +2650,6 @@ ghb_find_cc_track(gint titleindex) return -2; } -static gboolean -canForce(int source) -{ - return (source == VOBSUB); -} - -static gboolean -canBurn(int source) -{ - return (source == VOBSUB || source == SSASUB); -} - gint ghb_find_subtitle_track( gint titleindex, @@ -2745,8 +2702,8 @@ ghb_find_subtitle_track( continue; subtitle = (hb_subtitle_t*)hb_list_item( title->list_subtitle, ii ); - if (((!force || (force && canForce(subtitle->source))) && - (!burn || (burn && canBurn(subtitle->source)))) && + if (((!force || (force && ghb_canForceSub(subtitle->source))) && + (!burn || (burn && ghb_canBurnSub(subtitle->source)))) && ((strcmp(lang, subtitle->iso639_2) == 0) || (strcmp(lang, "und") == 0))) { @@ -5106,7 +5063,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex) { sub_config.dest = PASSTHRUSUB; } - else if ( burned && canBurn(subt->source) ) + else if ( burned && ghb_canBurnSub(subt->source) ) { // Only allow one subtitle to be burned into the video if (one_burned) |