MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_subtitle_short_description

Function ghb_subtitle_short_description

gtk/src/queuehandler.c:979–1031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977}
978
979char *ghb_subtitle_short_description (const GhbValue *subsource,
980 const GhbValue *subsettings)
981{
982 GhbValue *import;
983 char *desc = NULL;
984
985 import = ghb_dict_get(subsettings, "Import");
986 if (import != NULL)
987 {
988 const gchar * format = "SRT";
989 const gchar * code;
990 const gchar * lang;
991 int source = IMPORTSRT;
992 const iso639_lang_t *iso;
993
994 format = ghb_dict_get_string(import, "Format");
995 lang = ghb_dict_get_string(import, "Language");
996 code = ghb_dict_get_string(import, "Codeset");
997
998 if (format != NULL && !strcasecmp(format, "SSA"))
999 {
1000 source = IMPORTSSA;
1001 }
1002 iso = lang_lookup(lang);
1003 if (iso != NULL)
1004 {
1005 if (iso->native_name != NULL)
1006 lang = iso->native_name;
1007 else
1008 lang = iso->eng_name;
1009 }
1010
1011 if (source == IMPORTSRT)
1012 {
1013 desc = g_strdup_printf("%s (%s)(%s)", lang, code, format);
1014 }
1015 else
1016 {
1017 desc = g_strdup_printf("%s (%s)", lang, format);
1018 }
1019 }
1020 else if (subsource == NULL)
1021 {
1022 desc = g_strdup(_("Foreign Audio Scan"));
1023 }
1024 else
1025 {
1026 const char * lang = ghb_dict_get_string(subsource, "Language");
1027 desc = g_strdup_printf("%s", lang);
1028 }
1029
1030 return desc;
1031}
1032
1033void
1034ghb_queue_item_set_status (signal_user_data_t *ud, int index, int status)

Callers 2

ghb_update_summary_infoFunction · 0.85
queue_update_summaryFunction · 0.85

Calls 2

ghb_dict_get_stringFunction · 0.85
lang_lookupFunction · 0.85

Tested by

no test coverage detected