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

Function preset_get_fullname

gtk/src/presets.c:579–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579static char*
580preset_get_fullname(hb_preset_index_t *path, const char * sep, gboolean escape)
581{
582 int ii;
583 GString *gstr;
584 hb_preset_index_t *tmp;
585 GhbValue *dict;
586
587 gstr = g_string_new("");
588 tmp = hb_preset_index_dup(path);
589 for (ii = 1; ii <= path->depth; ii++)
590 {
591 const char *name;
592 tmp->depth = ii;
593 dict = hb_preset_get(tmp);
594 if (dict == NULL)
595 {
596 break;
597 }
598 name = ghb_dict_get_string(dict, "PresetName");
599 if (name != NULL)
600 {
601 g_string_append(gstr, sep);
602 if (escape)
603 {
604 char * esc = g_markup_escape_text(name, -1);
605 g_string_append(gstr, esc);
606 g_free(esc);
607 }
608 else
609 {
610 g_string_append(gstr, name);
611 }
612 }
613 }
614 free(tmp);
615 char *str = g_string_free(gstr, FALSE);
616 return str;
617}
618
619static void
620set_preset_menu_button_label(signal_user_data_t *ud, hb_preset_index_t *path)

Callers 4

ghb_get_current_presetFunction · 0.85

Calls 3

hb_preset_index_dupFunction · 0.85
hb_preset_getFunction · 0.85
ghb_dict_get_stringFunction · 0.85

Tested by

no test coverage detected