client: expose _close() method
authorWim Taymans <wtaymans@redhat.com>
Thu, 10 Jul 2014 15:05:13 +0000 (17:05 +0200)
committerWim Taymans <wtaymans@redhat.com>
Thu, 10 Jul 2014 15:05:13 +0000 (17:05 +0200)
Expose a previously internal close method to close the client
connection.

gst/rtsp-server/rtsp-client.c
gst/rtsp-server/rtsp-client.h

index 0fd751a..d37fb68 100644 (file)
@@ -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;
index 01f8208..6bc9a59 100644 (file)
@@ -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,