[gst-devel] gst-python, playbin, volume question

Jason Gerard DeRose jderose at jasonderose.org
Tue Mar 15 23:07:46 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am writing an application using the Python bindings for GStreamer.  I
am using the playbin element, which gst-inspect indicates as having a
'volume' property.  When I try to get_property() or to set_property(), I
get an error:

~    self.bin.set_property('volume', volume)
TypeError: the object does not support the given parameter

I am not much of a C programmer, but from what I can tell looking at
some GStreamer C apps, this should work.  Is this a bug in gst-python?
Or is something wrong with my code?  Here is the relevant portion of my
player class:

class Player:
	def __init__(self):
		self.bin = gst.play.Play()

		self.src = gst.element_factory_make('filesrc')
		self.asink = gst.element_factory_make('alsasink')

		self.bin.set_data_src(self.src)
		self.bin.set_audio_sink(self.asink)

		self.bin.set_state(gst.STATE_READY)

	def set_vol(self, volume):
		self.bin.set_property('volume', volume)

	def get_vol(self):
		return self.bin.get_property('volume')

Also, I would like to help write documentation for gst-python.  Where
should I start?  Who should I talk to?

Much thanks,
Jason DeRose

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQjfbCHqoeC9LR4KXAQLG/Qf/QplfGDAQ8l+SkW9pyLYfmptEwedlYQuh
SJUySZTC8mx6bkTJ2gHIzrvzV94VaBFqlTl7c1ftIw25gny84DPxyj9H+7z8ZmWl
xBjCEWZWGgWdhpHEjnbkeZzfTF4mj6cybUceZSP1hIBcOrVAEhQsXPbMIYUffO/Q
yGkNutpnQ3hPhuc5HNuqjok0CR+tTC2f8pVMSxL7xEfmpBVW9js7xnqefhWnulp1
/k2MZf3DvigDZzLAq8P02meCNLhvT1zYkqRF66Zu1TUalzIq4fJwDY28RDRHNsjI
celMah3UiNrpc4Xetr2PBvOKZbC35vCZStqpJ4KSN8zckY29p0pc/w==
=Jok7
-----END PGP SIGNATURE-----




More information about the gstreamer-devel mailing list