summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-05-01 06:17:06 +0200
committerWim Taymans <wtaymans@redhat.com>2014-05-01 06:17:06 +0200
commitea4543efc810f9347196ece13e8c2168b82073eb (patch)
treece253fbf3c333aee3d5d01772e9a34dab9306625
parent4c42aec6ddc06601dc2f14b1af46b01e60dabf47 (diff)
client: emit a signal before sending a message
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728970
-rw-r--r--gst/rtsp-server/rtsp-client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index fc58b16..d42f933 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -114,6 +114,7 @@ enum
SIGNAL_SET_PARAMETER_REQUEST,
SIGNAL_GET_PARAMETER_REQUEST,
SIGNAL_HANDLE_RESPONSE,
+ SIGNAL_SEND_MESSAGE,
SIGNAL_LAST
};
@@ -247,6 +248,11 @@ gst_rtsp_client_class_init (GstRTSPClientClass * klass)
handle_response), NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
+ gst_rtsp_client_signals[SIGNAL_SEND_MESSAGE] =
+ g_signal_new ("send-message", G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+
tunnels =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
g_mutex_init (&tunnels_lock);
@@ -473,6 +479,9 @@ send_message (GstRTSPClient * client, GstRTSPContext * ctx,
if (close)
gst_rtsp_message_add_header (message, GST_RTSP_HDR_CONNECTION, "close");
+ g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_SEND_MESSAGE],
+ 0, ctx, message);
+
g_mutex_lock (&priv->send_lock);
if (priv->send_func)
priv->send_func (client, message, close, priv->send_data);