From 77badda6b987f4721cadd957274fb148fa84a8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 16 Apr 2014 21:40:45 +0100 Subject: [PATCH] videomixer: name collectpads object based on videomixer name Makes it easier to track things in debug logs when there are multiple mixers and muxers. --- gst/videomixer/videomixer2.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index cdeca1a423..b97e0ad528 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -2245,6 +2245,19 @@ gst_videomixer2_child_proxy_init (gpointer g_iface, gpointer iface_data) iface->get_children_count = gst_videomixer2_child_proxy_get_children_count; } +static void +gst_videomixer2_constructed (GObject * obj) +{ + GstVideoMixer2 *mix = GST_VIDEO_MIXER2 (obj); + gchar *cp_name; + + cp_name = g_strconcat (GST_OBJECT_NAME (obj), "-collectpads", NULL); + gst_object_set_name (GST_OBJECT (mix->collect), cp_name); + g_free (cp_name); + + G_OBJECT_CLASS (gst_videomixer2_parent_class)->constructed (obj); +} + /* GObject boilerplate */ static void gst_videomixer2_class_init (GstVideoMixer2Class * klass) @@ -2252,6 +2265,7 @@ gst_videomixer2_class_init (GstVideoMixer2Class * klass) GObjectClass *gobject_class = (GObjectClass *) klass; GstElementClass *gstelement_class = (GstElementClass *) klass; + gobject_class->constructed = gst_videomixer2_constructed; gobject_class->finalize = gst_videomixer2_finalize; gobject_class->dispose = gst_videomixer2_dispose;