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

bomba jhonata.poma at gmail.com
Thu Sep 13 10:10:53 UTC 2018


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/


More information about the gstreamer-devel mailing list