RTSP server: GstRTSPMedia does not emit "new-stream" signal

stfl ste.lendl at gmail.com
Tue Apr 10 14:47:51 UTC 2018


I am intending to configure the DSCP value on an outgoing rtp stream.
GstRTSPStream does have this value. GstRTSPMedia is supposed to have a
signal "new-stream" that can be used to configure the new stream but it
doesn't get called.

I am writing it in python3 with gst 1.12.4

The relevant parts of my code:

        self._add_mount_point('test_720p_h264', """
            videotestsrc is-live=true do-timestamp=true
            ! capsfilter
caps="video/x-raw,width=(int)1280,height=(int)720,framerate=(fraction)30/1"
            ! x264enc
                tune=zerolatency
            ! rtph264pay mtu=1400 name=pay0
        """)

    def _add_mount_point(self, mount_point, launch_description):
        """ add a /mount_point to the url starting the pipeline with
launch_description """
        factory = GstRtspServer.RTSPMediaFactory.new()
        factory.set_launch(launch_description)
        factory.set_shared(True)
        factory.set_retransmission_time(0)
        factory.set_stop_on_disconnect(True)
        factory.set_suspend_mode(GstRtspServer.RTSPSuspendMode.RESET)
        factory.connect("media-configure", self._on_media_configure)
        factory.connect("media-constructed", self._on_media_constructed)
        mount_points = self.server.get_mount_points()
        mount_points.add_factory('/' + mount_point, factory)
        #  mount_points.unref()
        print('Stream ready on rtsp://' + self.address + ':' + self.port +
'/' + mount_point)

    def _on_media_configure(self, factory, media):
        media.connect("new-stream", self._on_media_new_stream)  # FIXME: it
doesn't get called..
        media.set_reusable(False)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list