[gst-devel] level element in playbin2

J. Rios jrioslists at gmail.com
Mon Dec 28 13:34:11 CET 2009


Hello,
   Im tryign to incorporate the level element into a playbin2. This is the
significant part of what I have tried

    GstElement * outputsink;
    outputsink = gst_element_factory_make( "gconfaudiosink", "audio-sink" );
...
    GstElement * m_Playbin = gst_element_factory_make( "playbin2", "play" );
...
    GstElement * level = gst_element_factory_make( "level", "levelctrl" );

    GstElement * replay = gst_element_factory_make( "rgvolume", "replaygain"
);


    gst_bin_add( GST_BIN( m_Playbin ), level );
    gst_bin_add( GST_BIN( m_Playbin ), replay );
    g_object_set( G_OBJECT( m_Playbin ), "audio-sink", outputsink, NULL );

    g_object_set( level, "message", true, NULL );

    g_object_set( G_OBJECT( m_Playbin ), "flags", 0x02|0x10, NULL );

    gst_bus_add_watch( gst_pipeline_get_bus( GST_PIPELINE( m_Playbin ) ),
            ( GstBusFunc ) gst_bus_async_callback, this );


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.
What I want to do is detect when the sound level is below an user defined
level so I can skip to next track.

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

Thanks in advance
J.Rios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091228/976875a4/attachment.htm>


More information about the gstreamer-devel mailing list