Retrieve path string in mounts through GstRTSPClient
Hi, I am playing with Gstreamer-rtsp-server
. Currently, I am using gst_rtsp_mount_points_remove_factory()
to remove the factory with associated path in mount if the one of the client is closing (I know it sounds whacky, but ultimately, I will detect if the current closing client is the last one). To achieve that, I connect the GstRTSPClient::close
signal and implement a callback like this,
static void testClientClosed(GstRTSPClient* client, gpointer userdata)
{
GstRTSPMountPoints* mounts = gst_rtsp_client_get_mount_points(client);
gchar* matchedPath = NULL;
for (auto path : mountPaths)
{
GstRTSPMediaFactory* factory = gst_rtsp_mount_points_match(mounts, path, NULL);
if (factory)
{
matchedPath = path;
break;
}
}
....
gst_rtsp_mount_points_remove_factory(mounts, matchedPath);
....
}
My question is, is there any methods to retrieve the client mount path instead of doing the iteration? Thanks in advance.