diff options
author | jstebbins <[email protected]> | 2009-06-22 20:25:15 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-06-22 20:25:15 +0000 |
commit | 55394d4229f9fbcde3841f5b3d91467cbd10d7f5 (patch) | |
tree | 84ba60491e5d5754d2d8e6032fdccab7846c6928 /gtk/src/hb-backend.c | |
parent | 5f1d29efe1d78d2019899619440250e5e760d614 (diff) |
LinGui: add audio-dub/add-subtitle radio buttons for preferred language control
- When Audio DUB is enabled, behavior is essentially unchanged
- When Add Subtitle is enabled, a subtitle of the preferred language will be
added to the subtitle list when the preferred language does not match
the first audio track.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2600 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 7dc568af7..f15fe0081 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -1817,6 +1817,32 @@ ghb_longest_title() return titleindex; } +gchar* +ghb_get_source_audio_lang(gint titleindex, gint track) +{ + hb_list_t * list; + hb_title_t * title; + hb_audio_config_t * audio; + gchar *lang = NULL; + + g_debug("ghb_lookup_1st_audio_lang ()\n"); + if (h_scan == NULL) + return NULL; + list = hb_get_titles( h_scan ); + title = (hb_title_t*)hb_list_item( list, titleindex ); + if (title == NULL) + return NULL; + if (hb_list_count( title->list_audio ) <= track) + return NULL; + + audio = hb_list_audio_config_item(title->list_audio, track); + if (audio == NULL) + return NULL; + + lang = g_strdup(audio->lang.iso639_2); + return lang; +} + gint ghb_find_audio_track( gint titleindex, |