rtsp-client: Add a send_message default signal handler

This allows subclasses to easily hook into the response sending
mechanism without doing everything from a signal, which seems
awkward from subclasses.
This commit is contained in:
Sebastian Dröge 2014-12-29 12:06:50 +01:00
parent fc6811697c
commit 79e41bc2be
2 changed files with 5 additions and 2 deletions

View file

@ -262,7 +262,8 @@ gst_rtsp_client_class_init (GstRTSPClientClass * klass)
*/
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_generic,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPClientClass,
send_message), NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 2, GST_TYPE_RTSP_CONTEXT, G_TYPE_POINTER);
tunnels =

View file

@ -119,8 +119,10 @@ struct _GstRTSPClientClass {
void (*tunnel_http_response) (GstRTSPClient * client, GstRTSPMessage * request,
GstRTSPMessage * response);
void (*send_message) (GstRTSPClient * client, GstRTSPContext *ctx,
GstRTSPMessage * response);
/*< private >*/
gpointer _gst_reserved[GST_PADDING_LARGE-1];
gpointer _gst_reserved[GST_PADDING_LARGE-2];
};
GType gst_rtsp_client_get_type (void);