QGst::StreamVolume usage and example

Mert TAS mert.tas at gmail.com
Mon May 2 01:15:46 PDT 2011

Hi everybody,

If any of you are using the QGst library but could not figure out how to use
the QGst::StreamVolume functionality (like once I did :) this is the right
Using QGst::StreamVolume is fairly simple. You just have to create a
pipeline from the playbin2 element that will play the audio/video (as in the
Player example
then create a stream volume and cast the pipeline to stream volume as

// Don't forget to include the headers first
*#include <QGst/Pipeline>
#include <QGst/StreamVolume>*

m_pipeline  = QGst::ElementFactory::make("playbin2").dynamicCast<QGst::Pipeline
QGst::StreamVolumePtr m_streamVolume =

Then you can use the stream volume functions setVolume(), volume() and
setMuted(), isMuted() to set the volume or mute your audio/video.
You can find the last version of the Player example with added volume
control here:

Thanks to Marco Ballesio & George Kiagiadakis for all their help and advice.
Hope this would be useful to all.

Mert Tas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110502/17d3e8d9/attachment.html>

More information about the gstreamer-devel mailing list