track: Enhance restriction capsfilter name

This commit is contained in:
Thibault Saunier 2019-07-13 21:26:35 -04:00
parent 0d870428ed
commit ea2b5bded8

View file

@ -541,19 +541,28 @@ ges_track_constructed (GObject * object)
{ {
GESTrack *self = GES_TRACK (object); GESTrack *self = GES_TRACK (object);
gchar *componame = NULL; gchar *componame = NULL;
gchar *capsfiltername = NULL;
if (self->type == GES_TRACK_TYPE_VIDEO) { if (self->type == GES_TRACK_TYPE_VIDEO) {
componame = componame =
g_strdup_printf ("video_%s", GST_OBJECT_NAME (self->priv->composition)); 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) { } else if (self->type == GES_TRACK_TYPE_AUDIO) {
componame = componame =
g_strdup_printf ("audio_%s", GST_OBJECT_NAME (self->priv->composition)); 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) { if (componame) {
gst_object_set_name (GST_OBJECT (self->priv->composition), 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))