[gst-devel] Trying to use equaliser with playbin

Yogesh Marwaha yogeshm.007 at gmail.com
Mon Apr 20 18:09:34 CEST 2009


Got it, I was not doing
gst_element_link_many(m_pEqualiser, m_pAudioSink, NULL);


Thanks anyway

2009/4/20 Yogesh Marwaha <yogeshm.007 at gmail.com>:
> Hi,
>
> I'm trying to make use of equaliser with playbin. Here is the relevant
> portion of the code: -
>
> -------------------------------------------------------------------------
>    GstElement *m_pPlayBin;
>    GstElement *m_pVisualisation;
>    GstElement *m_pVideoSink;
>    GstElement *m_pAudioSink;
>    GstElement *m_pEqualiser;
>    GstElement *m_pAudioBin;
>    GstPad *m_pAudioBinPad;
>
>    m_pPlayBin = gst_element_factory_make("playbin", "gravity-playbin");
>
>    m_pVisualisation = gst_element_factory_make("goom",
> "gravity-playbin-visualisation");
>    g_object_set(G_OBJECT(m_pPlayBin), "vis-plugin", m_pVisualisation, NULL);
>
>    m_pVideoSink = gst_element_factory_make("xvimagesink",
> "gravity-playbin-video");
>    g_object_set(G_OBJECT(m_pPlayBin), "video-sink", m_pVideoSink, NULL);
>
>    m_pAudioSink = gst_element_factory_make("alsasink",
> "gravity-playbin-audio");
>    m_pEqualiser = gst_element_factory_make("equalizer-10bands",
> "gravity-equaliser");
>
>    m_pAudioBin = gst_bin_new("audio-bin");
>    m_pAudioBinPad = gst_element_get_static_pad(m_pEqualiser, "sink");
>    gst_element_add_pad(m_pAudioBin, gst_ghost_pad_new("sink", m_pAudioBinPad));
>
>    gst_bin_add_many(GST_BIN(m_pAudioBin), m_pEqualiser, m_pAudioSink, NULL);
>
>    g_object_set(G_OBJECT(m_pPlayBin), "audio-sink", m_pAudioBin, NULL);
>
>    gst_object_unref(GST_OBJECT(m_pAudioBinPad));
>
>    gst_element_set_state(m_pPlayBin, GST_STATE_READY);
> -------------------------------------------------------------------------
> When I set the playbin to playing, state changes to GST_STATE_PLAYING
> for a while (nothing is heard from the speakers, though visualisation
> is repainted for a moment) and then changes to GST_STATE_PAUSED.
> Afterwards if I try to set the state again to playing, the program
> just stops responding to any further inputs.
>
> Can you please go through the above code snippet and point out where
> am I going wrong.
>
> Thanks,
>
>
> --
> Yogesh M
> http://snakeeyes.wordpress.com/
>



-- 
Yogesh M
http://snakeeyes.wordpress.com/
http://linuxdiscs.blogspot.com




More information about the gstreamer-devel mailing list