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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4984>
This commit is contained in:
Thibault Saunier 2023-07-05 14:22:59 -04:00 committed by Tim-Philipp Müller
parent e4206bbae8
commit 65896fd534

View file

@ -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: