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/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello,
the media gets constructed first, then configured. I've tried to hook the "new-stream" signal in both ways: void on_state_changed (GstRTSPMedia * media, gint arg1, gpointer * unused) { g_print ("\nState changed!\n"); } void on_new_rtsp_stream (GstRTSPMedia * media, GstRTSPStream * stream, gpointer * unused) { g_print ("\nNew RTSP stream!\n"); g_print ("\nCurrent MTU: %u\n", gst_rtsp_stream_get_mtu (stream)); gst_rtsp_stream_set_mtu (stream, 1024); g_print ("\nNew MTU: %u\n", gst_rtsp_stream_get_mtu (stream)); } void on_media_configured (GstRTSPMediaFactory * factory, GstRTSPMedia * media, gpointer * unused) { g_print ("\nMedia configured!\n"); g_signal_connect (media, "new-stream", G_CALLBACK (on_new_rtsp_stream), NULL); } void on_media_constructed (GstRTSPMediaFactory * factory, GstRTSPMedia * media, gpointer * unused) { g_print ("\nMedia constructed!\n"); g_signal_connect (media, "new-state", G_CALLBACK (on_state_changed), NULL); g_signal_connect (media, "new-stream", G_CALLBACK (on_new_rtsp_stream), NULL); } The output will flow like this: - Media constructed! - Media configured! - State changed! but I can't seem to catch "new-stream" signal. Any hints on this? J -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |