encodebin: Plug a parser before timestamper

Timestamper might not support all stream formats so we need to make sure
some element is able to convert between those formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4122>
This commit is contained in:
Thibault Saunier 2023-03-03 15:06:37 -03:00 committed by Sebastian Dröge
parent c52212604e
commit 7eca75130d

View file

@ -1594,7 +1594,19 @@ _create_stream_group (GstEncodeBaseBin * ebin, GstEncodingProfile * sprof,
tosync = g_list_append (tosync, sgroup->timestamper);
if (G_UNLIKELY (!gst_element_link (sgroup->timestamper, last)))
goto parser_link_failure;
last = sgroup->timestamper;
if (sgroup->parser) {
GstElement *p1 =
gst_element_factory_make (GST_OBJECT_NAME (gst_element_get_factory
(sgroup->parser)), NULL);
gst_bin_add (GST_BIN (ebin), p1);
if (G_UNLIKELY (!gst_element_link (p1, last)))
goto parser_link_failure;
last = p1;
}
}
/* Stream combiner */