track: Enhance restriction capsfilter name
authorThibault Saunier <tsaunier@igalia.com>
Sun, 14 Jul 2019 01:26:35 +0000 (21:26 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 26 Jul 2019 18:23:55 +0000 (14:23 -0400)
ges/ges-track.c

index 280c657..c0f81e1 100644 (file)
@@ -541,19 +541,28 @@ ges_track_constructed (GObject * object)
 {
   GESTrack *self = GES_TRACK (object);
   gchar *componame = NULL;
 {
   GESTrack *self = GES_TRACK (object);
   gchar *componame = NULL;
+  gchar *capsfiltername = NULL;
 
   if (self->type == GES_TRACK_TYPE_VIDEO) {
     componame =
         g_strdup_printf ("video_%s", GST_OBJECT_NAME (self->priv->composition));
 
   if (self->type == GES_TRACK_TYPE_VIDEO) {
     componame =
         g_strdup_printf ("video_%s", GST_OBJECT_NAME (self->priv->composition));
+    capsfiltername =
+        g_strdup_printf ("video_restriction_%s",
+        GST_OBJECT_NAME (self->priv->capsfilter));
   } else if (self->type == GES_TRACK_TYPE_AUDIO) {
     componame =
         g_strdup_printf ("audio_%s", GST_OBJECT_NAME (self->priv->composition));
   } else if (self->type == GES_TRACK_TYPE_AUDIO) {
     componame =
         g_strdup_printf ("audio_%s", GST_OBJECT_NAME (self->priv->composition));
+    capsfiltername =
+        g_strdup_printf ("audio_restriction_%s",
+        GST_OBJECT_NAME (self->priv->capsfilter));
   }
 
   if (componame) {
     gst_object_set_name (GST_OBJECT (self->priv->composition), componame);
   }
 
   if (componame) {
     gst_object_set_name (GST_OBJECT (self->priv->composition), componame);
+    gst_object_set_name (GST_OBJECT (self->priv->capsfilter), capsfiltername);
 
     g_free (componame);
 
     g_free (componame);
+    g_free (capsfiltername);
   }
 
   if (!gst_bin_add (GST_BIN (self), self->priv->composition))
   }
 
   if (!gst_bin_add (GST_BIN (self), self->priv->composition))