Method not available in RTSPMediaFactory

Adam Langley linux at irisdesign.co.nz
Thu Sep 17 15:09:20 PDT 2015


Hi Aborliv,

I ran my same inspection code for the RTSPMediaFactoryURI, and got the
following results:
['get_uri', 'set_uri']

Interesting that none of the inherited methods show up.

This is my inspection code:

*print*([x *for* x,y *in*
GstRtspServer.RTSPMediaFactoryURI.__dict__.items() *if* type(y) ==
FunctionType])
I have also overridden do_create_element, and it just never gets called.
The constructor does however.... and the 'print' writes out a bunch of
methods declared in RTSPMediaFactory - so I know the class is correctly
derived...

class MyFactory(GstRtspServer.RTSPMediaFactory):
    def __init__(self):
        super(MyFactory, self).__init__()
        print([x for x,y in GstRtspServer.RTSPMediaFactory.__dict__.items()
if type(y) == FunctionType])
    def do_create_element(self, url):
        # return element here... code deleted

self.server = GstRtspServer.RTSPServer()
self.server.set_service('554')
f = MyFactory()
f.set_shared(True)
m = self.server.get_mount_points()
m.add_factory("/video", f)
self.server.attach(None)

On Thu, Sep 17, 2015 at 5:36 PM, Aborilov Pavel <aborilov at gmail.com> wrote:

> I use RTSPMediaFactoryURI from Python and I have to override method
> do_create_element, and it works.
>
> On 09/17, Adam Langley wrote:
> > I am using Gstreamer RTSPMediaFactory (libgstrtspserver 1.0) v 1.2.3-0.
> > From Python, I have derived from the MediaFactory, and overridden
> > create_element. Unfortunately, my create_element is never called, so the
> > RtspServer complains no launch line specified.
> >
> > I printed out all the methods declared in the super instance, and got
> this:
> >
> > ['set_buffer_size', 'set_suspend_mode', 'set_protocols', 'construct',
> > 'get_suspend_mode', 'get_launch', 'set_launch', 'is_eos_shutdown',
> > 'get_permissions', 'get_address_pool', 'set_shared', 'is_shared',
> > 'set_address_pool', 'get_protocols', 'get_buffer_size',
> 'set_permissions',
> > 'set_eos_shutdown']
> > No create_element!
> >
> > No wonder, my implementation is never being called... but why is there no
> > create_element function?
> >
>
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150917/91178d8b/attachment.html>


More information about the gstreamer-devel mailing list