[gst-devel] Plugins in Python

Edward Hervey bilboed at gmail.com
Sun May 28 06:28:16 CEST 2006


Hi,

On 5/28/06, Oscar Aceÿfffff1a <oscaracena at yahoo.es> wrote:
> Hello,
>
> 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
specific elements).

  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ó:
>  HI,
>
>  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).
>
>  Edward
>
> 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.
> http://www.pitivi.org/
>
>
> -------------------------------------------------------
> 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
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
>  ________________________________
>
> 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.
http://www.pitivi.org/




More information about the gstreamer-devel mailing list