ges: Enhance element names in video uri sources
authorThibault Saunier <tsaunier@igalia.com>
Tue, 6 Sep 2022 21:24:22 +0000 (17:24 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Sep 2022 13:23:02 +0000 (13:23 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>

subprojects/gst-editing-services/ges/ges-video-source.c

index ce83941..5b0d3cd 100644 (file)
@@ -117,6 +117,7 @@ ges_video_source_create_filters (GESVideoSource * self, GPtrArray * elements,
   const gchar *positioner_props[]
   = { "alpha", "posx", "posy", "width", "height", "operator", NULL };
   const gchar *videoflip_props[] = { "video-direction", NULL };
+  gchar *ename = NULL;
 
   g_ptr_array_add (elements, gst_element_factory_make ("queue", NULL));
 
@@ -136,17 +137,25 @@ ges_video_source_create_filters (GESVideoSource * self, GPtrArray * elements,
   g_object_set (videoflip, "video-direction", GST_VIDEO_ORIENTATION_AUTO, NULL);
   g_ptr_array_add (elements, videoflip);
 
+
   if (needs_converters) {
-    g_ptr_array_add (elements, gst_element_factory_make ("videoscale",
-            "track-element-videoscale"));
+    ename =
+        g_strdup_printf ("ges%s-videoscale", GES_TIMELINE_ELEMENT_NAME (self));
+    g_ptr_array_add (elements, gst_element_factory_make ("videoscale", ename));
+    g_free (ename);
+    ename = g_strdup_printf ("ges%s-convert", GES_TIMELINE_ELEMENT_NAME (self));
     g_ptr_array_add (elements, gst_element_factory_make ("videoconvert",
-            "track-element-videoconvert"));
+            ename));
+    g_free (ename);
   }
-  g_ptr_array_add (elements, gst_element_factory_make ("videorate",
-          "track-element-videorate"));
-
-  capsfilter =
-      gst_element_factory_make ("capsfilter", "track-element-capsfilter");
+  ename = g_strdup_printf ("ges%s-rate", GES_TIMELINE_ELEMENT_NAME (self));
+  g_ptr_array_add (elements, gst_element_factory_make ("videorate", ename));
+
+  g_free (ename);
+  ename =
+      g_strdup_printf ("ges%s-capsfilter", GES_TIMELINE_ELEMENT_NAME (self));
+  capsfilter = gst_element_factory_make ("capsfilter", ename);
+  g_free (ename);
   g_ptr_array_add (elements, capsfilter);
 
   ges_frame_positioner_set_source_and_filter (GST_FRAME_POSITIONNER