udp: fix get-stats action signal registration

It returns a GstStructure now, not a GValueArray
This commit is contained in:
Tim-Philipp Müller 2012-01-26 15:30:41 +00:00
parent bb7b879545
commit 80f319b7da
3 changed files with 7 additions and 5 deletions

View file

@ -72,6 +72,8 @@ static void gst_dynudpsink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
static void gst_dynudpsink_get_property (GObject * object, guint prop_id, static void gst_dynudpsink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstStructure *gst_dynudpsink_get_stats (GstDynUDPSink * sink,
const gchar * host, gint port);
static guint gst_dynudpsink_signals[LAST_SIGNAL] = { 0 }; static guint gst_dynudpsink_signals[LAST_SIGNAL] = { 0 };
@ -98,7 +100,7 @@ gst_dynudpsink_class_init (GstDynUDPSinkClass * klass)
gst_dynudpsink_signals[SIGNAL_GET_STATS] = gst_dynudpsink_signals[SIGNAL_GET_STATS] =
g_signal_new ("get-stats", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("get-stats", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstDynUDPSinkClass, get_stats), G_STRUCT_OFFSET (GstDynUDPSinkClass, get_stats),
NULL, NULL, gst_udp_marshal_BOXED__STRING_INT, G_TYPE_VALUE_ARRAY, 2, NULL, NULL, gst_udp_marshal_BOXED__STRING_INT, GST_TYPE_STRUCTURE, 2,
G_TYPE_STRING, G_TYPE_INT); G_TYPE_STRING, G_TYPE_INT);
g_object_class_install_property (gobject_class, PROP_SOCKET, g_object_class_install_property (gobject_class, PROP_SOCKET,
@ -125,6 +127,8 @@ gst_dynudpsink_class_init (GstDynUDPSinkClass * klass)
gstbasesink_class->unlock = gst_dynudpsink_unlock; gstbasesink_class->unlock = gst_dynudpsink_unlock;
gstbasesink_class->unlock_stop = gst_dynudpsink_unlock_stop; gstbasesink_class->unlock_stop = gst_dynudpsink_unlock_stop;
klass->get_stats = gst_dynudpsink_get_stats;
GST_DEBUG_CATEGORY_INIT (dynudpsink_debug, "dynudpsink", 0, "UDP sink"); GST_DEBUG_CATEGORY_INIT (dynudpsink_debug, "dynudpsink", 0, "UDP sink");
} }
@ -330,7 +334,7 @@ no_socket:
} }
} }
GstStructure * static GstStructure *
gst_dynudpsink_get_stats (GstDynUDPSink * sink, const gchar * host, gint port) gst_dynudpsink_get_stats (GstDynUDPSink * sink, const gchar * host, gint port)
{ {
return NULL; return NULL;

View file

@ -66,8 +66,6 @@ struct _GstDynUDPSinkClass {
GType gst_dynudpsink_get_type(void); GType gst_dynudpsink_get_type(void);
GstStructure* gst_dynudpsink_get_stats (GstDynUDPSink *sink, const gchar *host, gint port);
G_END_DECLS G_END_DECLS
#endif /* __GST_DYNUDPSINK_H__ */ #endif /* __GST_DYNUDPSINK_H__ */

View file

@ -203,7 +203,7 @@ gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass)
g_signal_new ("get-stats", G_TYPE_FROM_CLASS (klass), g_signal_new ("get-stats", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GstMultiUDPSinkClass, get_stats), G_STRUCT_OFFSET (GstMultiUDPSinkClass, get_stats),
NULL, NULL, gst_udp_marshal_BOXED__STRING_INT, G_TYPE_VALUE_ARRAY, 2, NULL, NULL, gst_udp_marshal_BOXED__STRING_INT, GST_TYPE_STRUCTURE, 2,
G_TYPE_STRING, G_TYPE_INT); G_TYPE_STRING, G_TYPE_INT);
/** /**
* GstMultiUDPSink::client-added: * GstMultiUDPSink::client-added: