[Bug 42022] Re: duplicated input device entries in sound recorder
Miguel Gaspar
estudioz at leirianet.pt
Sat Apr 29 11:36:14 UTC 2006
I looked at the source for grecord, in gsr-window.c the callback for the record action calls fill_record_input():
static void
record_cb (GtkAction *action,
GSRWindow *window)
{
GSRWindowPrivate *priv = window->priv;
if (priv->record) {
shutdown_pipeline (priv->record);
if (!make_record_source (window)) exit (1);
fill_record_input (window);
}
if ((priv->record = make_record_pipeline (window))) {
window->priv->len_secs = 0;
window->priv->saved = FALSE;
g_object_set (G_OBJECT (priv->record->sink),
"location", priv->record_filename,
NULL);
gst_element_set_state (priv->record->pipeline, GST_STATE_PLAYING);
}
}
But fill_record_input() appends to the combo-box:
static void
fill_record_input (GSRWindow *window)
{
GstElement *e;
const GList *l;
int i = 0;
g_return_if_fail (GST_IS_MIXER (window->priv->mixer));
for (l = gst_mixer_list_tracks (window->priv->mixer); l != NULL; l = l->next) {
GstMixerTrack *t = l->data;
if (t->flags & GST_MIXER_TRACK_INPUT) {
gtk_combo_box_append_text (GTK_COMBO_BOX (window->priv->input), t->label);
++i;
}
if (t->flags & GST_MIXER_TRACK_RECORD) {
gtk_combo_box_set_active (GTK_COMBO_BOX (window->priv->input), i - 1);
}
}
}
I don't know why fill_record_input() is called in record_cb(), but either by removing that call or by changing fill_record_input(), this should be easy to correct.
--
duplicated input device entries in sound recorder
https://launchpad.net/bugs/42022
More information about the desktop-bugs
mailing list