Gstreamer rtsp: Setup the server_ports from the address pool

Ansa Najeeb ansaahammed at gmail.com
Wed Sep 25 14:37:51 UTC 2019


Hi Team,

I have a working  RTSP server setup (with reference from
examples/test-video).
Once the RTSP SETUP request is received, it assigns the server ports to
receive the RTCP packets from client.

As we need to pickup the server ports from a pre-defined list, I have
configured the address pool  as below:
pool = gst_rtsp_address_pool_new ();
  if(pool != NULL ){

          if(gst_rtsp_address_pool_add_range(pool,
GST_RTSP_ADDRESS_POOL_ANY_IPV4, GST_RTSP_ADDRESS_POOL_ANY_IPV4, xx, yy, 0)
!= 1)
                g_print ("\n Failed to add to pool !!!! \n");

          gst_rtsp_address_pool_dump(pool);
          gst_rtsp_media_factory_set_address_pool (factory, pool );
}

This code is setting up the address pool correctly and once the stream is
started, it picks up the port number from the assigned range. Works well.

Now, i would like to get the port numbers assigned (dynamically) for each
stream once it is configured. Could you please advise which signal/callback
helps to get it for each Media-stream.
i saw the method "gst_rtsp_stream_get_server_port()". But how do i get the
stream object ? Which Callback can help here.

We need to support N number of clients with the same media stream. So the
ports assigned will be different and needs to assign the firewall rules
dynamically before getting the PLAY command for each stream.


Thank You,
-- 
*With Best Regards,*
* Ansa *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190925/3ec7d3cf/attachment.html>


More information about the gstreamer-devel mailing list