From 96f86da61a471a4d55dda03146a022403c602651 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 5 Jul 2023 14:22:59 -0400 Subject: [PATCH] ges: pipeline: Avoid setting state before being constructed It means setting state which triggers traces for not constructed objects which fails in rust tracers as object should have names in all traces. Part-of: --- .../gst-editing-services/ges/ges-pipeline.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-editing-services/ges/ges-pipeline.c b/subprojects/gst-editing-services/ges/ges-pipeline.c index eebf8b595f..6d271ba17f 100644 --- a/subprojects/gst-editing-services/ges/ges-pipeline.c +++ b/subprojects/gst-editing-services/ges/ges-pipeline.c @@ -254,6 +254,16 @@ _timeline_track_removed_cb (GESTimeline * timeline, GESTrack * track, _unlink_track (pipeline, track); } +static void +ges_pipeline_constructed (GObject * object) +{ + GESPipeline *self = GES_PIPELINE (object); + + ges_pipeline_set_mode (self, DEFAULT_TIMELINE_MODE); + + ((GObjectClass *) ges_pipeline_parent_class)->constructed (object); +} + static void ges_pipeline_dispose (GObject * object) { @@ -301,6 +311,8 @@ ges_pipeline_class_init (GESPipelineClass * klass) GST_DEBUG_CATEGORY_INIT (ges_pipeline_debug, "gespipeline", GST_DEBUG_FG_YELLOW, "ges pipeline"); + + object_class->constructed = ges_pipeline_constructed; object_class->dispose = ges_pipeline_dispose; object_class->get_property = ges_pipeline_get_property; object_class->set_property = ges_pipeline_set_property; @@ -405,8 +417,6 @@ ges_pipeline_init (GESPipeline * self) if (G_UNLIKELY (self->priv->encodebin == NULL)) goto no_encodebin; - ges_pipeline_set_mode (self, DEFAULT_TIMELINE_MODE); - return; no_playsink: