mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
add new-session signal to rtsp-client (fixes #683058)
This commit is contained in:
parent
02b17d6baa
commit
ebc4ce4de1
2 changed files with 10 additions and 0 deletions
|
@ -50,6 +50,7 @@ enum
|
|||
enum
|
||||
{
|
||||
SIGNAL_CLOSED,
|
||||
SIGNAL_NEW_SESSION,
|
||||
SIGNAL_LAST
|
||||
};
|
||||
|
||||
|
@ -102,6 +103,11 @@ gst_rtsp_client_class_init (GstRTSPClientClass * klass)
|
|||
G_STRUCT_OFFSET (GstRTSPClientClass, closed), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
gst_rtsp_client_signals[SIGNAL_NEW_SESSION] =
|
||||
g_signal_new ("new-session", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRTSPClientClass, new_session), NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_RTSP_SESSION);
|
||||
|
||||
tunnels =
|
||||
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
|
||||
g_mutex_init (&tunnels_lock);
|
||||
|
@ -1313,6 +1319,9 @@ client_watch_session (GstRTSPClient * client, GstRTSPSession * session)
|
|||
g_object_weak_ref (G_OBJECT (session), (GWeakNotify) client_session_finalized,
|
||||
client);
|
||||
client->sessions = g_list_prepend (client->sessions, session);
|
||||
|
||||
g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_NEW_SESSION], 0,
|
||||
session);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -113,6 +113,7 @@ struct _GstRTSPClientClass {
|
|||
|
||||
/* signals */
|
||||
void (*closed) (GstRTSPClient *client);
|
||||
void (*new_session) (GstRTSPClient *client, GstRTSPSession *session);
|
||||
};
|
||||
|
||||
GType gst_rtsp_client_get_type (void);
|
||||
|
|
Loading…
Reference in a new issue