Quantcast

How can I add RTSP media mapping to the gst-rtsp-server in Python?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can I add RTSP media mapping to the gst-rtsp-server in Python?

wl2776
Administrator
I've created a server instance, but cannot add media-mapping to it.
Are there any examples of using gst-rtsp-server in Python?

import gobject
gobject.threads_init()

import sys
import pygst
pygst.require('0.10')

import os

from gst import rtspserver 

class myrtspserver:
    def __init__(self):
        self.server=rtspserver.Server()
        self.server.props.media_mapping.set_property('/test',
                                    '( videotestsrc is-live=1 ! x264enc ! rtph264pay name=pay0 pt=96 )')  

The last line of the code above gives the error
TypeError: object of type `GstRTSPMediaMapping' does not have property `/test'

If I replace set_property with set_data, it doesn't give errors, but logs show that the server cannot find the media mapping when processing connection.
Tried also set_data
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I add RTSP media mapping to the gst-rtsp-server in Python?

André Dieb
Hello,

Currently gst-rtsp-server (master) can't add media mappings. I'm currently in the process of cleaning up my python-gst-rtsp-server patches, which include MediaMapping and MediaFactory bindings. It's likely to be submitted to bugzilla this week (at least an initial version). If you're interested, I can send you the dirty patches :) passing a launch string to the factory already works.

On Tue, Sep 14, 2010 at 6:02 AM, wl2776 <[hidden email]> wrote:

I've created a server instance, but cannot add media-mapping to it.
Are there any examples of using gst-rtsp-server in Python?

import gobject
gobject.threads_init()

import sys
import pygst
pygst.require('0.10')

import os

from gst import rtspserver

class myrtspserver:
   def __init__(self):
       self.server=rtspserver.Server()
       self.server.props.media_mapping.set_property('/test',
                                   '( videotestsrc is-live=1 ! x264enc !
rtph264pay name=pay0 pt=96 )')


The last line of the code above gives the error
TypeError: object of type `GstRTSPMediaMapping' does not have property
`/test'

If I replace set_property with set_data, it doesn't give errors, but logs
show that the server cannot find the media mapping when processing
connection.
Tried also set_data
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-can-I-add-RTSP-media-mapping-to-the-gst-rtsp-server-in-Python-tp2538670p2538670.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
André Dieb Martins

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I add RTSP media mapping to the gst-rtsp-server in Python?

André Dieb
Hello,

The patch was commited (thanks devs!) today, so, if you're still interested, you'll find the methods and sample code on test.py, included on the patch at https://bugzilla.gnome.org/show_bug.cgi?id=622296.

On Tue, Sep 14, 2010 at 8:19 AM, André Dieb <[hidden email]> wrote:
Hello,

Currently gst-rtsp-server (master) can't add media mappings. I'm currently in the process of cleaning up my python-gst-rtsp-server patches, which include MediaMapping and MediaFactory bindings. It's likely to be submitted to bugzilla this week (at least an initial version). If you're interested, I can send you the dirty patches :) passing a launch string to the factory already works.

On Tue, Sep 14, 2010 at 6:02 AM, wl2776 <[hidden email]> wrote:

I've created a server instance, but cannot add media-mapping to it.
Are there any examples of using gst-rtsp-server in Python?

import gobject
gobject.threads_init()

import sys
import pygst
pygst.require('0.10')

import os

from gst import rtspserver

class myrtspserver:
   def __init__(self):
       self.server=rtspserver.Server()
       self.server.props.media_mapping.set_property('/test',
                                   '( videotestsrc is-live=1 ! x264enc !
rtph264pay name=pay0 pt=96 )')


The last line of the code above gives the error
TypeError: object of type `GstRTSPMediaMapping' does not have property
`/test'

If I replace set_property with set_data, it doesn't give errors, but logs
show that the server cannot find the media mapping when processing
connection.
Tried also set_data
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-can-I-add-RTSP-media-mapping-to-the-gst-rtsp-server-in-Python-tp2538670p2538670.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
André Dieb Martins



--
André Dieb Martins

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I add RTSP media mapping to the gst-rtsp-server in Python?

wl2776
Administrator
Thanks, it's not very actual for me right now, I'll look into it as time permits.
André Dieb wrote
Hello,
The patch was commited (thanks devs!) today, so, if you're still interested,
you'll find the methods and sample code on test.py, included on the patch at
https://bugzilla.gnome.org/show_bug.cgi?id=622296.

On Tue, Sep 14, 2010 at 8:19 AM, André Dieb <andre.dieb@gmail.com> wrote:

> Hello,
>
> Currently gst-rtsp-server (master) can't add media mappings. I'm currently
> in the process of cleaning up my python-gst-rtsp-server patches, which

>> I've created a server instance, but cannot add media-mapping to it.
>> Are there any examples of using gst-rtsp-server in Python?
>>
Loading...