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

Function ghb_audio_samplerate_opts_set

gtk/src/hb-backend.c:1564–1598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1562}
1563
1564void
1565ghb_audio_samplerate_opts_set(GtkComboBox *combo)
1566{
1567 GtkTreeIter iter;
1568 GtkListStore *store;
1569 gchar *str;
1570
1571 store = GTK_LIST_STORE(gtk_combo_box_get_model (combo));
1572 gtk_list_store_clear(store);
1573 // Add an item for "Same As Source"
1574 gtk_list_store_append(store, &iter);
1575 str = g_strdup_printf("<small>%s</small>", _("Same as source"));
1576 gtk_list_store_set(store, &iter,
1577 0, str,
1578 1, TRUE,
1579 2, "auto",
1580 3, 0.0,
1581 -1);
1582 g_free(str);
1583
1584 const hb_rate_t *rate;
1585 for (rate = hb_audio_samplerate_get_next(NULL); rate != NULL;
1586 rate = hb_audio_samplerate_get_next(rate))
1587 {
1588 gtk_list_store_append(store, &iter);
1589 str = g_strdup_printf("<small>%s</small>", rate->name);
1590 gtk_list_store_set(store, &iter,
1591 0, str,
1592 1, TRUE,
1593 2, rate->name,
1594 3, (gdouble)rate->rate,
1595 -1);
1596 g_free(str);
1597 }
1598}
1599
1600static void
1601audio_samplerate_opts_set(signal_user_data_t *ud, const gchar *name,

Callers 2

Calls 1

Tested by

no test coverage detected