[gst-devel] python-gst caps

mammique mammique at lamenagerie.com
Tue Jul 12 20:54:45 CEST 2005


Hello,

i'm trying to implement a caps fix using python-gst by building a
gst.Element. But it don't seems to be the good way, is there some
exemple about caps fixing in python ?

Thank you.

Best regards.

Camille.




class ImagesrcCaps (gst.Element):

    __gsttemplates__ = (
        gst.PadTemplate ("src", gst.PAD_SRC, gst.PAD_ALWAYS,
                      gst.Caps('video/x-raw-rgb,width=400,height=300')),
        gst.PadTemplate ("sink", gst.PAD_SINK, gst.PAD_ALWAYS,
                      gst.Caps ('video/x-raw-rgb,width=400,height=300'))
        )

    __gstdetails__ = ("Caps for imagesrc", "Filter",
                      "Hack for imagesrc capabilities",
                      "Camille Harang <mammique at garbure.org>")

    def __init__ (self):
        self.__gobject_init__()
        self.srcpad = gst.Pad (self.__gsttemplates__[0])
        self.add_pad (self.srcpad)
        self.sinkpad = gst.Pad (self.__gsttemplates__[1])
        self.add_pad (self.sinkpad)





More information about the gstreamer-devel mailing list