[gst-devel] using volume element

Vinod Nanjaiah Vinod_Nanjaiah at mindtree.com
Mon Oct 15 16:42:53 CEST 2007


Hi!
I tried changing playback volume in the following way, but it didn't work.

GstElement *volume;
g_object_set (G_OBJECT(volume), "volume", 0.5, NULL);


I get the following error when I execute the program.

(helloworld:7358): GLib-GObject-CRITICAL **: g_object_set: assertion
`G_IS_OBJECT (object)' failed


Please let me know if there is something that I am doing incorrectly.
Regards,
PN


------------------------------

Message: 8
Date: Sat, 13 Oct 2007 17:02:35 +0300
From: Stefan Kost <ensonic at hora-obscura.de>
Subject: Re: [gst-devel] using volume element
To: Vinod Nanjaiah <Vinod_Nanjaiah at mindtree.com>
Cc: gstreamer-devel at lists.sourceforge.net
Message-ID: <4710CFFB.5010009 at hora-obscura.de>
Content-Type: text/plain; charset=ISO-8859-1

hi,

Vinod Nanjaiah wrote:
> Hi All!
> Can someone please point me to an example that shows how to use the volume
> element in a program to control the playback volume?
> 
> The following link only shows how to set volume from command line using
> gst-launch.
>
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plu
> gins/html/gst-plugins-base-plugins-volume.html
> 
> I searched extensively on the net but could not find any information on
this.

Its a gobject with properties. Just
g_object_set(volume_element,"volume",0.5,NULL);
will set volume to 50%

Stefan



DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Consulting Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where.




More information about the gstreamer-devel mailing list