Hello,<br> Im tryign to incorporate the level element into a playbin2. This is the significant part of what I have tried<br><br> GstElement * outputsink;<br> outputsink = gst_element_factory_make( "gconfaudiosink", "audio-sink" );<br>
...<br> GstElement * m_Playbin = gst_element_factory_make( "playbin2", "play" );<br>...<br> GstElement * level = gst_element_factory_make( "level", "levelctrl" );<br><br> GstElement * replay = gst_element_factory_make( "rgvolume", "replaygain" );<br>
<br><br> gst_bin_add( GST_BIN( m_Playbin ), level );<br> gst_bin_add( GST_BIN( m_Playbin ), replay );<br> g_object_set( G_OBJECT( m_Playbin ), "audio-sink", outputsink, NULL );<br><br> g_object_set( level, "message", true, NULL );<br>
<br> g_object_set( G_OBJECT( m_Playbin ), "flags", 0x02|0x10, NULL );<br><br> gst_bus_add_watch( gst_pipeline_get_bus( GST_PIPELINE( m_Playbin ) ),<br> ( GstBusFunc ) gst_bus_async_callback, this );<br>
<br><br>The problem I have is that I dont get the Element messages. All the rest works fine including the replay-gain volumen but I dont get the level messages in the callback function.<br>What I want to do is detect when the sound level is below an user defined level so I can skip to next track.<br>
<br>I dunno if this is the correct place to put it but I have been tryign to search for this with no success. Please if u know what is wrong or how it should work let me know<br><br>Thanks in advance<br>J.Rios<br><br>