Hi, I have and RTP source that I want to republish using a RTSP server.------------------------------ import gi gi.require_version('Gst', '1.0') gi.require_version('GstRtspServer', '1.0') from gi.repository import Gst, GObject, GstRtspServer GObject.threads_init() Gst.init(None) class RTSP_Server: def __init__(self): self.server = GstRtspServer.RTSPServer.new() self.address = '172.17.0.4' self.port = '8554' self.launch_description = '( udpsrc port=6784 caps="application/x-rtp,payload=96,config-interval=1" ! rtph264depay ! rtph264pay name=pay0 pt=96 )' self.server.set_address(self.address) self.server.set_service(self.port) self.server.connect("client-connected",self.client_connected) self.factory = GstRtspServer.RTSPMediaFactory.new() self.factory.set_launch(self.launch_description) self.factory.set_shared(True) self.factory.construct('/video') self.factory.set_transport_mode(GstRtspServer.RTSPTransportMode.PLAY) self.mount_points = self.server.get_mount_points() self.mount_points.add_factory('/video', self.factory) self.server.attach(None) print('Stream ready') GObject.MainLoop().run() def client_connected(self, arg1, arg2): print('Client connected') server = RTSP_Server() ------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Does anybody have an idea on how to solve this? Basically I need to have a pipeline that runs all the time and is (re-)used for clients of my RTSP server.On Tue, Jul 19, 2016 at 11:04 PM, Peter Gerten <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Wed, 2016-08-03 at 19:38 +0200, Peter Gerten wrote:
Hi Peter, > Does anybody have an idea on how to solve this? > Basically I need to have a pipeline that runs all the time and is > (re-)used for clients of my RTSP server. The simplest way to achieve this might be to just mark the rtsp media factory as shared with gst_rtsp_media_factory_set_shared() and start the first client yourself immediately after starting the server :) Cheers -Tim -- Tim Müller, Centricular Ltd - http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |