rtsp-client: Add a send_message default signal handler
authorSebastian Dröge <sebastian@centricular.com>
Mon, 29 Dec 2014 11:06:50 +0000 (12:06 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 Dec 2014 11:06:50 +0000 (12:06 +0100)
This allows subclasses to easily hook into the response sending
mechanism without doing everything from a signal, which seems
awkward from subclasses.

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

index 3885ee9..4099b78 100644 (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 =
index 6bc9a59..4e9519a 100644 (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);