From ced406cc28ef448739b6153ea80e79af102aa490 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 10 Jul 2014 17:05:13 +0200 Subject: [PATCH] client: expose _close() method Expose a previously internal close method to close the client connection. --- gst/rtsp-server/rtsp-client.c | 14 +++++++++++--- gst/rtsp-server/rtsp-client.h | 1 + 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, -- 2.7.4