track: Give usefull name to compositions

This commit is contained in:
Thibault Saunier 2015-06-22 01:52:39 +02:00
parent 55f0601211
commit 5833aae413

View file

@ -477,6 +477,23 @@ static void
ges_track_constructed (GObject * object)
{
GESTrack *self = GES_TRACK (object);
gchar *componame = NULL;
if (self->type == GES_TRACK_TYPE_VIDEO) {
componame =
g_strdup_printf ("(video)%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));
}
if (componame) {
gst_object_set_name (GST_OBJECT (self->priv->composition), componame);
g_free (componame);
}
if (!gst_bin_add (GST_BIN (self), self->priv->composition))
GST_ERROR ("Couldn't add composition to bin !");