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

Function audio_get_selected_settings

gtk/src/audiohandler.c:677–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677static GhbValue*
678audio_get_selected_settings(signal_user_data_t *ud, int *index)
679{
680 GtkTreeView *tv;
681 GtkTreePath *tp;
682 GtkTreeSelection *ts;
683 GtkTreeModel *tm;
684 GtkTreeIter ti;
685 gint *indices;
686 gint row;
687 GhbValue *asettings = NULL;
688 const GhbValue *audio_list;
689
690 tv = GTK_TREE_VIEW(ghb_builder_widget("audio_list_view"));
691 ts = gtk_tree_view_get_selection (tv);
692 if (gtk_tree_selection_get_selected(ts, &tm, &ti))
693 {
694 // Get the row number
695 tp = gtk_tree_model_get_path (tm, &ti);
696 indices = gtk_tree_path_get_indices (tp);
697 row = indices[0];
698 gtk_tree_path_free(tp);
699 // find audio settings
700 if (row < 0) return NULL;
701
702 audio_list = ghb_get_job_audio_list(ud->settings);
703 if (row >= ghb_array_len(audio_list))
704 return NULL;
705
706 asettings = ghb_array_get(audio_list, row);
707 if (index != NULL)
708 *index = row;
709 }
710 return asettings;
711}
712
713static void
714audio_refresh_list_row_ui(

Callers 9

sanitize_audio_tracksFunction · 0.85
audio_update_settingFunction · 0.85
audio_codec_changed_cbFunction · 0.85
audio_bitrate_changed_cbFunction · 0.85
audio_add_responseFunction · 0.85
audio_edit_responseFunction · 0.85
audio_reset_cbFunction · 0.85

Calls 2

ghb_builder_widgetFunction · 0.85
ghb_get_job_audio_listFunction · 0.85

Tested by

no test coverage detected