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

Function load_all_titles

gtk/src/callbacks.c:2833–2875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2831}
2832
2833static void
2834load_all_titles(signal_user_data_t *ud, int titleindex)
2835{
2836 gint ii, count;
2837 GhbValue *preset;
2838 GhbValue *settings_array;
2839 const hb_title_t *title;
2840
2841 hb_list_t *list = ghb_get_title_list();
2842 count = hb_list_count(list);
2843
2844 if (count == 0)
2845 count = 1;
2846
2847 settings_array = ghb_array_new();
2848
2849 // Start with a clean job
2850 ghb_dict_remove(ud->settings, "Job");
2851
2852 preset = ghb_get_current_preset(ud);
2853 if (preset != NULL)
2854 {
2855 ghb_preset_to_settings(ud->settings, preset);
2856 ghb_value_free(&preset);
2857 }
2858 for (ii = 0; ii < count; ii++)
2859 {
2860 GhbValue *settings = ghb_value_dup(ud->settings);
2861
2862 title = hb_list_item(list, ii);
2863 ghb_dict_set_int(settings, "title", title ? title->index : -1);
2864 ghb_set_title_settings(ud, settings);
2865 ghb_array_append(settings_array, settings);
2866 }
2867 if (titleindex < 0 || titleindex >= count)
2868 {
2869 titleindex = 0;
2870 }
2871 ghb_value_free(&ud->settings_array);
2872 ud->settings_array = settings_array;
2873 ud->settings = ghb_array_get(ud->settings_array, titleindex);
2874 ghb_update_summary_info(ud);
2875}
2876
2877static gboolean update_preview = FALSE;
2878

Callers 3

ghb_do_scan_listFunction · 0.85
ghb_do_scanFunction · 0.85
ghb_backend_eventsFunction · 0.85

Calls 8

ghb_get_title_listFunction · 0.85
hb_list_countFunction · 0.85
ghb_get_current_presetFunction · 0.85
ghb_preset_to_settingsFunction · 0.85
hb_list_itemFunction · 0.85
ghb_dict_set_intFunction · 0.85
ghb_set_title_settingsFunction · 0.85
ghb_update_summary_infoFunction · 0.85

Tested by

no test coverage detected