mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
client: emit a signal before sending a message
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728970
This commit is contained in:
parent
4c42aec6dd
commit
ea4543efc8
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue