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

Function audio_add_cb

gtk/src/audiohandler.c:1397–1424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1395}
1396
1397G_MODULE_EXPORT void
1398audio_add_cb (GSimpleAction *action, GVariant *param, gpointer data)
1399{
1400 // Add the current audio settings to the list.
1401 GhbValue *asettings, *backup;
1402 int title_id, titleindex;
1403 const hb_title_t *title;
1404 signal_user_data_t *ud = ghb_ud();
1405
1406 title_id = ghb_dict_get_int(ud->settings, "title");
1407 title = ghb_lookup_title(title_id, &titleindex);
1408
1409 // Back up settings in case we need to revert.
1410 backup = ghb_value_dup(ghb_get_job_audio_list(ud->settings));
1411 GhbValue *pref_audio = ghb_dict_get_value(ud->settings, "AudioList");
1412 asettings = audio_select_and_add_track(title, ud->settings, pref_audio,
1413 "und", 0, 0);
1414 audio_add_to_ui(ud, asettings);
1415
1416 if (asettings != NULL)
1417 {
1418 // Pop up the edit dialog
1419 GtkWidget *dialog = ghb_builder_widget("audio_dialog");
1420 gtk_window_set_title(GTK_WINDOW(dialog), _("Add Audio Track"));
1421 g_signal_connect(dialog, "response", G_CALLBACK(audio_add_response), backup);
1422 gtk_widget_set_visible(dialog, TRUE);
1423 }
1424}
1425
1426static void
1427audio_add_response (GtkWidget *dialog, int response, GhbValue *backup)

Callers

nothing calls this directly

Calls 8

ghb_udFunction · 0.85
ghb_dict_get_intFunction · 0.85
ghb_lookup_titleFunction · 0.85
ghb_get_job_audio_listFunction · 0.85
ghb_dict_get_valueFunction · 0.85
audio_add_to_uiFunction · 0.85
ghb_builder_widgetFunction · 0.85

Tested by

no test coverage detected