Hi, I'm developing a little mp3 player and I'm trying to implement a
control volume by GstMixer >From internet I've found this code: static gboolean _ctrl_set_mixer(GstMixer *mixer, gpointer user_data) { const GList *tracks; tracks = gst_mixer_list_tracks (mixer); while (tracks != NULL) { GstMixerTrack *track = GST_MIXER_TRACK (tracks->data); if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MASTER)) { CtrlVolume *self; self = CTRL_VOLUME (user_data); self->_priv->mixer = mixer; self->_priv->track = track; /* no need to ref the mixer element */ g_object_ref (self->_priv->track); return TRUE; } tracks = tracks->next; } return FALSE; } static gboolean ctrl_volume_open (CtrlVolume *vol){ CtrlVolume *self = (CtrlVolume *) vol; GList *mixer_list; if (self->_priv == NULL) return FALSE; mixer_list = gst_audio_default_registry_mixer_filter (_ctrl_set_mixer,TRUE,self); if (mixer_list == NULL){ g_print("non ho trovato mixer \n"); return FALSE; } /* do not unref the mixer as we keep the ref for self->priv->mixer */ g_list_free (mixer_list); return TRUE; } With these 2 function I can implement an hardware mixer but I want a software mixer. What can I do that? Thanks Bye ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
hi chuck,
chuck berry schrieb: > Hi, I'm developing a little mp3 player and I'm trying to implement a > control volume by GstMixer > >From internet I've found this code: > > <snip> > With these 2 function I can implement an hardware mixer but I want a > software mixer. What can I do that? > Thanks > Bye > plug a volume element before the audiosink. likewise you can use audiopanorama for balance. Stefan > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |