[gst-devel] Plugins in Python
bilboed at gmail.com
Sun May 28 06:28:16 CEST 2006
On 5/28/06, Oscar Aceÿfffff1a <oscaracena at yahoo.es> wrote:
> Well, i've wondered this many times. Then, should i presume that already
> exists one plugin writted in python and, therefore, for python? If so, where
> can i get it? I'm about to write an app in python too, and i need to write a
> plugin, in python if possible!
Let's get things straight first :) You CAN create elements entirely
in python, you just have to create a class that derives from
gst.Element (or one of the convenience classes, like gst.BaseSrc). ex:
class MyElement(gst.Element): ....
To create elements from that class you just... instantiate one.
myelement = MyElement().
And those elements can be used as any other gst.Element (like the
ones coming from gst.element_factory_make()).
A gst.Plugin is NOT needed to create gstreamer elements you can use
in a pipeline (some C applications already do that for application
The only need for a plugin, is to be able to use the element
class(es) that plugin provides in other gstreamer-based software,
through the use of the gst.Registry. It is NOT a requirement to be
able to use element classes in your progrm. If you want to use those
element classes in your program, you don't need plugins, you link them
statically to your C program.
So if you want to write element classes in python and use them in
your python program... you already can.
Do you understand the difference between a Plugin and an element class now ?
> Another question: I have seen that to write a plugin, exists a template;
> this template, it is only writted for C? If so, can i port it to python?
> This could be useful for at least two persons! :-)
Once the python plugin loader is there... I guess we'll get round to
creating a template (which is going to be 50 lines more or less...).
> And the last question: if this is possible, how can i load the plugin to use
> in a normal pipe?
Read the paragraph about "plugin != element" above once more.
> Thanks in advance to all!
> Edward Hervey <bilboed at gmail.com> escribió:
> Currently you can create most type of elements entirely in Python.
> But we don't have a python plugin loader currently, so you will only
> be able to use it from a python application (importing the python file
> where you wrote yor element).
> On 5/26/06, Diego Martín wrote:
> > Hello:
> > I am doing a proyect with Gstreamer and Python. I am going to do a plugin.
> > Can I write the plugin in python or I have to use C through bindings?
> > Thank you!
> > ________________________________
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por minuto.
> > http://es.voice.yahoo.com
> Edward Hervey
> Junior developer / Fluendo S.L.
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
Junior developer / Fluendo S.L.
More information about the gstreamer-devel