summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-07-10 17:05:13 +0200
committerWim Taymans <wtaymans@redhat.com>2014-07-10 17:05:13 +0200
commitced406cc28ef448739b6153ea80e79af102aa490 (patch)
tree0a404fbc2d168525138868b062acbb53cb3f2112
parent301585b30f7d6a604252df96a999d6e2435b1fab (diff)
client: expose _close() method
Expose a previously internal close method to close the client connection.
-rw-r--r--gst/rtsp-server/rtsp-client.c14
-rw-r--r--gst/rtsp-server/rtsp-client.h1
2 files changed, 12 insertions, 3 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 0fd751a..d37fb68 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -798,8 +798,16 @@ unlink_session_transports (GstRTSPClient * client, GstRTSPSession * session,
}
}
-static void
-close_connection (GstRTSPClient * client)
+/**
+ * gst_rtsp_client_close:
+ * @client: a #GstRTSPClient
+ *
+ * Close the connection of @client and remove all media it was managing.
+ *
+ * Since: 1.4
+ */
+void
+gst_rtsp_client_close (GstRTSPClient * client)
{
GstRTSPClientPrivate *priv = client->priv;
const gchar *tunnelid;
@@ -3133,7 +3141,7 @@ message_sent (GstRTSPWatch * watch, guint cseq, gpointer user_data)
if (priv->close_seq && priv->close_seq == cseq) {
GST_INFO ("client %p: send close message", client);
priv->close_seq = 0;
- close_connection (client);
+ gst_rtsp_client_close (client);
}
return GST_RTSP_OK;
diff --git a/gst/rtsp-server/rtsp-client.h b/gst/rtsp-server/rtsp-client.h
index 01f8208..6bc9a59 100644
--- a/gst/rtsp-server/rtsp-client.h
+++ b/gst/rtsp-server/rtsp-client.h
@@ -146,6 +146,7 @@ GstRTSPConnection * gst_rtsp_client_get_connection (GstRTSPClient *client);
guint gst_rtsp_client_attach (GstRTSPClient *client,
GMainContext *context);
+void gst_rtsp_client_close (GstRTSPClient * client);
void gst_rtsp_client_set_send_func (GstRTSPClient *client,
GstRTSPClientSendFunc func,